025-symbol-resolution-feature-gate
Feature-gate tree-sitter symbol/module resolution for dependency-free embedding
Adds a default-enabled `symbol-resolution` cargo feature to `spec-spine-core` that gates the tree-sitter dependency tree (tree-sitter + the Rust/TypeScript grammars) and the symbol/module resolution code. The CLI and `spec-spine index` keep default features, so adopter and self-governance behavior is byte-for-byte unchanged. Library consumers that read only the committed shards (`load_committed_registry` / `load_committed_index`) can build with `default-features = false` to drop tree-sitter entirely, which removes a hard blocker: tree-sitter declares `links = "tree-sitter"`, so a host workspace that pins a different tree-sitter (e.g. an analysis crate on `^0.26` while this crate pins `=0.25.10`) cannot otherwise resolve a single lockfile, and adding `spec-spine-core` anywhere in that workspace fails resolution before compilation. The seam is minimal: the `SymbolIndex` / `ModuleIndex` types and their `resolve` lookups are plain `BTreeMap` wrappers (no tree-sitter) and stay compiled, so the index resolver, its readers, and `compile()` build with the feature off; only the `build_*` functions and their parse helpers are gated. No DTO, JSON Schema, or `INDEX_SCHEMA_VERSION` change: the on-disk index shape is identical. Filed off the OAP spec-217 engine-swap work, which is blocked workspace-wide by exactly this `links` clash across its eight planned read-path consumers.
Read the full pinned specification ↗Relationships
Claimed units
- extends
{ "nature": "additive", "spec": "004-codebase-index", "unit": { "kind": "file", "path": "crates/spec-spine-core/src/symbols.rs" } } - extends
{ "nature": "additive", "spec": "004-codebase-index", "unit": { "kind": "file", "path": "crates/spec-spine-core/src/index.rs" } } - extends
{ "nature": "additive", "spec": "004-codebase-index", "unit": { "kind": "file", "path": "crates/spec-spine-core/tests/index.rs" } }
Source headings
- 025: Feature-gate symbol/module resolution
- 1. Purpose
- 2. Territory
- 3. Behavior
- 3.1 The feature
- 3.2 Feature on (default)
- 3.3 Feature off (`default-features = false`)
- 4. Functional requirements
- 5. Acceptance criteria
- 6. Out of scope
Frozen anchors
No frozen anchors declared.