M2.5: symbol index and go-to commands

crates/index: walks the project with the search/VFS rules (vendor as
library), parses .php files from tree-sitter outlines on a worker pool
off the engine lock, updates incrementally from disk and buffers through
an updater thread, caps at 200,000 files, and answers fuzzy file, class
and symbol queries (nucleo-matcher, MPL-2.0 as a separate crate).

Engine: index.status, goto.file, goto.class, goto.symbol; events
indexProgress and indexReady drained by the pump; the index starts on
project.open and is cancelled on close. Tests: unit, incremental,
property (random queries and sources), engine and TCP control tests,
release timing on a generated 20k-file project (3.9-4.2 s).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
danny 2026-10-17 12:53:33 +02:00
parent f13a49064d
commit 053441d066
26 changed files with 3455 additions and 9 deletions

19
Cargo.lock generated
View file

@ -2582,6 +2582,7 @@ dependencies = [
name = "lutra-engine"
version = "0.0.0"
dependencies = [
"lutra-index",
"lutra-search",
"lutra-testkit",
"lutra-text",
@ -2596,6 +2597,15 @@ dependencies = [
[[package]]
name = "lutra-index"
version = "0.0.0"
dependencies = [
"ignore",
"lutra-syntax",
"lutra-testkit",
"lutra-text",
"nucleo-matcher",
"proptest",
"tempfile",
]
[[package]]
name = "lutra-lsp"
@ -2853,6 +2863,15 @@ dependencies = [
"bitflags 2.13.2",
]
[[package]]
name = "nucleo-matcher"
version = "0.3.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "bf33f538733d1a5a3494b836ba913207f14d9d4a1d3cd67030c5061bdd2cac85"
dependencies = [
"memchr",
]
[[package]]
name = "num-conv"
version = "0.2.2"