Skip to content

feat(sv)!: report SystemVerilog compilation warnings - #1432

Merged
mergify[bot] merged 5 commits into
masterfrom
feature/sv-warning
Oct 19, 2026
Merged

mergify[bot] merged 5 commits into
masterfrom
feature/sv-warning

Conversation

@tignear

@tignear tignear commented Oct 17, 2026 •

Copy link
Copy Markdown
Contributor

Summary

The SystemVerilog frontend had no way to report a non-fatal diagnostic. The SV build path returned an empty warning list, so Simulator::warnings() was always empty for SV designs. The $readmemh / $readmemb word-count mismatch, which IEEE 1800-2023 21.4 requires a warning for, only went to tracing::warn!.

  • New celox_frontend_sv::FrontendWarning, re-exported as celox::SvFrontendWarning. It is a FrontendWarningKind plus an optional WarningLocation (file, line, column and a source snippet), rendered by miette as a Warning.
  • System task statements of the SV analyzer IR keep the span of the call in the source (Stmt::SystemTask::site). They are the first SV IR construct with a source location.
  • Lowering writes warnings into one sink passed down from schedule_sources and prepare_external_hierarchy*, so warnings found before a later lowering error are kept.
  • Warnings are deduplicated by call site and sorted by source position. Repeated lowerings of one call (module specializations, the kernel fallback) report it once; separate calls stay separate.
  • The SV and mixed build paths return the warnings as CompilationWarning::SystemVerilog, also attached to errors. The mixed path lowers SV modules again on each pass; a successful pass replaces the previous pass's warnings, and a failing pass's warnings are merged with them. Warnings from the interface-signature probe are attached when the build fails before the design is lowered again.
  • Two warnings use it:
    • MemoryFileWordCount: the $readmem word-count mismatch, with the task, the memory file and the counts.
    • ExitOutsideProgram: each $exit call, which 24.7 ignores outside a program block and allows a warning for. Celox has no program blocks, so every call warns. A call in a constant function warns too: the analyzer reports it through Ir::warnings() / Packages::warnings() (new AnalyzerWarning).
  • NAPI already renders every CompilationWarning, so TypeScript gets these warnings with no extra change.
  • Docs (en/ja) say where the warning goes. The Japanese guide also gets the address-directive and word-count paragraph it was missing.

Compatibility

Breaking changes:

  • The public enum CompilationWarning gains a SystemVerilog variant with the systemverilog feature, so exhaustive matches downstream need a new arm.
  • Stmt::SystemTask of the SV analyzer IR (celox-sv-analyzer) gains a site field.
  • celox_frontend_sv::interface_signatures_for takes a warnings out-parameter, and celox_sv_analyzer::InterfacePrototype gains a warnings field.

