Skip to content

Add FlattenInstanceAllowDedup#5162

Merged
jackkoenig merged 1 commit into
mainfrom
jackkoenig/flatten-allow-dedup
Jan 20, 2026
Merged

Add FlattenInstanceAllowDedup#5162
jackkoenig merged 1 commit into
mainfrom
jackkoenig/flatten-allow-dedup

Conversation

@jackkoenig

Copy link
Copy Markdown
Contributor

We ought to make the normal inline and flattening APIs allow dedup as the reasons they blocked dedup are now better handled by prefixing + dedup groups, but within the current API this is still useful.

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

  • Feature (or new API)

Desired Merge Strategy

  • Squash

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) and clean up the commit message.
    • Merge: Ensure that contributor has cleaned up their commit history, then merge with Create a merge commit.

@jackkoenig jackkoenig requested a review from seldridge January 20, 2026 17:53
@jackkoenig jackkoenig added the Feature New feature, will be included in release notes label Jan 20, 2026
@jackkoenig jackkoenig force-pushed the jackkoenig/flatten-allow-dedup branch from b82c215 to 2570ca3 Compare January 20, 2026 19:33

@seldridge seldridge left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I'm surprised we don't have a FlattenSpec already!

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I was too lol

Comment on lines +51 to +61
.fileCheck("--implicit-check-not=module")(
"""|CHECK: module Leaf
|CHECK: endmodule
|CHECK: module Middle
|CHECK: endmodule
|CHECK: module Parent
|CHECK: endmodule
|CHECK: module Parent_1
|CHECK: endmodule
|CHECK: module Top
|CHECK: endmodule

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This might work:

Suggested change
.fileCheck("--implicit-check-not=module")(
"""|CHECK: module Leaf
|CHECK: endmodule
|CHECK: module Middle
|CHECK: endmodule
|CHECK: module Parent
|CHECK: endmodule
|CHECK: module Parent_1
|CHECK: endmodule
|CHECK: module Top
|CHECK: endmodule
.fileCheck("--implicit-check-not=' module '")(
"""|CHECK: module Leaf
|CHECK: module Middle
|CHECK: module Parent
|CHECK: module Parent_1
|CHECK: module Top

Ditto below.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Good tip, I was reaching for something like this, will give it a go.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Sadly that doesn't work (it doesn't catch the bugs I'm trying to catch) so I'll stick with this for now.

@jackkoenig jackkoenig merged commit ad40048 into main Jan 20, 2026
49 of 51 checks passed
@jackkoenig jackkoenig deleted the jackkoenig/flatten-allow-dedup branch January 20, 2026 22:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Feature New feature, will be included in release notes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants