Module Superbol_free_lib.Project

Loading

Functions for loading projects. They report diagnostics and exit the program upon error (invalid configuration file or system error).

Note: No file is ever written by these procedures, even in the case of project creation.

Direct (using the intended root directory)

val absolute_dirname : string -> string

absolute_dirname dirname is the absolute name of directory dirname, spelled as the LSP server spells directories: with / as separator, and without . components nor trailing separators. Projects are designated by their root directory, and the location of their cache may depend on how it is spelled.

val in_ : dirname:string -> ?layout:Superbol_project.layout -> unit -> Superbol_project.t

in_ ~dirname loads or creates a project with root directory dirname (made absolute with absolute_dirname).

val load : ?dirname:string -> ?layout:Superbol_project.layout -> unit -> Superbol_project.t

load ~dirname () is an alias for in_ ~dirname, and load () is equivalent to in_ ~dirname:".".

Indirect (using a regular file)

val for_ : filename:string -> ?layout:Superbol_project.layout -> unit -> Superbol_project.t

for_ ~filename searches the parent directories of filename until a project directory, that contains a "superbol.toml" configuration file, is found. If none is found, returns a project with a default configuration and Filename.dirname filename as root directory.

val for_filename : ?layout:Superbol_project.layout -> string -> Superbol_project.t

for_filename filename is an alias for for_ ~filename.