Testing

  • readmem_count_mismatch_preserves_unwritten_words checks each call's warning, with its file and line.
  • New readmem_count_mismatch_warns_once_per_call: two calls reading the same file into equal ranges warn separately; a call in a module specialized twice warns once; the rendered snippet points at file:line:column.
  • New readmem_warnings_survive_a_later_lowering_error: a later lowering error (an inout top port) still carries the warning.
  • exit_outside_a_program_block_is_ignored checks that each $exit call in initial and always_ff warns once, at its line.
  • New exit_in_a_timed_process_warns_at_the_call (a $exit after a delay, in initial and in a timed always) and exit_in_a_constant_function_warns_at_the_call (module and package constant functions).
  • New warnings_of_rewritten_specializations_point_at_their_call: specializations bound by type and assignment-pattern parameters report the call once, at its position in the file.
  • New mixed::locates_sv_interface_warnings_at_their_call: warnings in an SV interface (a constant function's $exit, $readmemh and $exit in initial) point at their call in the interface's file, under an SV top and under a Veryl top.
  • New mixed::keeps_sv_interface_warnings_when_its_signature_fails: a warning found while probing an SV interface survives a failing interface contract.
  • readmem_descending_ranges_and_absolute_addresses checks that address directives, or exactly one word per address, give no warning.
  • New mixed::reports_sv_warnings_of_a_veryl_top checks that an SV child under a Veryl top reports its warning, at its location.
  • cargo test -p celox --features systemverilog --test systemverilog (2837 passed), cargo test -p celox-sv-analyzer -p celox-frontend-sv.
  • cargo clippy --workspace --all-targets, -p celox --features systemverilog --all-targets and -p celox-test-suite --features external --all-targets; cargo fmt --check.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 17, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-19T05:20:35.404248Z 841d49f New commits
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@tignear tignear added the merge-ready Request merging through Mergify after required checks label Oct 17, 2026

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 7fbae2d0da

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 7aad8861ad

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread crates/celox/src/parser.rs Resolved
@tignear
tignear force-pushed the feature/sv-warning branch from 7aad886 to 1ca5208 Compare October 17, 2026 22:35
@tignear
tignear changed the base branch from master to feature/sv-stop-exit October 17, 2026 22:35

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 1ca52087cb

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@tignear
tignear force-pushed the feature/sv-stop-exit branch 2 times, most recently from ec85136 to aa048d5 Compare October 18, 2026 00:48
@tignear
tignear force-pushed the feature/sv-warning branch from 1ca5208 to d04f056 Compare October 18, 2026 01:24

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: d04f056fde

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread crates/celox/src/simulation.rs Resolved
Comment thread crates/celox/examples/sv_tests.rs Resolved
@tignear tignear removed the merge-ready Request merging through Mergify after required checks label Oct 18, 2026
Base automatically changed from feature/sv-stop-exit to master October 18, 2026 01:58
@tignear
tignear force-pushed the feature/sv-warning branch from d04f056 to 572b1a7 Compare October 18, 2026 02:01

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 572b1a7974

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread crates/celox-sv-analyzer/src/parsed.rs Resolved
Comment thread crates/celox-frontend-sv/src/warning.rs Resolved
Comment thread crates/celox/src/simulator/builder.rs Resolved
Comment thread crates/celox/src/simulator/builder.rs Resolved
@tignear
tignear force-pushed the feature/sv-warning branch 2 times, most recently from 5dbe252 to e1b5ef1 Compare October 18, 2026 11:36

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: e1b5ef1315

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@mergify

mergify Bot commented Oct 18, 2026 •

Copy link
Copy Markdown
Contributor

Queued — the merge queue status continues in this comment ↓.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: a6a7eac041

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@tignear
tignear force-pushed the feature/sv-warning branch from a6a7eac to bd0f0bc Compare October 18, 2026 19:03

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: bd0f0bc689

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread crates/celox/src/simulator/builder.rs Resolved
Comment thread crates/celox/src/simulator/builder.rs Resolved
The SystemVerilog frontend had no way to report a non-fatal diagnostic:
the SV build path returned no compilation warnings, and the `$readmem`
word-count mismatch that IEEE 1800-2023 21.4 requires a warning for only
went to `tracing`.

Lowering now collects `FrontendWarning`s, and the SV and mixed build
paths return them as `CompilationWarning::SystemVerilog`, also on error.
Repeats from module specializations and retried lowerings are dropped.

BREAKING CHANGE: `CompilationWarning` gains a `SystemVerilog` variant
with the `systemverilog` feature.

Change-Id: I59220d8e108d4bcfc52c5f7b8da7bc0794b09989
A `$readmem` warning did not say which call it came from, and two calls
reading the same file into equally sized ranges gave identical warnings
that were merged into one.

System task statements now keep the span of the call in the source, and
a `FrontendWarning` carries its file, line, column and source snippet.
Warnings are deduplicated by call site, so repeated lowerings of one
call collapse while separate calls stay separate.

Lowering writes warnings into one sink passed down from the frontend
entry points, so warnings found before a later lowering error are kept.

BREAKING CHANGE: `Stmt::SystemTask` of the SV analyzer IR gains a
`site` field, and `FrontendWarning` becomes a struct of a
`FrontendWarningKind` and an optional `WarningLocation`.

Change-Id: Idc622a1e6b7e0f6c7248f502ffeb66b69129246d
IEEE 1800-2023 24.7 ignores `$exit` outside a program block and allows a
warning. Celox has no program blocks, so every call is ignored; each now
reports an `ExitOutsideProgram` warning at the call.

Change-Id: I6237a6ddf9ea602596be02e81e921b44240077c2
…ction $exit

A $exit in a constant function warns at its call. Interface probes and
earlier mixed-language passes keep their warnings when the build fails
before the design lowers again.

Change-Id: I57950c1a34f32ff98d495831919bd9df293f8d70
@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. What shall we delve into next?

Reviewed commit: d7568d94e0

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@tignear tignear added the merge-ready Request merging through Mergify after required checks label Oct 18, 2026
@mergify mergify Bot added the queued Mergify queue entry label Oct 18, 2026
@mergify

mergify Bot commented Oct 18, 2026 •

Copy link
Copy Markdown
Contributor

Merge Queue Status

This pull request spent 54 minutes 28 seconds in the queue, including 46 minutes 21 seconds running CI.

Reason

The merge conditions cannot be satisfied due to failing checks

  • Queue validation
  • Rust Test & NAPI Build

Failing checks:

Hint

You may have to fix your CI before adding the pull request to the queue again.
If you update this pull request, to fix the CI, it will automatically be requeued once the queue conditions match again.
If you think this was a flaky issue instead, you can requeue the pull request, without updating it, by posting a @mergifyio queue comment.

Waiting for
  • check-success = Queue validation
  • any of: [🛡 GitHub repository ruleset rule master]
    • check-neutral = @github-actions/Rust Test & NAPI Build
    • check-skipped = @github-actions/Rust Test & NAPI Build
    • check-success = @github-actions/Rust Test & NAPI Build
All conditions
  • check-success = Queue validation
  • any of [🛡 GitHub repository ruleset rule master]:
    • check-neutral = @github-actions/Rust Test & NAPI Build
    • check-skipped = @github-actions/Rust Test & NAPI Build
    • check-success = @github-actions/Rust Test & NAPI Build
  • check-success = Conventional Commit title
  • any of [🛡 GitHub repository ruleset rule master]:
    • check-success = @github-actions/Lint & Format
    • check-neutral = @github-actions/Lint & Format
    • check-skipped = @github-actions/Lint & Format
  • any of [🛡 GitHub repository ruleset rule master]:
    • check-success = @github-actions/NAPI Build (Linux ARM64 GNU)
    • check-neutral = @github-actions/NAPI Build (Linux ARM64 GNU)
    • check-skipped = @github-actions/NAPI Build (Linux ARM64 GNU)
  • any of [🛡 GitHub repository ruleset rule master]:
    • check-success = @github-actions/NAPI Build (Windows)
    • check-neutral = @github-actions/NAPI Build (Windows)
    • check-skipped = @github-actions/NAPI Build (Windows)
  • any of [🛡 GitHub repository ruleset rule master]:
    • check-success = @github-actions/JS Test (Ubuntu)
    • check-neutral = @github-actions/JS Test (Ubuntu)
    • check-skipped = @github-actions/JS Test (Ubuntu)
  • any of [🛡 GitHub repository ruleset rule master]:
    • check-success = @github-actions/JS Test (Windows)
    • check-neutral = @github-actions/JS Test (Windows)
    • check-skipped = @github-actions/JS Test (Windows)
  • any of [🛡 GitHub repository ruleset rule master]:
    • check-success = @github-actions/Conventional Commit title
    • check-neutral = @github-actions/Conventional Commit title
    • check-skipped = @github-actions/Conventional Commit title

Requeued — the merge queue status continues in this comment ↓.

@mergify mergify Bot added dequeued Mergify stopped this queue entry; investigate before retrying and removed queued Mergify queue entry labels Oct 18, 2026
@tignear
tignear force-pushed the feature/sv-warning branch from d7568d9 to 6914595 Compare October 19, 2026 04:16
@tignear tignear removed the dequeued Mergify stopped this queue entry; investigate before retrying label Oct 19, 2026
@tignear

tignear commented Oct 19, 2026

Copy link
Copy Markdown
Contributor Author

Fixed the failure that dequeued this PR from draft #1518 in 69145954f8504db405d1e038d21c315851353ec8.

The ARM64 job failed in "Check x86-64 cross-codegen from AArch64": initialize_native_image returned early in a foreign-codegen configuration, so mut warnings was unused and failed under -D warnings. The warning vector is now immutable and moves into the error only if native image loading fails.

Validation:

  • Reproduced the same unused-mut failure on x86-64 using the mirrored arm64-codegen configuration before the fix.
  • cargo check --locked -p celox -p celox-bench --no-default-features --features arm64-codegen passed after the fix.
  • The corresponding x86_64-codegen facade/benchmark check passed.
  • Native image/execution integration: 24 passed; initialization-warning regression: 1 passed.
  • Affected-crate all-target clippy, formatting, and pre-push checks passed.

Native AArch64 checks will run again in the queue. Removed dequeued after investigating and fixing the failure.

@Mergifyio queue

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 69145954f8

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread crates/celox-sv-analyzer/src/parsed.rs Outdated
analyze::analyze_source(source)
})
});
ir.map(|ir| ir.with_warnings(warnings))

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Carry package warnings into expression-override IR

Fresh evidence beyond the earlier public-entry-point fix: when analyze_source_module_with_parameter_expr_overrides analyzes a source containing a package whose constant initializer executes $exit, analyze_packages stores that diagnostic in Packages::warnings(), but this return attaches only warnings collected during the subsequent module analysis. Because the package collector has already ended, the returned Ir::warnings() silently omits the package warning; merge the internally created package warnings into the IR on this path.

Useful? React with 👍 / 👎.

@mergify mergify Bot added the queued Mergify queue entry label Oct 19, 2026
@mergify

mergify Bot commented Oct 19, 2026 •

Copy link
Copy Markdown
Contributor

Merge Queue Status

  • ✅ Entered queue — 2026-10-19 04:52 UTC · Rule: changes · triggered by rule Queue explicitly requested merges
  • 🟠 Checks running · on draft merge queue: checking #1432 on master (08cb566) #1523
  • 🚫 Left the queue — 2026-10-19 05:01 UTC · at 69145954f8504db405d1e038d21c315851353ec8

This pull request spent 8 minutes 23 seconds in the queue, with no time running CI.

Reason

Pull request #1432 has been dequeued

Queue conditions are not satisfied:

  • label = merge-ready

Hint

You should look at the reason for the failure and decide if the pull request needs to be fixed or if you want to requeue it.
If you do update this pull request, it will automatically be requeued once the queue conditions match again.
If you think this was a flaky issue instead, you can requeue the pull request, without updating it, by posting a @mergifyio queue comment.

