From a5ca0c9b1068458f254457b0eacc1fcfb7e49327 Mon Sep 17 00:00:00 2001 From: Guoliang Chen Date: Sat, 5 Sep 2026 23:04:14 -0500 Subject: [PATCH] =?UTF-8?q?Release=200.47.0=20=E2=80=94=20organize=20impor?= =?UTF-8?q?ts,=20extract=20module?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Fable 5.1 --- CHANGELOG.md | 35 +++++++++++++++++++++++++++++++++++ Cargo.lock | 16 ++++++++-------- Cargo.toml | 2 +- editors/vscode/CHANGELOG.md | 8 ++++++++ editors/vscode/README.md | 7 ++++++- editors/vscode/package.json | 2 +- 6 files changed, 59 insertions(+), 11 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8fe1376..2fd8d10 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,41 @@ 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.47.0 — 2026-09-06 + +### Organize imports, extract module + +- **Organize imports.** Removes the `import pkg::*;` lines nothing in the + scope reaches through, merges exact duplicates and sorts the run at the + top of a module, package or class; `source.organizeImports`, so an + editor's organize-on-save runs it, and `lucisv.organizeImports`. "Used" + is the binder's own lookup, read as a superset — over-keeping is the + safe direction — and an `export pkg::…` in the same package counts as a + use of its import (IEEE 1800 §26.6). It refuses rather than guesses + wherever a macro call, a conditional directive, an unknown or + twice-declared package, or a base class in another file could hide a + use, which is why every opentitan UVM package (all carrying + `` `include "uvm_macros.svh" ``) is refused. The same judgement is the + new `unused-import` rule (Style, off by default, safe fix). +- **Extract module.** Select whole module items and give a name: the + items become a new module with ports inferred from dataflow across the + selection (read only → `input`, written → `output`, written on both + sides → refused), parameters passed through, used imports copied, and + the selection replaced by an instantiation rendered from the new + module's own text. Written to a new file when the client can create + one, below the source module otherwise. Forty-three refusal sentences + for what lucisv cannot judge (a routine argument, a hierarchical path + crossing the boundary, an interface-typed name, a `typedef` of the + source module, …). `refactor.extract` code action, `lucisv.extractModule`, + and a name prompt in the VS Code extension. Inline module follows in a + later release. +- **The verifier's never-dropped ledger follows a move.** For the bytes + an extraction moves, a comment or attribute deleted inside the moved + region must land exactly once in the file the move names; a deletion + outside the region stays an ordinary deletion that must be written + back in its own file. Opt-in per edit, four equations, twelve attack + pairs through the production entry, re-attacked by QA. + ## 0.46.0 — 2026-09-05 ### Two refactorings: expand `.*`, convert ports to ANSI diff --git a/Cargo.lock b/Cargo.lock index 5f28f6c..a1fe191 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -97,7 +97,7 @@ dependencies = [ [[package]] name = "lucisv" -version = "0.46.0" +version = "0.47.0" dependencies = [ "lucisv_core", "rayon", @@ -108,11 +108,11 @@ dependencies = [ [[package]] name = "lucisv_core" -version = "0.46.0" +version = "0.47.0" [[package]] name = "lucisv_server" -version = "0.46.0" +version = "0.47.0" dependencies = [ "lsp-server", "lsp-types", @@ -248,14 +248,14 @@ checksum = "e6e4313cd5fcd3dad5cafa179702e2b244f760991f45397d14d4ebf38247da75" [[package]] name = "vlog_formatter" -version = "0.46.0" +version = "0.47.0" dependencies = [ "vlog_parser", ] [[package]] name = "vlog_linter" -version = "0.46.0" +version = "0.47.0" dependencies = [ "lucisv_core", "vlog_formatter", @@ -265,11 +265,11 @@ dependencies = [ [[package]] name = "vlog_parser" -version = "0.46.0" +version = "0.47.0" [[package]] name = "vlog_refactor" -version = "0.46.0" +version = "0.47.0" dependencies = [ "vlog_formatter", "vlog_parser", @@ -278,7 +278,7 @@ dependencies = [ [[package]] name = "vlog_semantic" -version = "0.46.0" +version = "0.47.0" dependencies = [ "vlog_parser", ] diff --git a/Cargo.toml b/Cargo.toml index 723ea86..60892b0 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -12,7 +12,7 @@ members = [ ] [workspace.package] -version = "0.46.0" +version = "0.47.0" authors = ["Guoliang Chen"] edition = "2021" license = "MIT" diff --git a/editors/vscode/CHANGELOG.md b/editors/vscode/CHANGELOG.md index d5c4c88..a6b131e 100644 --- a/editors/vscode/CHANGELOG.md +++ b/editors/vscode/CHANGELOG.md @@ -5,6 +5,14 @@ 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.47.0 — 2026-09-06 + +- **Organize imports** on save or from the lightbulb: unused + `import pkg::*;` lines removed, duplicates merged, the run sorted. +- **Extract module**: select whole items, pick "extract selection into + module", type a name — a new file with the inferred ports and an + instantiation in its place. + ## 0.46.0 — 2026-09-05 - **Expand `.*`**: a lightbulb on a wildcard connection writes out the diff --git a/editors/vscode/README.md b/editors/vscode/README.md index 769da19..4458080 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.46.0**. Its platform packages include both +The current release is **0.47.0**. Its platform packages include both `lucisv-server` and the `lucisv` command-line tool: | Package target | Machines | @@ -365,6 +365,11 @@ Every nesting color is a proper VS Code theme color: } ``` +## Release 0.47.0 highlights + +Version 0.47.0 adds organize imports (with organize-on-save) and extract +module with dataflow-inferred ports. + ## Release 0.46.0 highlights Version 0.46.0 adds two refactorings: expand `.*` and convert ports to diff --git a/editors/vscode/package.json b/editors/vscode/package.json index 82a0344..39f4a31 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.46.0", + "version": "0.47.0", "publisher": "guoliangchen", "author": "Guoliang Chen", "license": "MIT",