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
@@ -2,15 +2,15 @@
|
||||
|
||||
## Goal
|
||||
|
||||
`vfmt check` has existed since round 11 and the language server has published
|
||||
`lucisv check` has existed since round 11 and the language server has published
|
||||
parse errors since the same round, but the two never met: an editor running
|
||||
`vfmt-server` saw syntax errors and nothing else, while CI running `vfmt check`
|
||||
`lucisv-server` saw syntax errors and nothing else, while CI running `lucisv check`
|
||||
saw seven rules' worth of findings. This round wires `vlog_linter` into
|
||||
`vfmt_server` so the editor shows what CI will say — lint findings as
|
||||
`lucisv_server` so the editor shows what CI will say — lint findings as
|
||||
**warnings** alongside the parse **errors**, in **one** `publishDiagnostics` per
|
||||
change — and adds `textDocument/codeAction`: a quick fix per Safe fix, and a
|
||||
`source.fixAll.vfmt` action for fix-on-save. Nothing about the linter changed;
|
||||
this is protocol-layer wiring, which is all `vfmt_server` is allowed to be.
|
||||
`source.fixAll.lucisv` action for fix-on-save. Nothing about the linter changed;
|
||||
this is protocol-layer wiring, which is all `lucisv_server` is allowed to be.
|
||||
|
||||
## Assumptions
|
||||
|
||||
@@ -28,14 +28,14 @@ this is protocol-layer wiring, which is all `vfmt_server` is allowed to be.
|
||||
- **A lint finding is a `Warning`, a parse error stays an `Error`.** The linter
|
||||
has opinions; the parser reports the file not being Verilog. `code` is the
|
||||
rule's stable kebab-case name — the string the user needs to write a waiver or
|
||||
an `--ignore`, and the string a code action matches on. `source` is `"vfmt"`
|
||||
an `--ignore`, and the string a code action matches on. `source` is `"lucisv"`
|
||||
for both, as before.
|
||||
- **The linter is handed the URI's own path**, so `module-filename` can speak.
|
||||
It is the one default rule that needs a file name; without the path it goes
|
||||
quiet, which would have made the editor disagree with CI on exactly the rule
|
||||
whose whole subject is the file name. An `untitled:` buffer genuinely has no
|
||||
path and genuinely gets no `module-filename` finding — the same behavior as
|
||||
`vfmt check` on stdin without `--stdin-filename`.
|
||||
`lucisv check` on stdin without `--stdin-filename`.
|
||||
- **The document is parsed twice per change, and that is a known cost, not an
|
||||
oversight.** `Document::new` parses for the server, and `LintContext::new`
|
||||
parses again inside the linter. `linter-core`'s own Handshakes file this as
|
||||
@@ -57,7 +57,7 @@ this is protocol-layer wiring, which is all `vfmt_server` is allowed to be.
|
||||
code (`quick_fix` returns `None` for anything not `Applicability::Safe`) and
|
||||
in `apply_fixes(.., include_unsafe = false)` for the fix-all path, not just
|
||||
stated here.
|
||||
- **`source.fixAll.vfmt` is one pass, deliberately.** `vfmt check --fix` loops
|
||||
- **`source.fixAll.lucisv` is one pass, deliberately.** `lucisv check --fix` loops
|
||||
fix → re-lint until nothing changes, because a single pass skips any fix
|
||||
overlapping one already applied (the everyday case is a line ending in a tab,
|
||||
which `no-tabs` and `no-trailing-whitespace` both want to rewrite). The server
|
||||
@@ -72,33 +72,33 @@ this is protocol-layer wiring, which is all `vfmt_server` is allowed to be.
|
||||
interleave two fixes in a way the linter's own skip rule would have refused.
|
||||
It matches what `textDocument/formatting` already sends, so no client is
|
||||
surprised by the shape.
|
||||
- **A quick fix's tab-expansion width comes from `vfmt.toml`.** A code-action
|
||||
- **A quick fix's tab-expansion width comes from `lucisv.toml`.** A code-action
|
||||
request carries no `FormattingOptions`, so unlike formatting there is no
|
||||
client `tabSize` in play: the precedence is `vfmt.toml` > the built-in
|
||||
client `tabSize` in play: the precedence is `lucisv.toml` > the built-in
|
||||
default, via `format::indent_width`. Without this, a project with `indent = 4`
|
||||
would get a quick fix inserting two spaces that format-on-save then rewrites —
|
||||
precisely the CLI/editor divergence `vfmt-core-lift` exists to prevent. The
|
||||
precisely the CLI/editor divergence `lucisv-core-lift` exists to prevent. The
|
||||
diagnostics path does not do this lookup: it never reads a fix, so it would be
|
||||
a config file read per keystroke bought for nothing.
|
||||
- **A broken `vfmt.toml` is silent on the code-action path.** The formatting
|
||||
path already warns once per file change (`vfmt-core-lift`); warning again from
|
||||
- **A broken `lucisv.toml` is silent on the code-action path.** The formatting
|
||||
path already warns once per file change (`lucisv-core-lift`); warning again from
|
||||
a lightbulb an editor requests on every cursor move would train the user to
|
||||
ignore vfmt's messages. The fix falls back to the built-in indent width.
|
||||
ignore lucisv's messages. The fix falls back to the built-in indent width.
|
||||
- **The client's `context.only` filter is honored here rather than left to the
|
||||
client.** The spec permits a server to return everything and let the client
|
||||
filter, but fix-on-save asks for `source.fixAll.vfmt` alone, and computing
|
||||
filter, but fix-on-save asks for `source.fixAll.lucisv` alone, and computing
|
||||
every quick fix for a request that discards them is work nobody reads.
|
||||
Filtering is hierarchical, as the spec says: `source` selects
|
||||
`source.fixAll.vfmt`.
|
||||
`source.fixAll.lucisv`.
|
||||
- **A quick fix is offered when its diagnostic range *touches* the requested
|
||||
range.** A cursor sitting on the first character of a warning is asking about
|
||||
that warning; an empty requested range (a bare cursor) is the normal case.
|
||||
- **Waivers, fences and rule selection are the linter's business, not this
|
||||
crate's.** A `// vfmt: waive no-tabs` suppresses the diagnostic and therefore
|
||||
crate's.** A `// lucisv: waive no-tabs` suppresses the diagnostic and therefore
|
||||
the lightbulb, because the finding never reaches this crate. **Note the one
|
||||
asymmetry with the CLI:** `vfmt check --fix` additionally refuses to fix
|
||||
asymmetry with the CLI:** `lucisv check --fix` additionally refuses to fix
|
||||
inside a `// verilog_format: off` fence, and that refusal lives in
|
||||
`crates/vfmt/src/lint.rs`, not in `vlog_linter` — so it is **not** inherited
|
||||
`crates/lucisv/src/lint.rs`, not in `vlog_linter` — so it is **not** inherited
|
||||
here. See Status/TODO; it is the one honest gap this round leaves.
|
||||
~~not inherited here~~ **Inherited as of shared-fence-filter (round 14): the
|
||||
filter moved to `vlog_formatter::fence` and this crate calls it.**
|
||||
@@ -125,12 +125,12 @@ waivers), `run` **never panics and never writes**, and findings come back
|
||||
**sorted by `(span.start, span.end, rule)`** — all three are promises in
|
||||
`docs/features/linter-core/README.md`'s Handshakes.
|
||||
|
||||
**Consumed from `vfmt_core`** — nothing new: `format::indent_width` reuses the
|
||||
**Consumed from `lucisv_core`** — nothing new: `format::indent_width` reuses the
|
||||
existing private `discover`, which is `Discovery::for_file`.
|
||||
|
||||
**Promised to nobody.** `vfmt_server` is still a leaf binary with no library
|
||||
**Promised to nobody.** `lucisv_server` is still a leaf binary with no library
|
||||
target. `editors/**` was not touched: a client needs no change to receive lint
|
||||
diagnostics, and `editor.codeActionsOnSave` naming `source.fixAll.vfmt` is a
|
||||
diagnostics, and `editor.codeActionsOnSave` naming `source.fixAll.lucisv` is a
|
||||
user setting, not an extension one.
|
||||
|
||||
**Requested of others — not done here:**
|
||||
@@ -142,14 +142,14 @@ user setting, not an extension one.
|
||||
file that changes.
|
||||
**Delivered by one-parse (round 19) — `lint.rs` was indeed the one file
|
||||
(plus `Document` gaining its `tree` field).**
|
||||
2. *linter-core / config-discovery*: **a `lint` key in `vfmt.toml`.** The server
|
||||
2. *linter-core / config-discovery*: **a `lint` key in `lucisv.toml`.** The server
|
||||
runs `default_rules()` and nothing else, because there is no configured rule
|
||||
set to read — `--select`/`--ignore` are CLI-only. When `lint = [...]` lands,
|
||||
`lint.rs` should resolve it through the same `Discovery` the formatter uses,
|
||||
with the same anchored-at-the-document rule.
|
||||
3. *lead*: **the fence gap.** `vfmt check --fix` will not rewrite bytes inside a
|
||||
3. *lead*: **the fence gap.** `lucisv check --fix` will not rewrite bytes inside a
|
||||
`// verilog_format: off` region, but that filter lives in
|
||||
`crates/vfmt/src/lint.rs` (it needs `vlog_formatter::fence`, which the linter
|
||||
`crates/lucisv/src/lint.rs` (it needs `vlog_formatter::fence`, which the linter
|
||||
crate deliberately does not depend on). This round did not duplicate it — a
|
||||
third copy of "what is fenced" is exactly how the three answers drift — so a
|
||||
quick fix in this server *can* edit inside a fence. Reported honestly rather
|
||||
@@ -161,7 +161,7 @@ user setting, not an extension one.
|
||||
is now the one answer both front ends call, and `lint::fixable` withholds
|
||||
any fix that would edit a fenced byte — reported, never auto-fixed, exactly
|
||||
as the CLI.**
|
||||
4. *lead*: **`TODO.md:353` is now stale.** §6's `vfmt_server` entry still lists
|
||||
4. *lead*: **`TODO.md:353` is now stale.** §6's `lucisv_server` entry still lists
|
||||
"lint diagnostics (waits on `vlog_linter`)" under **Not shipped**. TODO.md is
|
||||
outside this round's stated scope, so it was left alone rather than edited;
|
||||
the checkbox itself is already `[x]` and needs no flip.
|
||||
@@ -171,7 +171,7 @@ user setting, not an extension one.
|
||||
| LSP request | Engine it consumes | Notes |
|
||||
|---|---|---|
|
||||
| `textDocument/publishDiagnostics` | `vlog_parser::parse_source_tolerant` **+ `vlog_linter::run`** | One publish per change carrying both: parse errors as `Error`, lint findings as `Warning` with `code` = rule name |
|
||||
| `textDocument/codeAction` | `vlog_linter` fixes | `quickfix` per Safe fix (`isPreferred`, `diagnostics` populated); one `source.fixAll.vfmt` whole-document edit |
|
||||
| `textDocument/codeAction` | `vlog_linter` fixes | `quickfix` per Safe fix (`isPreferred`, `diagnostics` populated); one `source.fixAll.lucisv` whole-document edit |
|
||||
|
||||
The `initialize` diff is exactly one field:
|
||||
|
||||
@@ -179,7 +179,7 @@ The `initialize` diff is exactly one field:
|
||||
code_action_provider: Some(CodeActionProviderCapability::Options(CodeActionOptions {
|
||||
code_action_kinds: Some(vec![
|
||||
CodeActionKind::QUICKFIX,
|
||||
CodeActionKind::new("source.fixAll.vfmt"),
|
||||
CodeActionKind::new("source.fixAll.lucisv"),
|
||||
]),
|
||||
work_done_progress_options: WorkDoneProgressOptions::default(),
|
||||
resolve_provider: None,
|
||||
@@ -197,7 +197,7 @@ TODO §2 `--lines`), `completion`, `rename`, `signatureHelp`, and cross-file
|
||||
|
||||
## Status / TODO
|
||||
|
||||
- [x] `vlog_linter` added to `crates/vfmt_server/Cargo.toml` (path dependency;
|
||||
- [x] `vlog_linter` added to `crates/lucisv_server/Cargo.toml` (path dependency;
|
||||
the crate was already a workspace member, so the root `Cargo.toml` needed
|
||||
**no** edit).
|
||||
- [x] `src/lint.rs`: violations for the diagnostics path, violations-with-fixes
|
||||
@@ -206,7 +206,7 @@ TODO §2 `--lines`), `completion`, `rename`, `signatureHelp`, and cross-file
|
||||
- [x] `server.rs`: `publish()` sends that one list; every path that published
|
||||
before (`didOpen`, `didChange`, `didSave`, and the post-save republish of
|
||||
every open buffer) now publishes both sources, unchanged otherwise.
|
||||
- [x] `src/code_action.rs`: quick fixes, `source.fixAll.vfmt`, `context.only`
|
||||
- [x] `src/code_action.rs`: quick fixes, `source.fixAll.lucisv`, `context.only`
|
||||
filtering, range-overlap matching.
|
||||
- [x] `format::indent_width` — the config-governed tab width a fix writes.
|
||||
- [x] `textDocument/codeAction` wired into the request dispatcher.
|
||||
@@ -218,14 +218,14 @@ TODO §2 `--lines`), `completion`, `rename`, `signatureHelp`, and cross-file
|
||||
- [x] e2e through the real binary: one publish carrying two rule codes, the
|
||||
capability's kinds on the wire, quick fixes + fixAll, and a filtered
|
||||
fix-on-save request.
|
||||
- [x] `docs/features/vfmt-server/README.md` deferred list annotated.
|
||||
- [ ] **Not done, deliberately:** rule selection. No `vfmt.toml` `lint` key
|
||||
- [x] `docs/features/lucisv-server/README.md` deferred list annotated.
|
||||
- [ ] **Not done, deliberately:** rule selection. No `lucisv.toml` `lint` key
|
||||
exists (Handshake 2); the server runs `default_rules()`.
|
||||
- [ ] **Not done, deliberately:** offering Unsafe fixes. No rule ships one, and
|
||||
when one does it wants a decision (a separate `source.fixAll` kind? a
|
||||
client setting?), not a silent inclusion.
|
||||
- [x] ~~**Not done:** fence-aware fixes (Handshake 3) — a quick fix can edit
|
||||
inside a `// verilog_format: off` region, where `vfmt check --fix` would
|
||||
inside a `// verilog_format: off` region, where `lucisv check --fix` would
|
||||
not.~~ Delivered by **shared-fence-filter** (round 14).
|
||||
- [ ] **Not done:** `codeAction/resolve`. Every action is cheap to build in
|
||||
full; lazy resolution is a payload optimization for actions that are not.
|
||||
@@ -236,9 +236,9 @@ TODO §2 `--lines`), `completion`, `rename`, `signatureHelp`, and cross-file
|
||||
|
||||
### 2026-08-19 — dev agent
|
||||
|
||||
- Read `CLAUDE.md`, `docs/features/vfmt-server/README.md`,
|
||||
- Read `CLAUDE.md`, `docs/features/lucisv-server/README.md`,
|
||||
`docs/features/linter-core/README.md` and
|
||||
`docs/features/vfmt-core-lift/README.md` in full (QA logs and Reviews
|
||||
`docs/features/lucisv-core-lift/README.md` in full (QA logs and Reviews
|
||||
included) before writing anything, plus `vlog_linter`'s public surface
|
||||
(`lib.rs`, `violation.rs`, `context.rs`, `registry.rs`). No engine crate
|
||||
needed a change, again: every entry point this round wanted was already
|
||||
@@ -254,10 +254,10 @@ TODO §2 `--lines`), `completion`, `rename`, `signatureHelp`, and cross-file
|
||||
- **Two lint entry points, for one honest reason.** `lint::violations` (the
|
||||
diagnostics path) calls `vlog_linter::run` and never looks at a fix, so it
|
||||
does no config work per keystroke. `lint::fixable` (the code-action path)
|
||||
builds a `LintContext` with the tab width of the governing `vfmt.toml`, since
|
||||
builds a `LintContext` with the tab width of the governing `lucisv.toml`, since
|
||||
a fix that writes two spaces into an `indent = 4` project is a fix
|
||||
format-on-save immediately overwrites. The split costs three lines and buys
|
||||
the CLI/editor parity `vfmt-core-lift` was about.
|
||||
the CLI/editor parity `lucisv-core-lift` was about.
|
||||
- **`fixAll` is one pass and says so in a doc comment at the function**, with
|
||||
the reasoning (the client's own edit/re-lint cycle *is* the convergence loop).
|
||||
The tab-and-trailing-whitespace case — the everyday two-round example from
|
||||
@@ -269,7 +269,7 @@ TODO §2 `--lines`), `completion`, `rename`, `signatureHelp`, and cross-file
|
||||
`lint::diagnostic` the publisher uses, so the diagnostic in the action is
|
||||
equal to the one on screen rather than a lookalike reconstructed by hand.
|
||||
- **`context.only` is honored** with hierarchical prefix matching, because
|
||||
fix-on-save requests `source.fixAll.vfmt` alone and would otherwise be handed
|
||||
fix-on-save requests `source.fixAll.lucisv` alone and would otherwise be handed
|
||||
every quick fix in the file to throw away.
|
||||
- **Two clippy warnings fixed by restructuring, not by `#[allow]`**: both were
|
||||
`clippy::mutable_key_type` on a `let`-bound `&HashMap<Uri, Vec<TextEdit>>` in
|
||||
@@ -280,7 +280,7 @@ TODO §2 `--lines`), `completion`, `rename`, `signatureHelp`, and cross-file
|
||||
- No `unwrap`/`expect`/`panic!`/`unsafe` outside `#[cfg(test)]` in any file
|
||||
added or touched.
|
||||
- Did not touch `vlog_linter`, `vlog_parser`, `vlog_formatter`, `vlog_semantic`,
|
||||
`vfmt`, `vfmt_core` or `editors/**`. Root `Cargo.toml` needed no edit —
|
||||
`lucisv`, `lucisv_core` or `editors/**`. Root `Cargo.toml` needed no edit —
|
||||
`vlog_linter` is already a workspace member, so the dependency is one path
|
||||
line in this crate's own manifest (`Cargo.lock` gained the corresponding
|
||||
one-line edge). `TODO.md` left alone per the round's stated scope, with the
|
||||
@@ -288,10 +288,10 @@ TODO §2 `--lines`), `completion`, `rename`, `signatureHelp`, and cross-file
|
||||
|
||||
**Results.**
|
||||
|
||||
- `cargo test -p vfmt_server`: **108 passed, 0 failed** (104 unit + 4 e2e),
|
||||
- `cargo test -p lucisv_server`: **108 passed, 0 failed** (104 unit + 4 e2e),
|
||||
up from 85 (82 + 3). New: 7 in `lint.rs`, 10 in `code_action.rs`, 2 in
|
||||
`diagnostics.rs`, 2 in `format.rs`, 2 in `main.rs`, 1 e2e.
|
||||
- `cargo clippy -p vfmt_server --all-targets`: **0 warnings from this crate**.
|
||||
- `cargo clippy -p lucisv_server --all-targets`: **0 warnings from this crate**.
|
||||
One warning reaches the output from a dependency — `vlog_formatter`'s
|
||||
`with_comma is never used` — which belongs to the concurrent round live in
|
||||
`vlog_parser`/`vlog_formatter`, not to anything here.
|
||||
@@ -301,20 +301,20 @@ TODO §2 `--lines`), `completion`, `rename`, `signatureHelp`, and cross-file
|
||||
- **Concurrency note.** Mid-round the other agent landed new `ast::Module` /
|
||||
`ast::AnsiPort` fields, and for ~20 minutes nothing in the workspace compiled,
|
||||
this crate included. Nothing was touched in response; the gates were re-run
|
||||
once `vlog_parser` built again and are the numbers above. `-p vfmt_server`'s
|
||||
once `vlog_parser` built again and are the numbers above. `-p lucisv_server`'s
|
||||
own 104 + 4 is the count that belongs to this feature and did not move across
|
||||
the break.
|
||||
- Files added: `crates/vfmt_server/src/{lint,code_action}.rs`, this README.
|
||||
Files edited: `crates/vfmt_server/Cargo.toml` (one line),
|
||||
`crates/vfmt_server/src/{main,server,diagnostics,format}.rs`,
|
||||
`crates/vfmt_server/tests/e2e.rs`, one annotation line in
|
||||
`docs/features/vfmt-server/README.md`.
|
||||
- Files added: `crates/lucisv_server/src/{lint,code_action}.rs`, this README.
|
||||
Files edited: `crates/lucisv_server/Cargo.toml` (one line),
|
||||
`crates/lucisv_server/src/{main,server,diagnostics,format}.rs`,
|
||||
`crates/lucisv_server/tests/e2e.rs`, one annotation line in
|
||||
`docs/features/lucisv-server/README.md`.
|
||||
|
||||
## QA log
|
||||
|
||||
### 2026-08-19 — QA agent
|
||||
|
||||
Scoped to `-p vfmt_server` per the concurrency note (a second agent was live
|
||||
Scoped to `-p lucisv_server` per the concurrency note (a second agent was live
|
||||
in `vlog_parser`/`vlog_formatter` for the directives-in-lists round; the tree
|
||||
briefly failed to build mid-session and recovered on its own — retested after
|
||||
and the numbers below are post-recovery). No files touched outside this QA
|
||||
@@ -322,18 +322,18 @@ log entry.
|
||||
|
||||
**Gates.**
|
||||
|
||||
- `cargo test -p vfmt_server`: **104 unit + 4 e2e, 0 failed** — matches the
|
||||
- `cargo test -p lucisv_server`: **104 unit + 4 e2e, 0 failed** — matches the
|
||||
claimed count exactly.
|
||||
- `cargo clippy -p vfmt_server --all-targets`: **0 warnings from this crate.**
|
||||
- `cargo clippy -p lucisv_server --all-targets`: **0 warnings from this crate.**
|
||||
- `cargo fmt --all -- --check`: clean.
|
||||
- `grep -rn "#\[allow" crates/vfmt_server/src/{lint,code_action,diagnostics,format,main,server}.rs crates/vfmt_server/tests/e2e.rs`
|
||||
- `grep -rn "#\[allow" crates/lucisv_server/src/{lint,code_action,diagnostics,format,main,server}.rs crates/lucisv_server/tests/e2e.rs`
|
||||
finds exactly one hit, `main.rs:112` (`#[allow(deprecated)]` on
|
||||
`root_uri`) — confirmed via `git diff crates/vfmt_server/src/main.rs` to
|
||||
`root_uri`) — confirmed via `git diff crates/lucisv_server/src/main.rs` to
|
||||
predate this round (it sits outside every hunk this diff touches). **No
|
||||
new `#[allow]` was added.**
|
||||
|
||||
**Claim 1 — single-publish merge: PASS.**
|
||||
`grep -rn "send_diagnostics\|PublishDiagnostics" crates/vfmt_server/src/`
|
||||
`grep -rn "send_diagnostics\|PublishDiagnostics" crates/lucisv_server/src/`
|
||||
shows exactly one call site that ever sends a non-empty diagnostics list —
|
||||
`server.rs:259`, `self.send_diagnostics(uri.clone(), diagnostics::all(doc))`
|
||||
inside `publish()` — plus the `didClose` clear-with-`Vec::new()` at line 236,
|
||||
@@ -346,7 +346,7 @@ client, framed JSON-RPC over stdio, script kept at
|
||||
error) produced **exactly one** `publishDiagnostics`, carrying one `Error`
|
||||
(unnamed `wire`) and one `Warning` `code: "no-tabs"`. `didChange` fixing the
|
||||
parse error but keeping the tab: still one publish, error gone, `no-tabs`
|
||||
warning persists. `didChange` adding `// vfmt: waive no-tabs`: still one
|
||||
warning persists. `didChange` adding `// lucisv: waive no-tabs`: still one
|
||||
publish, diagnostics array empty. All three steps matched the claim exactly.
|
||||
|
||||
**Claim 2 — codeAction: PASS**, verified against the real binary
|
||||
@@ -355,12 +355,12 @@ publish, diagnostics array empty. All three steps matched the claim exactly.
|
||||
(`isPreferred: true`, `diagnostics` = one entry, built from the same
|
||||
`lint::diagnostic` the publisher uses — confirmed both by source
|
||||
(`code_action.rs:63`) and by the wire payload being byte-identical to the
|
||||
publish's own diagnostic) and one `source.fixAll.vfmt`. The quickfix's
|
||||
publish's own diagnostic) and one `source.fixAll.lucisv`. The quickfix's
|
||||
edit, applied by hand from UTF-16 positions, was byte-identical to
|
||||
`vfmt check --fix`'s output on the same file.
|
||||
`lucisv check --fix`'s output on the same file.
|
||||
- `fixAll` carried no `diagnostics` key (absent from the JSON entirely, i.e.
|
||||
`None`, matching the one-pass argument in the README) and its one
|
||||
whole-document edit also matched `vfmt check --fix`.
|
||||
whole-document edit also matched `lucisv check --fix`.
|
||||
- Convergence: a line with both a leading tab and a trailing tab
|
||||
(`no-tabs` + `no-trailing-whitespace` both wanting those bytes) took
|
||||
**3 rounds** to reach a clean buffer via repeated `fixAll` → `didChange` →
|
||||
@@ -370,11 +370,11 @@ publish, diagnostics array empty. All three steps matched the claim exactly.
|
||||
- `context.only=["source"]` returned only the `fixAll` action (1 action);
|
||||
`context.only=["quickfix"]` returned only the quickfix (1 action) — both
|
||||
confirmed live, not just via the existing unit test.
|
||||
- Tab width from `vfmt.toml`: a scratch tree with `indent = 4` produced a
|
||||
- Tab width from `lucisv.toml`: a scratch tree with `indent = 4` produced a
|
||||
quickfix expanding the tab to 4 spaces; a tree with no config produced 2
|
||||
spaces (the built-in default) — both driven through the real binary
|
||||
(`test6_config_and_filename.py`).
|
||||
- Diagnostics path skips config reads: `grep -rn "indent_width" crates/vfmt_server/src/*.rs`
|
||||
- Diagnostics path skips config reads: `grep -rn "indent_width" crates/lucisv_server/src/*.rs`
|
||||
shows `format::indent_width` called from exactly one site,
|
||||
`server.rs:131`, inside the `CodeActionRequest` handler. Neither
|
||||
`lint::violations` nor `lint::diagnostics` (the path every `didOpen`/
|
||||
@@ -388,7 +388,7 @@ publish, diagnostics array empty. All three steps matched the claim exactly.
|
||||
|
||||
**Claim 3 — capabilities: PASS.** `main.rs`'s `capabilities()` diff is
|
||||
exactly the one field the README documents (`code_action_provider: Options`
|
||||
with `[QUICKFIX, "source.fixAll.vfmt"]`, `resolve_provider: None`); nothing
|
||||
with `[QUICKFIX, "source.fixAll.lucisv"]`, `resolve_provider: None`); nothing
|
||||
else in `capabilities()` changed per `git diff`. `caps.code_action_provider`
|
||||
is `Options`, not `Simple(true)` — asserted by
|
||||
`the_two_code_action_kinds_are_named_in_the_capability` and by the e2e test
|
||||
@@ -402,13 +402,13 @@ in spirit — only gained one new assertion for `code_action_provider`).
|
||||
**Claim 5 — handshakes: PASS**, and the fence gap was reproduced live rather
|
||||
than taken on faith. `test4_fence_gap.py`: a file with
|
||||
`// verilog_format: off` / a tabbed line / `// verilog_format: on` —
|
||||
`vfmt check --fix` left the tab untouched (confirmed: output still contains
|
||||
`lucisv check --fix` left the tab untouched (confirmed: output still contains
|
||||
the literal tab byte); the server's `fixAll` action **did** rewrite it to
|
||||
spaces (confirmed: applied output has the tab replaced). This is exactly
|
||||
what Handshake 3 claims, stated as a known gap rather than silently — the
|
||||
handshake text is accurate, not aspirational. The other three handshakes
|
||||
(second-parse-per-keystroke in `lint.rs`'s own doc comments, no `lint` key
|
||||
in `vfmt.toml` yet, `TODO.md:353` being stale) were spot-checked against the
|
||||
in `lucisv.toml` yet, `TODO.md:353` being stale) were spot-checked against the
|
||||
actual files and are accurate: `TODO.md`'s "Not shipped, deliberately: ...
|
||||
lint diagnostics (waits on `vlog_linter`)" line is indeed still present and
|
||||
now stale, and its checkbox is already `[x]`, exactly as claimed.
|
||||
@@ -416,7 +416,7 @@ now stale, and its checkbox is already `[x]`, exactly as claimed.
|
||||
**UTF-16 under fixes: PASS.** `test5_utf16.py`: a violation on a line after
|
||||
`🎉🎉 café` (multi-byte, multi-UTF-16-unit content) — the server's `fixAll`
|
||||
edit, applied from its UTF-16 positions, produced output **byte-identical**
|
||||
to `vfmt check --fix` on the same file, and the emoji/accented content was
|
||||
to `lucisv check --fix` on the same file, and the emoji/accented content was
|
||||
untouched.
|
||||
|
||||
**module-filename via URI: PASS.** A `file://` URI whose module name
|
||||
@@ -428,14 +428,14 @@ hang on a subsequent `codeAction` request against the same untitled buffer
|
||||
|
||||
**Documentation.** README has all seven CLAUDE.md-required sections, all
|
||||
populated except Review (correctly reserved for the lead). The two
|
||||
`docs/features/vfmt-server/README.md` annotation locations (the "Deferred"
|
||||
`docs/features/lucisv-server/README.md` annotation locations (the "Deferred"
|
||||
paragraph's `lint diagnostics (waits on \`vlog_linter\`)` clause, and the
|
||||
Status/TODO `lint diagnostics` checklist item) are each a single
|
||||
struck-through-and-replaced item, word-wrapped across several physical lines
|
||||
in the file's existing 80-column convention — consistent with "one
|
||||
annotation" per location, not a rewrite of surrounding content. Minor,
|
||||
non-blocking nit: the dev's own work-log sentence says "one annotation line
|
||||
in `docs/features/vfmt-server/README.md`" (singular), but two separate
|
||||
in `docs/features/lucisv-server/README.md`" (singular), but two separate
|
||||
locations in that file were actually touched (the Deferred-paragraph clause
|
||||
and the Status/TODO item) — the substance of both edits is correct and
|
||||
scoped, this is purely a miscount in the work-log's own wording.
|
||||
@@ -467,19 +467,19 @@ Points reviewed and accepted:
|
||||
`diagnostics` list on the action because a pass that skips
|
||||
overlapping fixes can't honestly name what it resolved. Declining
|
||||
to claim what you can't prove is the house style.
|
||||
3. **Quick fixes byte-identical to `vfmt check --fix`** — the two
|
||||
3. **Quick fixes byte-identical to `lucisv check --fix`** — the two
|
||||
front ends provably agree, which is the property users will
|
||||
actually rely on.
|
||||
4. **The fence gap filed, not papered over**: a server fix can edit
|
||||
inside `// vfmt: off` because the fence filter lives in
|
||||
`crates/vfmt`, and a third copy of "what is fenced" is how answers
|
||||
inside `// lucisv: off` because the fence filter lives in
|
||||
`crates/lucisv`, and a third copy of "what is fenced" is how answers
|
||||
drift. QA reproduced both sides live. This is the top item for the
|
||||
next round — a shared fence-region helper (likely in
|
||||
`vlog_formatter` next to `fence.rs`, or `vfmt_core`) that the CLI
|
||||
`vlog_formatter` next to `fence.rs`, or `lucisv_core`) that the CLI
|
||||
and the server both call. Until then: no corruption is possible
|
||||
(only Safe fixes exist), but the hands-off promise has a documented
|
||||
editor-side hole.
|
||||
5. The second-parse-per-keystroke cost and the `vfmt.toml` `lint` key
|
||||
5. The second-parse-per-keystroke cost and the `lucisv.toml` `lint` key
|
||||
stay filed where they belong (vlog_linter's one-parse-two-tools
|
||||
TODO and config-discovery's key list respectively).
|
||||
|
||||
|
||||
Reference in new issue
Block a user