Waiting for
  • check-success = Queue validation
  • any of: [🛡 GitHub repository ruleset rule master]
    • check-neutral = @github-actions/Lint & Format
    • check-skipped = @github-actions/Lint & Format
    • check-success = @github-actions/Lint & Format
  • any of: [🛡 GitHub repository ruleset rule master]
    • check-neutral = @github-actions/NAPI Build (Linux ARM64 GNU)
    • check-skipped = @github-actions/NAPI Build (Linux ARM64 GNU)
    • check-success = @github-actions/NAPI Build (Linux ARM64 GNU)
  • any of: [🛡 GitHub repository ruleset rule master]
    • check-neutral = @github-actions/NAPI Build (Windows)
    • check-skipped = @github-actions/NAPI Build (Windows)
    • check-success = @github-actions/NAPI Build (Windows)
  • any of: [🛡 GitHub repository ruleset rule master]
    • check-neutral = @github-actions/Rust Test & NAPI Build
    • check-skipped = @github-actions/Rust Test & NAPI Build
    • check-success = @github-actions/Rust Test & NAPI Build
  • any of: [🛡 GitHub repository ruleset rule master]
    • check-neutral = @github-actions/JS Test (Ubuntu)
    • check-skipped = @github-actions/JS Test (Ubuntu)
    • check-success = @github-actions/JS Test (Ubuntu)
  • any of: [🛡 GitHub repository ruleset rule master]
    • check-neutral = @github-actions/JS Test (Windows)
    • check-skipped = @github-actions/JS Test (Windows)
    • check-success = @github-actions/JS Test (Windows)
