Skip to content

fix(veryl): preserve one-bit struct and union member selects - #1597

Merged
mergify[bot] merged 1 commit into
masterfrom
stack/tignear/fix/veryl-single-bit-aggregate-members/preserve-one-bit-struct-union-member-selects--c316b319
Oct 20, 2026
Merged

mergify[bot] merged 1 commit into
masterfrom
stack/tignear/fix/veryl-single-bit-aggregate-members/preserve-one-bit-struct-union-member-selects--c316b319

Conversation

@tignear

@tignear tignear commented Oct 20, 2026

Copy link
Copy Markdown
Contributor

A struct or union containing a single bit has an implicit packed width in
Veryl's TypeKind. Retain that dimension when lowering member selects instead
of rejecting a valid bit-0 access against zero dimensions. Leave scalar and
enum handling unchanged.

Add shared regressions for logic/reset fields, nested structs, union aliases
and FF reset/capture. These reproduce on stable master independently of the
Veryl HEAD dependency roll.

Validation:

  • Standalone master-based struct_constructor harness: 31 passed, including 16 new tests across all eight backend/reference variants.
  • Frontend units and affected enum/array/language integration tests: 506 passed; 12 existing ignores (reused evidence for identical Rust source and dependencies).
  • Both new shared cases pass Verilator and Icarus.
  • NAPI build and JS library's 422 tests pass with this exact Rust implementation.
  • Affected-crate Clippy, Rust formatting and diff checks pass.

A struct or union containing a single bit has an implicit packed width in
Veryl's TypeKind. Retain that dimension when lowering member selects instead
of rejecting a valid bit-0 access against zero dimensions. Leave scalar and
enum handling unchanged.

Add shared regressions for logic/reset fields, nested structs, union aliases
and FF reset/capture. These reproduce on stable master independently of the
Veryl HEAD dependency roll.

Validation:
- Standalone master-based struct_constructor harness: 31 passed, including 16 new tests across all eight backend/reference variants.
- Frontend units and affected enum/array/language integration tests: 506 passed; 12 existing ignores (reused evidence for identical Rust source and dependencies).
- Both new shared cases pass Verilator and Icarus.
- NAPI build and JS library's 422 tests pass with this exact Rust implementation.
- Affected-crate Clippy, Rust formatting and diff checks pass.

Change-Id: Ic316b3194f51bd72406e12e0fbdd64f31073bde7
@chatgpt-codex-connector

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-20T10:17:51.578388Z c9c17c9 PR opened
ℹ️ 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 20, 2026
@mergify mergify Bot added the queued Mergify queue entry label Oct 20, 2026
@mergify

mergify Bot commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor

Merge Queue Status

This pull request spent 2 hours 33 minutes 42 seconds in the queue, including 1 hour 6 minutes 30 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

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