INTERNAL.Project_cache
module TYPES : sig ... end
val save :
config:TYPES.config ->
Cobol_lsp__.Lsp_document.TYPES.document Stdlib__Map.Make(Lsp.Uri).t ->
unit
save ~config docs
saves the caches of all the given document's projects.
For any project p
of which at least one document belongs to docs
, any document of p
that does not belong to docs
is removed from p
's cache.
Some notifications about the saving process may be pushed via Lsp_io.send_notification
. May raise some IO-related exceptions (Sys_error
, Failure
).
val load :
rootdir:Superbol_project__.Project.TYPES.rootdir ->
layout:Superbol_project__.Project.TYPES.layout ->
config:TYPES.config ->
Cobol_lsp__.Lsp_document.TYPES.document Stdlib__Map.Make(Lsp.Uri).t
load ~rootdir ~config ~layout
pre-loads cached documents pertaining to a project located in rootdir
, with project directory layout layout
.
All projects in the returned map belong to the same project. Note this map may actually be empty (for instance in case of missing, out-dated cache files, or cache files for a different version of the library).
Some notifications about the loading process may be pushed via Lsp_io.send_notification
. May raise some IO-related exceptions (Sys_error
, Failure
).