Skip to content

Conversation

@fabianschuiki
Copy link
Contributor

Add a -R option to the chisel3.UnitTests main class which mirrors the same option in scalatest's runner. This option allows the user to supply a reduced classpath to be searched for Chisel unit test classes. This allows discovery to be much faster in larger projects with many dependencies, since the classpath contains all dependencies, but the runpath can be limited to discover only test of the current project.

Type of Improvement

  • Feature (or new API)

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

@fabianschuiki fabianschuiki added the Feature New feature, will be included in release notes label Dec 16, 2025
@fabianschuiki
Copy link
Contributor Author

@jackkoenig Can we somehow waive the binary compatibility check? This touches APIs that have only seen experimental use so far an shouldn't break any real-world code.

try {
url.openConnection.setDefaultUseCaches(false)
} catch {
case e: IOException => // just ignore these
Copy link
Member

Choose a reason for hiding this comment

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

Is this right?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Taken verbatim from scalatest. I think they just do this on a best-effort basis. Like everything in scalatest.

@fabianschuiki fabianschuiki force-pushed the fschuiki/unit-test-runpath branch 2 times, most recently from 114c193 to 42b7f41 Compare December 17, 2025 00:52
@fabianschuiki
Copy link
Contributor Author

How can I merge this ignoring the binary compatibility check?

@jackkoenig
Copy link
Contributor

How can I merge this ignoring the binary compatibility check?

You need to add waivers here:

ProblemFilter.exclude[MissingClassProblem]("firrtl.ir*")

Of the style:

// UnitTests.Config should never have been public and was unused in public APIs
ProblemFilter.exclude[DirectMissingMethodProblem]("chisel3.UnitTests#Config.*")
ProblemFilter.exclude[IncompatibleResultTypeProblem]("chisel3.UnitTests#Config.*")
...

There might be a way to waive all types of problems with one ProblemFilter, I'm not sure

You can test this with:

./mill __.mimaReportBinaryIssues

@fabianschuiki
Copy link
Contributor Author

Oh nice, thanks a lot! 🎖️

Add a `-R` option to the `chisel3.UnitTests` main class which mirrors
the same option in scalatest's runner. This option allows the user to
supply a reduced classpath to be searched for Chisel unit test classes.
This allows discovery to be much faster in larger projects with many
dependencies, since the classpath contains all dependencies, but the
runpath can be limited to discover only test of the current project.
@fabianschuiki fabianschuiki force-pushed the fschuiki/unit-test-runpath branch from 42b7f41 to 89c868a Compare December 17, 2025 01:05
@fabianschuiki fabianschuiki enabled auto-merge (squash) December 17, 2025 01:05
@fabianschuiki fabianschuiki merged commit fc9ccf0 into main Dec 17, 2025
29 of 31 checks passed
@fabianschuiki fabianschuiki deleted the fschuiki/unit-test-runpath branch December 17, 2025 01:36
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.

4 participants