Expand description
Bynk’s IDE/LSP analysis surface.
The non-bailing diagnostics the language server consumes — single-file
(diagnose) and whole-project (diagnose_project) — plus the result
types (Diagnostic, FileDiagnostics, ProjectDiagnostics). These
are queries over the captured tables produced during analysis (the binding
index, inlay hints, expression types, locals — all in bynk-check); the
project analysis itself ([bynk_emit::project::analyse_project]) is the
non-bailing counterpart to compile_project.
Extracted from bynkc as slice 5 of the crate-decomposition track over
bynk-syntax + bynk-check + bynk-emit. Behaviour is unchanged; the
language server (bynk-lsp) depends on this crate directly instead of the
whole bynkc compiler crate, and bynkc re-exports these items so its own
tests and public API are unchanged.
Structs§
- Diagnostic
- One diagnostic produced from a recovery-mode compile of a single file.
- File
Diagnostics - Per-file diagnostics from a whole-project analysis.
v0.24 (ADR 0052):
textis the analysed snapshot — positions must convert against it, not a newer buffer (the analyse→publish window is real). - Project
Diagnostics - v0.24: the result of
diagnose_project. Every discovered file appears infiles— clean files with an empty list — so a consumer can clear stale diagnostics.unattributedholds project-level diagnostics with no single owning file (group/cycle/directory validations).
Functions§
- diagnose
- Best-effort single-file compilation that always returns diagnostics.
- diagnose_
project - v0.24 (ADR 0052): non-bailing, overlay-aware, file-attributed project
diagnostics — the LSP analysis entry point, distinct from
compile_project(which bails and emits).overlaymaps canonicalised absolute paths to buffer text layered over disk reads.