A check held up every request, because the compiler could run one
compilation at a time. It can now run each in a context of its own.
- A check runs on a checking thread, in Compilation.inNew. The thread
reports a check to the thread that serves requests, which writes to the
client.
- The outline, definitions, references, completion, signature help and
formatting are answered while a check runs.
- A hover, a code action and bjolang/expandMacro are answered when the
check of their file ends, with the results of the text as it stands.
Other requests are served meanwhile.
- A file that changes again before its check starts is checked once.
- The tables that a check writes are concurrent dictionaries.
- Standard output is the protocol's; the console's output goes to standard
error.
- smoke: with a check of 1.6 s running, an outline is answered in 0.1 s.
Needs the compiler at its commit "Diagnostics.captured collects the output
of its own context".
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
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>
Runs the compiler in-process against the Bjolang checkout beside it, and
answers diagnostics, an outline, go to definition, hover and completion,
plus a request of its own for macro expansion.
Diagnostics come from the compiler's own check of the editor's text,
saved or not: on open, on save, and 400 ms after typing pauses. The
outline, definitions, hovers and completions read only as far as the
reader, with no type checking, so they answer on every request: the
top-level names of the file, its imports and the prelude, local names
from the binding forms the parser knows, the declarations and docs as
written, and the builtins with their types. emacs/bjolang-lsp.el shows a
macro call's expansion, one step or all of it, in a buffer.
test/smoke.py drives the server as an editor would.
🤖 Generated with [ECA](https://eca.dev)
Co-Authored-By: eca-agent <git@eca.dev>