Rename the tool to lucisv (Language Utility for Coding In SystemVerilog)
This commit is contained in:
1 parent
a284e33110
commit
eeaffafd56
188 files changed
+2825
-2802
No files matched your search
@@ -8,7 +8,7 @@ milestone taken from that plan's "LSP-parity and plumbing gaps" triage.
|
||||
Three navigation capabilities that were all wiring over machinery the tree
|
||||
already had. **Cross-file find-all-references**: `textDocument/references`
|
||||
answered in-file only, while M2's rename had been collecting cross-file
|
||||
reference sets since it shipped — so vfmt could *change* references it could
|
||||
reference sets since it shipped — so lucisv could *change* references it could
|
||||
not *list*. **Document highlight for symbols**: the cursor on a signal now
|
||||
highlights its declaration and every use in the file, where before only a
|
||||
`begin`/`end` pair answered and everything else fell through to the editor's
|
||||
@@ -28,7 +28,7 @@ predicate, and three handlers.
|
||||
layer. Consequence: a declaration the index has not seen yet (a buffer
|
||||
edited but not saved, when the file is new) is answered in-file until the
|
||||
next rebuild. That is the same staleness window every other cross-file
|
||||
answer already has, documented in `docs/features/vfmt-server/README.md`.
|
||||
answer already has, documented in `docs/features/lucisv-server/README.md`.
|
||||
- **A references answer costs what a rename costs.** The cross-file path calls
|
||||
`Workspace::sources()`, which re-reads every in-scope file, and then
|
||||
re-analyzes the files that spell the name. Measured at 218 ms over the
|
||||
@@ -80,10 +80,10 @@ out of `collect_edits`, which now calls it and turns the spans into edits.
|
||||
spans. The alternative considered was lifting the walk into `vlog_semantic`;
|
||||
it was rejected because the walk is not a semantic query — it needs the
|
||||
`Scope` cache, the workspace overlay *per file*, and the ambiguity policy,
|
||||
all of which are refactor-crate concerns, and `vfmt_server` already depends
|
||||
all of which are refactor-crate concerns, and `lucisv_server` already depends
|
||||
on `vlog_refactor`. Copy-pasting the walk into the server was never on the
|
||||
table: a references list that disagreed with what a rename would touch is a
|
||||
lie about what vfmt is going to do.
|
||||
lie about what lucisv is going to do.
|
||||
|
||||
**Consumed from `vlog_semantic`** (all pre-existing, nothing requested):
|
||||
`Semantics::{reference_at, reference_id_at, references_of, symbol, symbol_at,
|
||||
@@ -96,7 +96,7 @@ scope}`, `Scope::owner`, `Symbol::{name, scope, name_span}`,
|
||||
|
||||
**Consumed from this crate's own `pairs.rs`**: `analyze(&[Token]) ->
|
||||
ScopeAnalysis`, unchanged. `folding.rs` is its fourth consumer
|
||||
(`documentHighlight`, the missing-closer warnings, `vfmt/scopePairs`, folding)
|
||||
(`documentHighlight`, the missing-closer warnings, `lucisv/scopePairs`, folding)
|
||||
and reads only `pairs`, never `unmatched_open`/`unmatched_close`.
|
||||
|
||||
**Promised to the editors**: nothing new to configure. `foldingRange` is a
|
||||
@@ -123,7 +123,7 @@ and none was made.
|
||||
- [x] `foldingRangeProvider` advertised in `main.rs`.
|
||||
- [x] e2e: one session covering cross-file references (both
|
||||
`includeDeclaration` values), `foldingRange` and `documentHighlight`.
|
||||
- [x] `docs/features/vfmt-server/README.md`: capability table, the "not done"
|
||||
- [x] `docs/features/lucisv-server/README.md`: capability table, the "not done"
|
||||
list, and Handshakes updated.
|
||||
- [ ] **Not done, deliberately:** line-comment run folding (`//` blocks). The
|
||||
token stream carries each `//` comment separately, so folding a *run* of
|
||||
@@ -145,7 +145,7 @@ and none was made.
|
||||
### 2026-08-24 — dev agent (M7)
|
||||
|
||||
- **Read first**: `CLAUDE.md`, `docs/features/refactor/README.md`'s triage,
|
||||
`docs/features/vfmt-server/README.md` in full, then `nav.rs`, `pairs.rs`,
|
||||
`docs/features/lucisv-server/README.md` in full, then `nav.rs`, `pairs.rs`,
|
||||
`state.rs`, `server.rs`, `main.rs`, `vlog_refactor/src/rename.rs` and
|
||||
`vlog_semantic`'s `workspace.rs`/`model.rs`. The design decisions below all
|
||||
came out of that reading rather than out of the brief.
|
||||
@@ -169,7 +169,7 @@ and none was made.
|
||||
- **`documentHighlight` gained a second answer rather than a second
|
||||
handler.** `pairs::highlights` is tried first and `nav::document_highlights`
|
||||
second; both return `Option`, and both `None` means `null`, which is what
|
||||
keeps the editor's own word highlighting alive where vfmt knows nothing.
|
||||
keeps the editor's own word highlighting alive where lucisv knows nothing.
|
||||
The two never compete: a scope keyword is never an identifier.
|
||||
- **Folding stops one line short of the closer** (`endLine = close line - 1`).
|
||||
LSP hides `startLine + 1 ..= endLine`, so this leaves `end`/`endmodule` on
|
||||
@@ -194,20 +194,20 @@ and none was made.
|
||||
inside the 1 s budget the brief set.
|
||||
- **No new dependencies.** No `unsafe`, no `unwrap`/`expect`/`panic!` outside
|
||||
`#[cfg(test)]`, no new `#[allow]`.
|
||||
- Did not touch `vlog_parser`, `vlog_formatter`, `vlog_linter`, `vfmt_core`,
|
||||
`crates/vfmt`, `editors/`, `TODO.md` or the umbrella plan. Did not run
|
||||
- Did not touch `vlog_parser`, `vlog_formatter`, `vlog_linter`, `lucisv_core`,
|
||||
`crates/lucisv`, `editors/`, `TODO.md` or the umbrella plan. Did not run
|
||||
`git commit`/`git push`. No version bump (0.5.0 is M14's).
|
||||
|
||||
**Results.** `cargo fmt --all -- --check`: clean. `cargo clippy --all-targets`:
|
||||
0 warnings. `cargo test --workspace`: **1329 passed, 0 failed**, of which **34 are new**:
|
||||
15 in `folding.rs`, 11 added to `nav.rs` (20 there in total), 7 in
|
||||
`references.rs`, and 1 e2e (18 in that file now).
|
||||
`node editors/vscode/smoke.js target/release/vfmt-server`: OK.
|
||||
`node editors/vscode/smoke.js target/release/lucisv-server`: OK.
|
||||
Files added: `crates/vlog_refactor/src/references.rs`,
|
||||
`crates/vfmt_server/src/folding.rs`, this README. Files edited:
|
||||
`crates/lucisv_server/src/folding.rs`, this README. Files edited:
|
||||
`crates/vlog_refactor/src/{lib.rs,rename.rs}`,
|
||||
`crates/vfmt_server/src/{main.rs,server.rs,nav.rs}`,
|
||||
`crates/vfmt_server/tests/e2e.rs`, `docs/features/vfmt-server/README.md`.
|
||||
`crates/lucisv_server/src/{main.rs,server.rs,nav.rs}`,
|
||||
`crates/lucisv_server/tests/e2e.rs`, `docs/features/lucisv-server/README.md`.
|
||||
|
||||
## QA log
|
||||
|
||||
@@ -221,7 +221,7 @@ Files added: `crates/vlog_refactor/src/references.rs`,
|
||||
- `cargo test --workspace` — **1329 passed, 0 failed**, matching the Work
|
||||
log's count exactly, before I added one regression test (see below); 1330
|
||||
after.
|
||||
- `node editors/vscode/smoke.js target/release/vfmt-server` — OK.
|
||||
- `node editors/vscode/smoke.js target/release/lucisv-server` — OK.
|
||||
- `cargo test -p vlog_refactor` standalone — **48/48** rename behavior tests
|
||||
green (`tests/rename.rs`), confirming the `collect_edits`/
|
||||
`collect_occurrences` split changed nothing rename depends on.
|
||||
@@ -270,7 +270,7 @@ removed after the round, not committed) exercising the public API directly:
|
||||
`find_references(..., include_declaration: true)` are **identical** after
|
||||
sorting. Spot-checked in code, not just eyeballed.
|
||||
|
||||
#### Attempts to break it (`vfmt_server::nav`, handler level)
|
||||
#### Attempts to break it (`lucisv_server::nav`, handler level)
|
||||
|
||||
Six scratch tests added temporarily to `nav.rs`'s own test module, run, then
|
||||
removed (`git diff --stat` on `nav.rs` returned to the dev's exact
|
||||
@@ -310,7 +310,7 @@ removed (`git diff --stat` on `nav.rs` returned to the dev's exact
|
||||
|
||||
**Fix applied (small, unambiguous per CLAUDE.md's QA license):** added
|
||||
`a_name_declared_in_two_files_degrades_references_to_the_in_file_answer` to
|
||||
`crates/vfmt_server/src/nav.rs` (permanent, not a probe) — the one claim
|
||||
`crates/lucisv_server/src/nav.rs` (permanent, not a probe) — the one claim
|
||||
above that had behavior verified correct but zero regression coverage.
|
||||
Workspace test count is now 1330 (was 1329), gates re-run green after the
|
||||
addition.
|
||||
@@ -404,13 +404,13 @@ is a completely ordinary real-world query, not an edge case.
|
||||
"820 source files indexed"; the Assumptions section separately says "the
|
||||
860-file corpus". A plain `find` over `corpus/` for `.v`/`.sv`/`.svh`/`.vh`
|
||||
returns exactly **860**, matching every earlier round's number for this same
|
||||
directory (`docs/features/vfmt-server/README.md`'s QA log, 2026-08-19: "860
|
||||
directory (`docs/features/lucisv-server/README.md`'s QA log, 2026-08-19: "860
|
||||
files"). `corpus/` itself is listed in the repo's own `.gitignore`, but the
|
||||
LSP root was pointed *at* `corpus/`, so that rule is moot; however `corpus/`
|
||||
contains **19 nested `.gitignore` files** from the vendored upstream repos
|
||||
themselves (`corpus/ibex/.gitignore`, `corpus/opentitan/.gitignore`, etc.),
|
||||
and the workspace walk has honored `.gitignore` unconditionally since
|
||||
`vfmt-core-lift` landed the same day as this round. So 820 vs. 860 is
|
||||
`lucisv-core-lift` landed the same day as this round. So 820 vs. 860 is
|
||||
plausibly real — some vendored generated/build files are legitimately
|
||||
excluded now that they weren't when the 860 number was first measured — but
|
||||
I could not independently confirm 820 exactly: LSP exposes no
|
||||
|
||||
Reference in new issue
Block a user