Cross-file references reach a module's nets, variables and instances (§64.1, QA task_d8afe80f of §63.1): nav.rs's two index questions (leaves_this_file, indexed_def_in_file, the latter shared with hover's live_symbol) asked WorkspaceIndex::member — the connection surface, ports and parameters — so a declaration only a hierarchical path can name (a bind connection's expression half, a u_x.sig tail) was judged unable to leave its file and references fell to the single-file answer, while a rename already edited both files; from a use that did resolve cross-file, the declaring buffer's own uses could not re-identify themselves. Both now ask member_in(…, Surface::Hierarchical); the connection answer comes first and whole from that read, so every port/parameter/package/class/struct answer is byte-identical (nav harness controls and a 948-declaration opentitan census). A hierarchical-only member has no Local postings by the §49 ruling, so nav::declaring_file_uses parses exactly the closed declaring file once per request (0.4–1.5 ms on state_q into a shut entropy_src_main_sm.sv), hierarchical_only asking the index's own table rather than restating surface_of. Three QA rounds (Sonnet, Sonnet, then Fable per the escalation rule): the closed-file path read a cached FileView and rendered against a fresh text_of (a stale offset on a wrong line) — now one fresh read per closed file threaded to the rendering step; every index-time span about a closed file, and the open-buffer declaration fallback (nav::declaration_site), guarded by hover::spells_exactly (pub(crate), shared not copied): a stale index may omit a location, never mislocate one. Accepted: +25 % on a local-net references in a 40 267-line buffer (1.22 → 1.54 ms), the guard is textual (a different exact token at a deleted declaration's old bytes). opentitan: entropy_masking_req from aes.sv now lists aes_bind.sv; state_q lists entropy_src_core.sv; checkout untouched. Tests 4422 → 4459 (11 dev + 1 hover + 1 e2e wire test; 19 QA attacks incl. escaped identifiers, UTF-8 boundaries, a deleted declaring file, oracle equivalence with vlog_refactor::find_references); fmt, clippy, workspace suite green through tools/guard.sh. Feature README docs/features/references-hierarchical-surface; references-nav, hierarchical-tail and hover-declarations READMEs, record.rs's postings comment and the topo row amended; perf entry in docs/perf/README.md. Release 0.55.0 left to the owner.
Co-Authored-By: Claude Fable 5.1 <[email protected]>
This commit is contained in:
1 parent
9d1eb1671e
commit
a2a22adad8
11 files changed
+3163
-126
No files matched your search
@@ -142,6 +142,17 @@ The character cap counts `char`s and cuts on a boundary.
|
||||
|
||||
## Work log
|
||||
|
||||
### 2026-09-12 — dev (§64.1: `spells_exactly` is now `pub(crate)`)
|
||||
|
||||
Visibility only, no behaviour change here. `nav.rs` needed the same
|
||||
agreement check for a closed file's *span* that this feature applies to a
|
||||
closed file's *snippet* — after §64.1 an index-time `references` span can be
|
||||
rendered against bytes that moved — and QA's lesson above (a fixed-length
|
||||
span still spelling the old name as a **prefix** of a longer identifier) is
|
||||
exactly the case a second copy of the check would have got wrong. So
|
||||
`hover::spells_exactly` is shared rather than duplicated; see
|
||||
`docs/features/references-hierarchical-surface/README.md`.
|
||||
|
||||
### 2026-08-27 — dev
|
||||
|
||||
- Read the brief, `hover.rs`, `nav.rs`, `state.rs` and `convert.rs`. Confirmed
|
||||
|
||||
Reference in new issue
Block a user