Commit graph

4 commits

Author SHA256 Message Date
5e4ac7d9aa Checks run on a thread of their own
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>
2026-11-25 09:32:15 +01:00
c5acafd5dd 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>
2026-11-25 08:39:42 +01:00
78d18c9854 Hover on fields, and on locals of record types
A field read shows the field's type and its declaration; a local of a
record, struct or union type shows the type. Structs and opaque types get
their symbols, and the file's own types drop their module qualifier.
2026-11-03 14:45:55 +01:00
471b49d9e4 Inferred types: in hovers, and as inlay hints
A check keeps what the compiler inferred, through Inference.observe, as
each use of a name with its type there and each binding with the type it
binds. A hover shows (: name type) for a local, and a generic function's
type at the use hovered. Inlay hints show the type after each local name
where it is bound and no type is written.

Hints before the first change since the last check are sent; the ones after
it wait for the check, which then asks the client to ask again. A hover runs
a check that is due first.

🤖 Generated with [ECA](https://eca.dev)

Co-Authored-By: eca-agent <git@eca.dev>
2026-10-22 12:58:19 +02:00