All conditions
  • check-success = Queue validation
  • any of [🛡 GitHub repository ruleset rule master]:
    • check-neutral = @github-actions/Lint & Format
    • check-skipped = @github-actions/Lint & Format
    • check-success = @github-actions/Lint & Format
  • any of [🛡 GitHub repository ruleset rule master]:
    • check-neutral = @github-actions/NAPI Build (Linux ARM64 GNU)
    • check-skipped = @github-actions/NAPI Build (Linux ARM64 GNU)
    • check-success = @github-actions/NAPI Build (Linux ARM64 GNU)
  • any of [🛡 GitHub repository ruleset rule master]:
    • check-neutral = @github-actions/NAPI Build (Windows)
    • check-skipped = @github-actions/NAPI Build (Windows)
    • check-success = @github-actions/NAPI Build (Windows)
  • any of [🛡 GitHub repository ruleset rule master]:
    • check-neutral = @github-actions/Rust Test & NAPI Build
    • check-skipped = @github-actions/Rust Test & NAPI Build
    • check-success = @github-actions/Rust Test & NAPI Build
  • any of [🛡 GitHub repository ruleset rule master]:
    • check-neutral = @github-actions/JS Test (Ubuntu)
    • check-skipped = @github-actions/JS Test (Ubuntu)
    • check-success = @github-actions/JS Test (Ubuntu)
  • any of [🛡 GitHub repository ruleset rule master]:
    • check-neutral = @github-actions/JS Test (Windows)
    • check-skipped = @github-actions/JS Test (Windows)
    • check-success = @github-actions/JS Test (Windows)
  • check-success = Conventional Commit title
  • any of [🛡 GitHub repository ruleset rule master]:
    • check-success = @github-actions/Conventional Commit title
    • check-neutral = @github-actions/Conventional Commit title
    • check-skipped = @github-actions/Conventional Commit title

Requeued — the merge queue status continues in this comment ↓.

@mergify mergify Bot mentioned this pull request Oct 19, 2026
26 of 72 tasks
@tignear tignear removed the merge-ready Request merging through Mergify after required checks label Oct 19, 2026
@tignear

tignear commented Oct 19, 2026

Copy link
Copy Markdown
Contributor Author

@Mergifyio dequeue

Pausing this PR while replacing the thread-local warning collector with explicit diagnostic ownership, as requested in review. Validation and queueing will resume after the revision.

@mergify mergify Bot added dequeued Mergify stopped this queue entry; investigate before retrying and removed queued Mergify queue entry labels Oct 19, 2026
Derive constant-function diagnostics from declarations without a thread-local
collector or interpreter side effects. Cache immutable per-component metadata
in ParsedSource and publish warnings through IR and AnalyzerError on success
and failure. Preserve underlying error classification and source chaining.

Diagnose ignored $exit calls in function declarations even when unused; document
this policy and test module isolation and failed package/interface analyses.

Preserve warnings through interface probing, simulator initialization and
test-runner validation errors. Deduplicate by source call and category across
parameterized specializations, retaining payload identity for unlocated calls.
Keep foreign-codegen builds warning-free. Track interface-probe diagnostic
provenance investigation in #1512.

AnalyzerError gains WithWarnings with warnings() and into_error() accessors;
the unreleased ambient collect_warnings API is removed.

Change-Id: I44fd6f2cc3ae57cf1c231bb8fa13bfa264c5d300
@tignear
tignear force-pushed the feature/sv-warning branch from 6914595 to 841d49f Compare October 19, 2026 05:16
@tignear tignear added merge-ready Request merging through Mergify after required checks and removed dequeued Mergify stopped this queue entry; investigate before retrying labels Oct 19, 2026
@tignear

tignear commented Oct 19, 2026

Copy link
Copy Markdown
Contributor Author

Revised at 841d49f: removed the warning-specific thread_local, restoration guard, ambient collect_warnings API, and warning emission from constant evaluation.

