From 53bc293c37cd22558e1ba2cd9f1277897c87af83 Mon Sep 17 00:00:00 2001 From: Guoliang Chen Date: Wed, 2 Sep 2026 04:19:08 -0700 Subject: [PATCH] =?UTF-8?q?Release=200.27.0=20=E2=80=94=20constraint=20bod?= =?UTF-8?q?ies?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Fable 5 --- CHANGELOG.md | 50 +++++++++++++++++++++++++++++++++++++ Cargo.lock | 16 ++++++------ Cargo.toml | 2 +- editors/vscode/CHANGELOG.md | 13 ++++++++++ editors/vscode/README.md | 10 +++++++- editors/vscode/package.json | 2 +- 6 files changed, 82 insertions(+), 11 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d29ef5d..5e6e830 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,56 @@ 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.27.0 — 2026-09-02 + +Constraint bodies — round 1 of coverage_gaps C1, the DV correctness +item. + +`constraint c { … }`, `constraint C::c { … }` and `randomize() with +{ … }` were opaque verbatim text: no name span, nothing inside bound, +so renaming a `rand` field left `constraint c { user_id < 5; }` as +non-compiling code with, at best, a generic warning. Now a constraint +declaration is a real node — `soft`, `dist` (`:=`/`:/`), `->` +implication, `if`/`else`, `foreach`, `solve … before`, `unique`, +`disable soft`, `` `ifdef `` arms — and the parser attempts the +structured body behind a rewind snapshot: any shape it does not know +restores the cursor *and both pending-comment buckets* and re-runs the +verbatim capture character for character, so an unknown body is the +old behavior, not an approximation. No keywords were reserved — +`soft`/`dist`/`solve`/`before` are matched by text — so `logic before;` +keeps working and the editor grammar is untouched. + +Layout is canonical: one constraint item per line, `}` at the header's +column, `dist` weights broken like a braced list; a `with` block keeps +its one-line-or-not shape. `verify.rs` untouched; the constraint attack +pairs re-derived and extended (a dropped `soft`, `:=` for `:/`, +swapped `solve`/`before`, a dropped `else` set, a flattened +implication, a comment moved across `}`). Every operand binds to the +class's properties (`this.` implicit; `foreach` variables nest; a +`with` block resolves against the randomized object's class first), so +hover, definition, references and rename reach inside; renaming a +`rand` field from its declaration rewrites its constraint uses in-file +and cross-file. `FACTS_FORMAT` 10 → 11. Lint rules read constraint +operands instead of treating the body as opaque. + +QA's finding — a comment right after `soft`, `dist`, `solve`, +`before` or the constraint name was dropped, so the safety net refused +the file — was answered with an exhaustive gap fuzzer (a block comment +in every inter-token gap of fifteen fixtures, 358 gaps, format and +idempotency both demanded) and fourteen named comment fields; the +forty gaps that remain are shared expression machinery that behaves +identically outside a constraint (`q[/*c*/ i]`, `inside {[/*c*/ 0:3]}`, +scoped-name chains) and are filed as a parser-wide round. No opentitan +file hits one. + +Opentitan: 1 993 of 2 009 constraint bodies parse structured (the 16 +fallbacks are macro-item bodies and non-LRM shapes), all laid out, +token-equivalent and idempotent; 48 DV files across 16 IPs re-format +idempotently with their comment streams byte-identical; the sweep's +failure set unchanged and the tolerant-diagnostic count per file +identical. Corpus: 37 files change layout, all verified; +1 646 +references, 84 % answered. Covergroups are round 2. + ## 0.26.0 — 2026-09-02 Two lanes, run in parallel: member completion, and escaped identifiers. diff --git a/Cargo.lock b/Cargo.lock index e8997c0..a24f9c7 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -97,7 +97,7 @@ dependencies = [ [[package]] name = "lucisv" -version = "0.26.0" +version = "0.27.0" dependencies = [ "lucisv_core", "rayon", @@ -108,11 +108,11 @@ dependencies = [ [[package]] name = "lucisv_core" -version = "0.26.0" +version = "0.27.0" [[package]] name = "lucisv_server" -version = "0.26.0" +version = "0.27.0" dependencies = [ "lsp-server", "lsp-types", @@ -248,14 +248,14 @@ checksum = "e6e4313cd5fcd3dad5cafa179702e2b244f760991f45397d14d4ebf38247da75" [[package]] name = "vlog_formatter" -version = "0.26.0" +version = "0.27.0" dependencies = [ "vlog_parser", ] [[package]] name = "vlog_linter" -version = "0.26.0" +version = "0.27.0" dependencies = [ "vlog_formatter", "vlog_parser", @@ -264,11 +264,11 @@ dependencies = [ [[package]] name = "vlog_parser" -version = "0.26.0" +version = "0.27.0" [[package]] name = "vlog_refactor" -version = "0.26.0" +version = "0.27.0" dependencies = [ "vlog_parser", "vlog_semantic", @@ -276,7 +276,7 @@ dependencies = [ [[package]] name = "vlog_semantic" -version = "0.26.0" +version = "0.27.0" dependencies = [ "vlog_parser", ] diff --git a/Cargo.toml b/Cargo.toml index ed557d4..c0c44c2 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -12,7 +12,7 @@ members = [ ] [workspace.package] -version = "0.26.0" +version = "0.27.0" authors = ["Guoliang Chen"] edition = "2021" license = "MIT" diff --git a/editors/vscode/CHANGELOG.md b/editors/vscode/CHANGELOG.md index 4548a99..e3b257b 100644 --- a/editors/vscode/CHANGELOG.md +++ b/editors/vscode/CHANGELOG.md @@ -5,6 +5,19 @@ 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.27.0 — 2026-09-02 + +- **Constraint blocks are real code now**: `constraint c { … }`, + out-of-class `constraint C::c { … }` and `randomize() with { … }` + format canonically, and every name inside hovers, jumps and renames + together with its class property — renaming a `rand` field rewrites + its constraint uses too. +- Anything the constraint grammar does not recognise keeps its old + byte-for-byte formatting, so nothing that formatted before stops. +- The index store format changed; it rebuilds once after updating. +- Caches re-verify once after updating (formatter output changes for + files with constraints). + ## 0.26.0 — 2026-09-02 - **Member completion**: type `item.`, `reg2hw.ctrl.`, `vif.cb.`, diff --git a/editors/vscode/README.md b/editors/vscode/README.md index d3a708b..ffc98b2 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.26.0**. Its platform packages include both +The current release is **0.27.0**. Its platform packages include both `lucisv-server` and the `lucisv` command-line tool: | Package target | Machines | @@ -326,6 +326,14 @@ Every nesting color is a proper VS Code theme color: } ``` +## Release 0.27.0 highlights + +Version 0.27.0 gives constraint blocks a real grammar: `constraint c { +… }`, `constraint C::c { … }` and `randomize() with { … }` format +canonically, every name inside them hovers, navigates and renames with +its class property, and any shape the grammar does not know falls back +to the byte-exact verbatim capture it always had. + ## Release 0.26.0 highlights Version 0.26.0 makes a dot mean members: `item.`, `reg2hw.ctrl.`, diff --git a/editors/vscode/package.json b/editors/vscode/package.json index 8488ec6..82dbed4 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.26.0", + "version": "0.27.0", "publisher": "guoliangchen", "author": "Guoliang Chen", "license": "MIT",