Serve call hierarchy from stock call facts

prepareCallHierarchy returns the callee definition as one item, and
callHierarchy/incomingCalls groups resolved call sites by the
innermost compiler-proven enclosing definition, falling back to an
explicit file-level caller. The server advertises
callHierarchyProvider. A real stdio session with the stock observer
prepared fnv1a64 (Hash.hpp) and reported one incoming call from
DocumentSnapshot.cpp.
This commit is contained in:
faumaray committed 2026-12-05 16:48:05 +03:00
1 parent 555ccecd65
commit cec4e7d717
6 files changed
+166 -2

No files matched your search

+1 -1
View File
@@ -34,7 +34,7 @@ missing part. Updated December 5, 2026 after semantic tokens and inlay hints.
| Compiler-native completion with visibility proof | index-backed completion is explicitly incomplete |
| Overload-set signature help | only the selected occurrence's signature is available |
| textDocument/formatting | needs a plan |
| callHierarchy / typeHierarchy | incoming-call core is implemented and tested (`vls_features::call_hierarchy`); server wiring and type hierarchy are open |
| callHierarchy / typeHierarchy | callHierarchy prepare + incomingCalls are implemented and verified over stdio; type hierarchy and outgoing calls are open |
| textDocument/codeLens, executeCommand | command surface not designed |
| Client-side application of server-issued workspace edits | rename and code actions return edits the clients apply directly |
| Applying multi-file renames through client buffers | plans can be ready; application is client work |
+1 -1
View File
@@ -102,7 +102,7 @@ ingests occurrence facts after each analysis and the server answers
Hash.hpp definition through it. Real persistence migrations and cross-file
rename coverage remain open.
Index-backed completion (roadmap 14 first slice) is implemented: `include/vls/features/Completion.hpp`, `src/features/Completion.cpp` and registered `vls_feature_tests` cover prefix extraction, filtering with replacement ranges, label+kind deduplication, deterministic ranking and bounds. `Server.cpp` advertises `completionProvider` and answers `textDocument/completion` from the symbol index through `EditorDiagnostics::completion`; a real stdio session with the stock observer returned `fnv1a64` and `fnv1a64_update` at a real call site. Every result is marked incomplete because the index does not prove visibility. Signature help is now served from the compiler-provided occurrence signature (parameter labels and ranges, active parameter, innermost call selection) and advertised by the server. Document symbols are served from the index by path and document highlights from same-binding occurrence facts; both are advertised and were exercised over stdio with the stock observer. Selection and folding ranges are served from immutable document snapshots with registered bounded cores. Code actions now offer the compiler's own suggested fixes (quickfix) from retained published diagnostics, with SARIF fix decoding bound to the owner snapshot. Semantic tokens encode the proven call occurrences with a bounded one-type legend. Inlay hints project parameter types from the occurrence signature at each argument start. Workspace file-operation notifications invalidate dependent index contexts and re-queue open documents. A will-rename request returns the include updates for open documents. Compiler-native completion with visibility proof and deferred detail resolution remain open.
Index-backed completion (roadmap 14 first slice) is implemented: `include/vls/features/Completion.hpp`, `src/features/Completion.cpp` and registered `vls_feature_tests` cover prefix extraction, filtering with replacement ranges, label+kind deduplication, deterministic ranking and bounds. `Server.cpp` advertises `completionProvider` and answers `textDocument/completion` from the symbol index through `EditorDiagnostics::completion`; a real stdio session with the stock observer returned `fnv1a64` and `fnv1a64_update` at a real call site. Every result is marked incomplete because the index does not prove visibility. Signature help is now served from the compiler-provided occurrence signature (parameter labels and ranges, active parameter, innermost call selection) and advertised by the server. Document symbols are served from the index by path and document highlights from same-binding occurrence facts; both are advertised and were exercised over stdio with the stock observer. Selection and folding ranges are served from immutable document snapshots with registered bounded cores. Code actions now offer the compiler's own suggested fixes (quickfix) from retained published diagnostics, with SARIF fix decoding bound to the owner snapshot. Semantic tokens encode the proven call occurrences with a bounded one-type legend. Inlay hints project parameter types from the occurrence signature at each argument start. Workspace file-operation notifications invalidate dependent index contexts and re-queue open documents. A will-rename request returns the include updates for open documents. Call hierarchy serves prepare and incoming calls (grouped by enclosing definition or explicitly by file) from the stock call facts. Compiler-native completion with visibility proof and deferred detail resolution remain open.
The reflection provenance representation (roadmap 12 first slice) is
implemented as a bounded library with a registered suite: innermost-first
+19
View File
@@ -79,6 +79,25 @@ the upgraded snapshot (keeping `snapshot.prev.json`) and rewrites a legacy
about 25-30s in a Debug build (it passed VBS at ~27s); the full CMake run then
passed 18/18.
## December 5 call hierarchy over LSP
`EditorDiagnostics::call_hierarchy_prepare` turns a covering occurrence with a
definition into one `CallHierarchyItem` (callee name, definition URI and range,
data carrying the full definition span). `call_hierarchy_incoming` feeds every
known occurrence and definition into the bounded core
(`vls/features/CallHierarchy.hpp`) and renders `CallHierarchyIncomingCall`
entries grouped by the innermost enclosing definition, or explicitly at file
level (kind File) when none contains the call. The server advertises
`callHierarchyProvider` and serves `textDocument/prepareCallHierarchy` and
`callHierarchy/incomingCalls`.
Real stdio session with the stock observer at the `fnv1a64(text)` call:
```
prepareCallHierarchy: 1 first: [('fnv1a64', 'Hash.hpp')]
incomingCalls: 1 first: [('DocumentSnapshot.cpp', 1, 1)]
```
All 18 native suites and all 18 CMake tests passed.
## December 5 include updates on file rename
`include/vls/features/IncludeUpdate.hpp` finds quoted include directives that