Skip to content

Conversation

davidbiancolin
Copy link
Contributor

This fixes a bug wherein Groups were not being captured in the parent Builder context, leading to the option not being serialized to the FIRRTL. This fixes that and cleans up the tests a bit per @seldridge's comments in a related PR.

Contributor Checklist

  • Did you add Scaladoc to every public function/method?
  • Did you add at least one test demonstrating the PR?
  • Did you delete any extraneous printlns/debugging code?
  • Did you specify the type of improvement?
  • Did you add appropriate documentation in docs/src?
  • Did you request a desired merge strategy?
  • Did you add text to be included in the Release Notes for this change?

Type of Improvement

  • Bugfix

Desired Merge Strategy

  • Squash: The PR will be squashed and merged (choose this if you have no preference).

Release Notes

Reviewer Checklist (only modified by reviewer)

  • Did you add the appropriate labels? (Select the most appropriate one based on the "Type of Improvement")
  • Did you mark the proper milestone (Bug fix: 3.6.x, 5.x, or 6.x depending on impact, API modification or big change: 7.0)?
  • Did you review?
  • Did you check whether all relevant Contributor checkboxes have been checked?
  • Did you do one of the following when ready to merge:
    • Squash: You/ the contributor Enable auto-merge (squash), clean up the commit message, and label with Please Merge.
    • Merge: Ensure that contributor has cleaned up their commit history, then merge with Create a merge commit.

@jackkoenig jackkoenig added the Bugfix Fixes a bug, will be included in release notes label Dec 18, 2024
Copy link
Contributor

@jackkoenig jackkoenig left a comment

Choose a reason for hiding this comment

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

Looks great, and I appreciate how you upgraded the tests as well!

@jackkoenig jackkoenig added this to the 6.x milestone Dec 18, 2024
@jackkoenig jackkoenig merged commit 0070570 into main Dec 18, 2024
17 of 18 checks passed
@jackkoenig jackkoenig deleted the dev/biancolin/fix-module-choice-under-di branch December 18, 2024 16:46
@mergify mergify bot added the Backported This PR has been backported label Dec 18, 2024
mergify bot pushed a commit that referenced this pull request Dec 18, 2024
* Use FileCheck in ModuleChoice tests; add a test
* DRY out module definitions in ModuleChoiceSpec
* Add a ModuleChoice test using Definition
* Ensure Groups are propagated to parent builder under D/I

(cherry picked from commit 0070570)

# Conflicts:
#	core/src/main/scala/chisel3/experimental/hierarchy/core/Definition.scala
@jackkoenig jackkoenig changed the title Dev/biancolin/fix module choice under di Fix ModuleChoice under D/I Dec 18, 2024
chiselbot pushed a commit that referenced this pull request Mar 7, 2025
* Fix ModuleChoice under D/I (#4569)

* Use FileCheck in ModuleChoice tests; add a test
* DRY out module definitions in ModuleChoiceSpec
* Add a ModuleChoice test using Definition
* Ensure Groups are propagated to parent builder under D/I

(cherry picked from commit 0070570)

# Conflicts:
#	core/src/main/scala/chisel3/experimental/hierarchy/core/Definition.scala

* Resolve backport conflicts

* Tweak tests back to 6.x-style

---------

Co-authored-by: David Biancolin <david.biancolin@gmail.com>
Co-authored-by: Jack Koenig <koenig@sifive.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Backported This PR has been backported Bugfix Fixes a bug, will be included in release notes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants