Superbol_project.Cached_diagnosticsDiagnostics of documents, cached on their own so that they can be reported for documents that are not open, without restoring their (much larger) analysis for the LSP.
Diagnostics are held as the parser and the typechecker give them, and only translated when reported.
type t = private {copybook : bool;copybooks are not analyzed, and hold none
*)parsing_diags : Cobol_parser.Diagnostics.ALL.t;typeck_diags : Cobol_typeck.Diagnostics.t;}val of_analysis : Superbol_project__.Project_analysis.for_lsp -> tof_analysis a gathers the diagnostics of a.
val diagnostics : t -> Cobol_common.Diagnostics.Set.tdiagnostics t gathers all diagnostics held in t.
val slot : Superbol_project__.Project_analysis.keys -> Superbol_cache.Types.keyslot keys is the slot in which the diagnostics of the document keys are recorded; it is theirs only, as they are stored at times of their own.
val store :
Superbol_cache.Cache.t ->
keys:Superbol_project__.Project_analysis.keys ->
label:string ->
t ->
unitstore cache ~keys ~label diags records diags in cache, for as long as the analysis for the LSP under Project_analysis.key_for_lsp keys holds, and supersedes the diagnostics of previous versions of the document.
val lookup :
Superbol_cache.Cache.t ->
keys:Superbol_project__.Project_analysis.keys ->
resolve:(Superbol_cache.Types.witness -> bool) ->
t optionlookup cache ~keys ~resolve retrieves the diagnostics of the document keys from cache.
val mem :
Superbol_cache.Cache.t ->
keys:Superbol_project__.Project_analysis.keys ->
boolmem cache ~keys indicates whether cache holds diagnostics for the document keys, without checking their witnesses.
val store_for_analysis :
Superbol_cache.Cache.t ->
keys:Superbol_project__.Project_analysis.keys ->
label:string ->
?fresh:bool ->
Superbol_project__.Project_analysis.for_lsp ->
unitstore_for_analysis cache ~keys ~label ?fresh analysis stores the diagnostics of analysis in cache, unless it already holds some for the document. fresh (defaults to false) indicates analysis was just computed, so that cache need not be checked.