The compiler's values of a compilation are written as .Value

The compiler keeps the state of a compilation in a context
(Compilation.fs, on its branch compilation-context), and a value that was a
module-level mutable is a Per. The server sets Diagnostics.verbose,
Paths.sourceOverrides, Paths.compilerAssembly and the five observers, each
now as x.Value <- ...

No change to what the server does: every check still runs in the one root
context.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
This commit is contained in:
Linus Björnstam 2026-11-25 08:39:42 +01:00
parent ce426b94df
commit c5acafd5dd
5 changed files with 14 additions and 14 deletions

View file

@ -232,9 +232,9 @@ let private options: Build.Options = { Build.dependencyOptions with IsLibrary =
/// check failed with nothing collected: a failure the compiler printed rather
/// than recorded, such as a bug in it, which would otherwise fail silently.
let file (buffers: Map<string, string>) (path: string) : Found list =
Diagnostics.verbose <- false
Diagnostics.verbose.Value <- false
Diagnostics.reset ()
Paths.sourceOverrides <- buffers
Paths.sourceOverrides.Value <- buffers
// The text the check reads, for what to mark at a column and for where
// the types it infers are.
@ -256,7 +256,7 @@ let file (buffers: Map<string, string>) (path: string) : Found list =
printfn "%s" (Diagnostics.humanize ex.Message)
1)
finally
Paths.sourceOverrides <- Map.empty
Paths.sourceOverrides.Value <- Map.empty
// With BJOLANG_TIMING set, where the check's time went, to the log.
if Timing.enabled then