Refactoring M2: vlog_refactor crate + LSP rename

New crate vlog_refactor: rename any symbol vlog_semantic resolves, in-file
and cross-file, with whole-edit-or-nothing verification (token identity +
before/after resolution print over every file spelling either name).
End labels rename too via a new vlog_semantic Target::Declaration bound at
declaration time. Server ships prepareRename/rename; refusals are LSP
request errors, define-body/macro-argument/hierarchical-tail occurrences
warn instead of guessing. QA round 1 found two silent HIGHs (third-file
collision, macro-argument silence) — both closed with regression tests.

Co-Authored-By: Claude Fable 5 <[email protected]>
This commit is contained in:
lucioandClaude Fable 5 committed 2026-08-24 05:12:53 -07:00
1 parent 315bbf23ab
commit 33f58196e3
22 files changed
+3726 -26

No files matched your search

+5 -5
View File
@@ -55,15 +55,15 @@ the work is reviewed**. Owner-priority items first (2026-08-24).
sharing the current file's directory → same feature (M1)
### Rename
- [ ] **Rename any symbol** the semantic layer resolves — wire/reg/logic
- [x] **Rename any symbol** the semantic layer resolves — wire/reg/logic
nets and variables, ports, parameters/localparams, genvars, typedefs,
enum members, functions/tasks, modules, instances, packages, class
members — via LSP `textDocument/rename` → `docs/features/refactor-rename/README.md` (M2)
- [ ] **`prepareRename`** — reject up front what can't be renamed (keywords,
- [x] **`prepareRename`** — reject up front what can't be renamed (keywords,
macro uses, unresolved names), so the editor never offers a broken rename → M2
- [ ] **Cross-file rename** through the workspace index (module names update
- [x] **Cross-file rename** through the workspace index (module names update
every instantiation; package members update every import site) → M2
- [ ] **Rename safety**: refuse on collision with an existing name in any
- [x] **Rename safety**: refuse on collision with an existing name in any
affected scope, on invalid identifiers, and whenever any resulting file
would no longer parse — whole-edit-or-nothing, like the formatter → M2
- [ ] Rename in comments/strings as an *option* (rope's `docs=True`) — off
@@ -177,7 +177,7 @@ commit — in order:
- [x] Plan written; rope docs surveyed (overview: rename, extract, inline,
move, change signature, restructure, organize imports, SOA/DOA, history)
- [x] M1 filelist — done, QA clean, reviewed
- [ ] M2 refactor-rename
- [x] M2 refactor-rename — done, QA clean after one rework round, reviewed
- [ ] M3 refactor-ports
- [ ] M4 refactor-instantiate
- [ ] Backlog triage after M4