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
@@ -5,7 +5,7 @@
|
||||
`vlog_parser` is a recursive-descent parser, so nesting in the input becomes
|
||||
nesting on the call stack. Deeply nested input therefore did not produce a
|
||||
parse error — it overflowed the stack and killed the process (SIGABRT). A
|
||||
stack overflow is not a panic, so `catch_unwind` in `crates/vfmt/src/main.rs`
|
||||
stack overflow is not a panic, so `catch_unwind` in `crates/lucisv/src/main.rs`
|
||||
could not contain it: the run died mid-batch, every file after the offending
|
||||
one went unprocessed, and there was not even an exit-code-2 summary
|
||||
(cli-polish QA finding, `docs/features/cli-polish/README.md`). This feature
|
||||
@@ -51,7 +51,7 @@ not by 64 × 256.
|
||||
`parse_gen_if`), one `.b` or one `+` costs 1 link. The limits are a
|
||||
stack-safety budget, not a style rule.
|
||||
- **8 MiB of stack is available.** That is the default main-thread stack on
|
||||
macOS and Linux, and `vfmt` parses on the main thread. Anything that parses
|
||||
macOS and Linux, and `lucisv` parses on the main thread. Anything that parses
|
||||
on a *spawned* thread must give it a comparable stack — the default 2 MiB
|
||||
is not enough to reach the limit in an unoptimized build (see Handshakes;
|
||||
the tests here spawn 16 MiB threads for exactly this reason).
|
||||
@@ -274,7 +274,7 @@ not inflate depth — the output of a max-depth file re-parses inside
|
||||
|
||||
- **Consumed from `vlog_parser`:** nothing new. `parse()` keeps its
|
||||
signature; the limit shows up as a normal `ParseError`, so `vlog_formatter`
|
||||
and `vfmt` report it through the paths they already had (`FormatError::
|
||||
and `lucisv` report it through the paths they already had (`FormatError::
|
||||
Source` → `error: <path>: parse error: …` → exit 2).
|
||||
- **Promised to `vlog_formatter`:** AST depth on any path is bounded by
|
||||
`vlog_parser::parser::MAX_NESTING_DEPTH + MAX_CHAIN_LENGTH` (both public,
|
||||
@@ -311,7 +311,7 @@ not inflate depth — the output of a max-depth file re-parses inside
|
||||
- [x] Parser unit tests: at limit / past limit, one per construct family.
|
||||
- [x] Formatter tests (`tests/deep_nesting.rs`): max-legal depth formats and
|
||||
converges; past-limit input surfaces as a parse error.
|
||||
- [x] CLI test (`crates/vfmt/tests/cli.rs`): the cli-polish repro (150 levels)
|
||||
- [x] CLI test (`crates/lucisv/tests/cli.rs`): the cli-polish repro (150 levels)
|
||||
exits 2, is left untouched, and files after it are still formatted.
|
||||
- [x] `cargo test --workspace`, `cargo clippy --all-targets`,
|
||||
`cargo fmt --check` all clean.
|
||||
@@ -390,16 +390,16 @@ From QA round 1 (2026-08-19):
|
||||
live outside the repo; nothing generated by them was committed.
|
||||
|
||||
**Results:** `cargo test --workspace` **80 passed, 0 failed** (up from 70:
|
||||
+6 `vlog_parser` unit, +3 `vlog_formatter` `deep_nesting`, +1 `vfmt` CLI).
|
||||
+6 `vlog_parser` unit, +3 `vlog_formatter` `deep_nesting`, +1 `lucisv` CLI).
|
||||
`cargo clippy --all-targets` silent. `cargo fmt --check` clean.
|
||||
Files touched: `crates/vlog_parser/src/parser.rs`,
|
||||
`crates/vlog_formatter/tests/deep_nesting.rs` (new),
|
||||
`crates/vfmt/tests/cli.rs` (one test), `TODO.md` (one checkbox), this README.
|
||||
`crates/lucisv/tests/cli.rs` (one test), `TODO.md` (one checkbox), this README.
|
||||
|
||||
### 2026-08-19 (later) — dev agent, answering QA round 1
|
||||
|
||||
- **The blocking finding is correct and was reproduced first thing**:
|
||||
`./target/debug/vfmt` on `assign x = a` + `.b`×1500 died with SIGABRT
|
||||
`./target/debug/lucisv` on `assign x = a` + `.b`×1500 died with SIGABRT
|
||||
(exit 134). Bisected the crash with the real binary before touching
|
||||
anything, and swept the whole shape class rather than just the reported
|
||||
one — crash thresholds on the default 8 MiB main-thread stack, debug:
|
||||
@@ -480,8 +480,8 @@ grew a second pathological file). `cargo clippy --all-targets` silent.
|
||||
- `cargo fmt --check`: clean, exit 0.
|
||||
|
||||
**Claim 4 (150-level repro, batch survival) — CONFIRMED**, checked two ways:
|
||||
- `cargo test -p vfmt deeply_nested_file_does_not_kill_the_batch` passes.
|
||||
- Independently, ran the real debug `vfmt` binary (not the test harness) on
|
||||
- `cargo test -p lucisv deeply_nested_file_does_not_kill_the_batch` passes.
|
||||
- Independently, ran the real debug `lucisv` binary (not the test harness) on
|
||||
a 3-file batch (`good`, 150-level `if…begin` repro, `good`) in the
|
||||
scratchpad: exit 2, `error: b_deep.sv: parse error: 32:5: nesting too deep
|
||||
(limit 64) (found "clk")`, `2 files reformatted, 1 file failed to format`,
|
||||
@@ -522,7 +522,7 @@ python3 -c "
|
||||
n = 1500
|
||||
s = 'module m;\nassign x = a' + '.b'*n + ';\nendmodule\n'
|
||||
open('member_chain_1500.sv','w').write(s)"
|
||||
./target/debug/vfmt member_chain_1500.sv
|
||||
./target/debug/lucisv member_chain_1500.sv
|
||||
# thread 'main' (NNNN) has overflowed its stack
|
||||
# fatal runtime error: stack overflow, aborting
|
||||
# exit code 134 (SIGABRT)
|
||||
@@ -715,7 +715,7 @@ file so its own count is unchanged but its assertions grew). `cargo clippy
|
||||
**Job 1 — original blocking repros: CONFIRMED FIXED.** Rebuilt the debug
|
||||
binary fresh (touched `parser.rs` to force a rebuild, confirmed via the
|
||||
binary's mtime) and reran all four original crash shapes at n=1500 through
|
||||
the real `vfmt`, default 8 MiB stack:
|
||||
the real `lucisv`, default 8 MiB stack:
|
||||
|
||||
```
|
||||
member1500.sv -> parse error: 2:525: expression chain too long (limit 256) (found ".") exit 2
|
||||
|
||||
Reference in new issue
Block a user