summaryrefslogtreecommitdiff
path: root/docs/lsp-evaluation.md
diff options
context:
space:
mode:
authorGabriel Schneider <[email protected]>2026-11-05 11:24:31 -0300
committerGabriel Schneider <[email protected]>2026-11-05 12:02:59 -0300
commit60a891ce8127c87b55aed1ff71e435cb7fbd28fc (patch)
treea69bdf00d8d5630e40c1f74b14d97d3b59f6d784 /docs/lsp-evaluation.md
parent2143d01eeeadd33c49ceaf22721729a5d03b2810 (diff)
downloadpardes-60a891ce8127c87b55aed1ff71e435cb7fbd28fc.tar.gz
pardes-60a891ce8127c87b55aed1ff71e435cb7fbd28fc.zip
lsp: SCIP first, the server second: the language words ask the nearest index.scip above the file (src/lsp/Scip.zig: a protobuf reader of the fields the words read, each document's occurrences with their ranges, roles and enclosing nodes, the symbols interned, a document's locals its own, with their occurrences listed by symbol, each symbol's information read again when a word wants it; loaded on the first question on the query's worker and again once the file changes, into a fixed region of two indexes, 32 MiB of index and 32 MiB of tables each, eight times rust-analyzer's index of clap_builder 4.6.7, 3.9 MB with 3.1 MB of tables); Def, type definition, Refs, SelectRefs, gi and Subtypes, Supertypes, Symbols, WsSymbols, Hover, Callers, Callees and Callstack answer from it in the server's rows (the Callstack walk takes its hops from the index or the server, each caller the function whose definition holds the call), and the server answers what it lacks (no index, a file, place or symbol it does not hold, a pane's unsaved changes) and Diagnostics, Rename, CodeAction, format, completion and declaration; an index older than its file answers and says so once; Lspinfo starts with the index (path, size, documents, symbols, when, files newer) and its log names scip; Lspwhy narrates the branch taken; the Index word runs the file's indexer (rust-analyzer scip . and the like, PARDES_SCIP_* naming another) at the project's root in a command pane; T1 cases over a hand-made index and rust-analyzer's own (test/scipfixture); the reference, setup, guide, lsp-evaluation.md, the changelog and both builtins lists say so
Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_016Y9MNAtZenFv4weoMD3cge
Diffstat (limited to 'docs/lsp-evaluation.md')
-rw-r--r--docs/lsp-evaluation.md20
1 files changed, 20 insertions, 0 deletions
diff --git a/docs/lsp-evaluation.md b/docs/lsp-evaluation.md
index 0812ebf0..b98ea4c0 100644
--- a/docs/lsp-evaluation.md
+++ b/docs/lsp-evaluation.md
@@ -128,6 +128,26 @@ once, and its language words answer `language server for .x not found`.
A (`nvqpknzm`), B (`stuurqqt`) and C's last state (the parent of
`kvlpprms`) remain whole commits.
+**2026-11-05: an index first, the server second.** The words ask the
+nearest `index.scip` above the file (SCIP, scip-code.org: a protobuf file
+an indexer writes at the project's root) before any server:
+`src/lsp/Scip.zig` reads it, about 350 lines with its tests, keeping each
+document's occurrences and each symbol's information in a fixed region
+(an index of 32 MB at most, its tables 32 MB, two indexes at once). Def,
+type definition, Refs, SelectRefs, `gi`, Subtypes, Supertypes, Symbols,
+WsSymbols, Hover, Callers, Callees and the Callstack tree answer from it
+where it knows the symbol: locally, with no handshake and no index to
+wait for, the Callstack's callers each the function whose definition holds
+the call. The server stays for what an index cannot say (Diagnostics,
+Rename, CodeAction, format, completion, declaration), for a pane with
+unsaved changes, and as the fallback for a file, a place or a symbol the
+index lacks, the call hierarchy included (against the architecture's
+ยง13, which dropped it: Callstack over clangd and rust-analyzer stays for
+a project with no index). Measured on rust-analyzer's index of
+clap_builder 4.6.7 (3.9 MB, 32,795 occurrences, 3.1 MB of tables), in a
+Debug core: the first question reads and parses the index in 3.7 ms, a
+`gd` after it takes 0.14 ms, `gr` 0.6 ms, a 7,463-row Callstack 62 ms.
+
## Recommendation (as written before the decision)
**C (in-process), with B as the answer to a question pardes has not asked yet.**