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:
faumaray committed 2026-12-05 20:46:41 +03:00
1 parent 62d6ad01e8
commit 7acbfc4029
11 files changed
+148 -9

No files matched your search

+20
View File
@@ -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