Serve reflection hover from a recorded snapshot
Per the user's decision, the launcher accepts --reflection-snapshot and the server parses the versioned snapshot at startup. reflection::hover_at selects the innermost entity whose provenance covers a position and returns its bounded virtual view; hover falls back to it after compiler occurrence hover, converting the client position because reflection columns are bytes. Registered reflection tests grew to 25 cases, and a real stdio session returned the Markdown view with source links inside the recorded range and null outside it.
This commit is contained in:
1 parent
62d6ad01e8
commit
7acbfc4029
11 files changed
+148
-9
No files matched your search
@@ -12,6 +12,7 @@ missing part. Updated December 5, 2026 after semantic tokens and inlay hints.
|
||||
| textDocument sync (full + incremental, UTF-8/UTF-16) | document suite, real stdio corpora |
|
||||
| publishDiagnostics (stock GCC, in-process default profile) | diagnostic suite, stdio corpus |
|
||||
| textDocument/hover, definition | stock occurrence corpus |
|
||||
| textDocument/hover over reflection snapshots | recorded-snapshot stdio session |
|
||||
| textDocument/references, prepareRename, rename | navigation suite, stock corpus refusals |
|
||||
| textDocument/completion (+ completionItem/resolve) | `vls_feature_tests`, real stdio session |
|
||||
| textDocument/signatureHelp | `vls_feature_tests`, real stdio session |
|
||||
@@ -39,7 +40,6 @@ missing part. Updated December 5, 2026 after semantic tokens and inlay hints.
|
||||
| callHierarchy / typeHierarchy | prepare, incomingCalls and outgoingCalls are implemented and served; outgoing calls are verified over stdio now that the observer reports full function extents. Type hierarchy is open. |
|
||||
| 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 |
|
||||
| `EditorDiagnostics` reflection LSP wiring | the server has no reflection data source |
|
||||
| richer token types | legend is one type (`function`) plus a `declaration` modifier; type tokens need compiler-provided spans |
|
||||
| textDocument/formatting | no formatter is available; needs a dependency decision |
|
||||
|
||||
|
||||
@@ -103,7 +103,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 and same-file definition names, the latter with a declaration modifier, under a bounded 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. Document links resolve quoted includes to existing files without the compiler. Code lenses show index reference counts and the `vls.showReferences` command resolves them to navigation locations. Call hierarchy serves prepare and incoming calls (grouped by enclosing definition or explicitly by file) from the stock call facts. Outgoing calls are served and verified: the stock observer now reports full function extents, so nested calls are attributed to the enclosing definition. 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 and same-file definition names, the latter with a declaration modifier, under a bounded 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. Reflection hover is served from a recorded snapshot file selected at launch, with the client position converted through the document snapshot. Document links resolve quoted includes to existing files without the compiler. Code lenses show index reference counts and the `vls.showReferences` command resolves them to navigation locations. Call hierarchy serves prepare and incoming calls (grouped by enclosing definition or explicitly by file) from the stock call facts. Outgoing calls are served and verified: the stock observer now reports full function extents, so nested calls are attributed to the enclosing definition. 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
|
||||
|
||||
@@ -79,6 +79,26 @@ 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 reflection hover from a recorded snapshot
|
||||
|
||||
Per the user's decision, `EditorDiagnostics` reflection data now comes from a
|
||||
recorded snapshot file: the launcher accepts `--reflection-snapshot PATH`
|
||||
(absolute existing file, requires a workspace root) and the server parses it
|
||||
with the versioned `reflection::Snapshot::parse` at startup.
|
||||
`reflection::hover_at` selects the innermost entity whose provenance chain
|
||||
covers a position and returns its bounded virtual view, and the server's hover
|
||||
falls back to it after compiler-occurrence hover (converting the client position
|
||||
through the document snapshot because reflection columns are bytes). A
|
||||
malformed snapshot is ignored rather than served partially.
|
||||
|
||||
Real stdio session with a recorded entity covering `main.cpp:0:8-0:13`:
|
||||
```
|
||||
hover inside: {"contents": {"kind": "markdown", "value": "```text\nReady : Ready\n value : int = 17\n```\n\nSources:\n- `.../main.cpp:0:8`\n"}}
|
||||
hover outside: null
|
||||
```
|
||||
Registered `vls_reflection_tests` grew to 25 cases. All 18 native suites and
|
||||
all 18 CMake tests passed.
|
||||
|
||||
## December 5 document links for includes
|
||||
|
||||
`include/vls/features/DocumentLinks.hpp` resolves quoted include directives
|
||||
|
||||
Reference in new issue
Block a user