Function diagnostics are now derived from declarations. ParsedSource caches immutable per-component diagnostics, and Ir, Packages, and AnalyzerError own their warnings explicitly. Frontend callers read those values on success and failure. New tests cover repeated module analyses without leakage, failed analyses, failed packages, and failed interface shapes.

Behavior policy: ignored $exit calls in function declarations warn even if the function is unused. This is documented in both guides; IEEE 1800-2023 §24.7 permits the warning, while declaration-time reporting is Celox's policy. Additional compatibility change: public AnalyzerError gains WithWarnings; warnings() exposes diagnostics and into_error() preserves classification of the underlying error. The original PR compatibility notes otherwise still apply.

Validation passed:

  • analyzer/frontend: 377 + 1 tests (4 ignored)
  • SystemVerilog integration: 2913 tests (100 ignored)
  • SV DPI: 68 tests
  • NAPI Rust boundary: 31 tests
  • affected-crate all-target clippy, formatting and pre-push checks
  • facade/bench checks with both arm64-codegen and x86_64-codegen feature configurations on the x86 host (not a native ARM execution test)

The queue was paused while replacing the diagnostic architecture. Restoring the queue request for this validated revision.

@Mergifyio queue

@mergify mergify Bot added the queued Mergify queue entry label Oct 19, 2026
@mergify

mergify Bot commented Oct 19, 2026 •

Copy link
Copy Markdown
Contributor

Merge Queue Status

  • ✅ Entered queue — 2026-10-19 05:48 UTC · Rule: changes · triggered by rule Queue explicitly requested merges
  • ✅ Checks passed · on draft merge queue: checking #1432 on master (08cb566) #1528
  • ✅ Merged — 2026-10-19 06:51 UTC · at 6fc1fc561070a1f0754aaa4b889246afe6344ab5 · merge

This pull request spent 1 hour 3 minutes in the queue, including 1 hour 1 minute 14 seconds running CI.

Required conditions to merge
  • check-success = Conventional Commit title
  • check-success = Queue validation
  • any of [🛡 GitHub repository ruleset rule master]:
    • check-success = @github-actions/Lint & Format
    • check-neutral = @github-actions/Lint & Format
    • check-skipped = @github-actions/Lint & Format
  • any of [🛡 GitHub repository ruleset rule master]:
    • check-success = @github-actions/NAPI Build (Linux ARM64 GNU)
    • check-neutral = @github-actions/NAPI Build (Linux ARM64 GNU)
    • check-skipped = @github-actions/NAPI Build (Linux ARM64 GNU)
  • any of [🛡 GitHub repository ruleset rule master]:
    • check-success = @github-actions/NAPI Build (Windows)
    • check-neutral = @github-actions/NAPI Build (Windows)
    • check-skipped = @github-actions/NAPI Build (Windows)
  • any of [🛡 GitHub repository ruleset rule master]:
    • check-success = @github-actions/Rust Test & NAPI Build
    • check-neutral = @github-actions/Rust Test & NAPI Build
    • check-skipped = @github-actions/Rust Test & NAPI Build
  • any of [🛡 GitHub repository ruleset rule master]:
    • check-success = @github-actions/JS Test (Ubuntu)
    • check-neutral = @github-actions/JS Test (Ubuntu)
    • check-skipped = @github-actions/JS Test (Ubuntu)
  • any of [🛡 GitHub repository ruleset rule master]:
    • check-success = @github-actions/JS Test (Windows)
    • check-neutral = @github-actions/JS Test (Windows)
    • check-skipped = @github-actions/JS Test (Windows)
  • any of [🛡 GitHub repository ruleset rule master]:
    • check-success = @github-actions/Conventional Commit title
    • check-neutral = @github-actions/Conventional Commit title
    • check-skipped = @github-actions/Conventional Commit title

@mergify mergify Bot mentioned this pull request Oct 19, 2026
40 of 71 tasks
@mergify
mergify Bot merged commit 6fc1fc5 into master Oct 19, 2026
31 checks passed
@mergify
mergify Bot deleted the feature/sv-warning branch October 19, 2026 06:51
@mergify mergify Bot removed the queued Mergify queue entry label Oct 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

merge-ready Request merging through Mergify after required checks

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant