Expand description
gdscript-ide — the public, engine-/protocol-neutral analysis API.
Modeled on rust-analyzer’s ide::AnalysisHost / ide::Analysis
(plans/01-ARCHITECTURE.md §2). AnalysisHost is the single mutable owner of the
input world; Analysis is a cheap, cloneable, Send snapshot whose queries take
byte offsets and return plain serde result structs from gdscript-base — never
lsp-types. Each client (LSP server, the guitkx adapter, the CLI, the WASM
playground) maps these POD results to its own protocol.
Phase 3 (M0) swaps the engine behind these types from a plain VFS map to a salsa
query graph in gdscript_db: the input world is now FileText salsa inputs, mutated
through apply_change; Analysis is a cloned database handle (salsa handles are
Clone + Send, replacing the old Arc<map> snapshot). Cancellation is now real —
a concurrent apply_change cancels in-flight reads on outstanding handles, which unwind
into Err(Cancelled) at the query boundary (see [catch]). The public API shape is
unchanged. The crate stays wasm32-safe (CI guards this).
Structs§
- Analysis
- An immutable snapshot of the world — a cloned salsa handle. Every query is
Cancellable: a concurrentapply_changecancels in-flight reads, which the client re-issues against the fresh snapshot. - Analysis
Host - The single mutable owner of analysis state — one per project/workspace.
- Change
- A batch of input changes.
Nonetext removes the file.
Enums§
- Warning
Override - Re-exported so clients can set the warning-strictness override without depending on
gdscript-dbdirectly. SeeAnalysisHost::set_warning_override. The database traitgdscript-hir/gdscript-idedepend on.#[salsa::db]on the trait makes it a salsa supertrait, so any&dyn Dbupcasts to&dyn salsa::Databaseand every#[salsa::tracked]free function downstream can takedb: &dyn Db. A host/CLI-level override of the warning-strictness baselinetype_diagnosticsresolves against (regardless ofproject.godotpresence). A plain (non-salsa) per-session policy knob: it is read only inside the non-trackedtype_diagnostics, so it never enters the salsa query graph and cannot break the W1 firewall (a warning-level change must never re-run inference).