From f8401a0024da3824216cc4ef139c16d989b95545 Mon Sep 17 00:00:00 2001 From: Guoliang Chen Date: Tue, 1 Sep 2026 15:03:36 -0700 Subject: [PATCH] =?UTF-8?q?Release=200.21.0=20=E2=80=94=20null=20items=20a?= =?UTF-8?q?nd=20the=20empty-item=20lint?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Fable 5 --- CHANGELOG.md | 29 +++++++++++++++++++++++++++++ Cargo.lock | 16 ++++++++-------- Cargo.toml | 2 +- editors/vscode/CHANGELOG.md | 12 ++++++++++++ editors/vscode/README.md | 9 ++++++++- editors/vscode/package.json | 2 +- 6 files changed, 59 insertions(+), 11 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9d4ee10..7f9879a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,35 @@ All notable changes to lucisv are recorded here. Versions follow [semantic versioning](https://semver.org/); until 1.0 the CLI's exit codes (see `README.md`) are the only frozen contract. +## 0.21.0 — 2026-09-01 + +Null items: `endgenerate;` parses — and everywhere else a stray `;` may +legally stand. + +The report was "for loop inside generate fails"; the diagnosis was that +every generate-for spelling — and three published examples — already +parsed, and the failing token was the lone `;` after `endgenerate`. +IEEE 1800-2017 A.1.4 makes that a *null item*, legal in module, +generate, package, interface, program and class scope and at file +scope; lucisv rejected it in all of them with `expected item`. Now +`ItemKind::Empty`, accepted by one parser branch, laid out where it +was written (glued to the previous line for `endgenerate;` / `end;` / +`endmodule;` / `;;`, or on its own line), token-preserving and +idempotent both ways. `verify.rs` untouched; eight masked-corruption +attack pairs (a dropped `;`, one moved across a comment, into a +procedural block, between `` `ifdef `` arms) all rejected. + +New lint **`empty-item`** (slang's `-Wempty-member`): warns on a null +item; its safe fix deletes the `;` — and the line, when nothing else +stood on it — with a deletion range that structurally cannot swallow a +comment. In the editor, a file that used to show a parse error now +shows a warning with a quick fix and *fix all*. + +Formatter output changes only for files that contain a null item; +the 820-file corpus is byte-identical (813/820) and the opentitan +sweep is unchanged file-for-file. Version bumped per the format-cache +rule. + ## 0.20.0 — 2026-08-30 Fuzzy completion: `clkenq` reaches `clk_osc_en_q`. diff --git a/Cargo.lock b/Cargo.lock index 3733aac..252b1ba 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -97,7 +97,7 @@ dependencies = [ [[package]] name = "lucisv" -version = "0.20.0" +version = "0.21.0" dependencies = [ "lucisv_core", "rayon", @@ -108,11 +108,11 @@ dependencies = [ [[package]] name = "lucisv_core" -version = "0.20.0" +version = "0.21.0" [[package]] name = "lucisv_server" -version = "0.20.0" +version = "0.21.0" dependencies = [ "lsp-server", "lsp-types", @@ -248,14 +248,14 @@ checksum = "e6e4313cd5fcd3dad5cafa179702e2b244f760991f45397d14d4ebf38247da75" [[package]] name = "vlog_formatter" -version = "0.20.0" +version = "0.21.0" dependencies = [ "vlog_parser", ] [[package]] name = "vlog_linter" -version = "0.20.0" +version = "0.21.0" dependencies = [ "vlog_formatter", "vlog_parser", @@ -264,11 +264,11 @@ dependencies = [ [[package]] name = "vlog_parser" -version = "0.20.0" +version = "0.21.0" [[package]] name = "vlog_refactor" -version = "0.20.0" +version = "0.21.0" dependencies = [ "vlog_parser", "vlog_semantic", @@ -276,7 +276,7 @@ dependencies = [ [[package]] name = "vlog_semantic" -version = "0.20.0" +version = "0.21.0" dependencies = [ "vlog_parser", ] diff --git a/Cargo.toml b/Cargo.toml index f46aea7..3297aa4 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -12,7 +12,7 @@ members = [ ] [workspace.package] -version = "0.20.0" +version = "0.21.0" authors = ["Guoliang Chen"] edition = "2021" license = "MIT" diff --git a/editors/vscode/CHANGELOG.md b/editors/vscode/CHANGELOG.md index 9eceb34..81e4189 100644 --- a/editors/vscode/CHANGELOG.md +++ b/editors/vscode/CHANGELOG.md @@ -5,6 +5,18 @@ for you. The extension and its bundled language server share one version number; the full engineering notes live in the [project changelog](https://git.luci.ooo/lucio/lucisv/src/branch/master/CHANGELOG.md). +## 0.21.0 — 2026-09-01 + +- **`endgenerate;` no longer breaks the file.** A stray semicolon after + `endgenerate`, after a generate block's `end`, after `endmodule`, or + anywhere else an item may stand is legal SystemVerilog (a "null + item") and now parses, formats in place, and round-trips — instead + of a parse error cascading through the buffer. +- **New lint `empty-item`** flags that semicolon as unnecessary, with a + one-click quick fix (and *fix all*) that removes it without touching + a comment on the same line. +- Caches re-verify once after updating. + ## 0.20.0 — 2026-08-30 - **Fuzzy autocomplete for identifiers**: type the letters you diff --git a/editors/vscode/README.md b/editors/vscode/README.md index 0760793..c4f0e16 100644 --- a/editors/vscode/README.md +++ b/editors/vscode/README.md @@ -30,7 +30,7 @@ Install **lucisv — Verilog/SystemVerilog** from the VS Code Extensions view, then open a Verilog or SystemVerilog file. There is no separate server or CLI setup. -The current release is **0.20.0**. Its platform packages include both +The current release is **0.21.0**. Its platform packages include both `lucisv-server` and the `lucisv` command-line tool: | Package target | Machines | @@ -326,6 +326,13 @@ Every nesting color is a proper VS Code theme color: } ``` +## Release 0.21.0 highlights + +Version 0.21.0 accepts null items — `endgenerate;`, `end;`, +`endmodule;` and any other stray semicolon where an item may stand — +formatting them in place instead of failing, and adds the `empty-item` +lint with a quick fix that removes them. + ## Release 0.20.0 highlights Version 0.20.0 adds fuzzy identifier completion: from the third typed diff --git a/editors/vscode/package.json b/editors/vscode/package.json index 04d8f43..bc396c5 100644 --- a/editors/vscode/package.json +++ b/editors/vscode/package.json @@ -2,7 +2,7 @@ "name": "lucisv", "displayName": "lucisv — Verilog/SystemVerilog", "description": "Fast Verilog/SystemVerilog formatting, linting, navigation, refactoring, semantic highlighting and RTL design intelligence.", - "version": "0.20.0", + "version": "0.21.0", "publisher": "guoliangchen", "author": "Guoliang Chen", "license": "MIT",