Skip to content

Improve MiMa failure error message #19613

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Feb 5, 2024

Conversation

nicolasstucki
Copy link
Contributor

@nicolasstucki nicolasstucki commented Feb 5, 2024

Now it tells which filer list is related to this test. Change suggested by @odersky.

Example failure:

[error] scala3-library-bootstrapped: Failed binary compatibility check against org.scala-lang:scala3-library_3:3.3.0! Found 1 potential problems (filtered 35)
[error]  * abstract method ValOrDefDefMethods()scala.quoted.Quotes#reflectModule#ValOrDefDefMethods in interface scala.quoted.Quotes#reflectModule does not have a correspondent in other version
[error]    filter with: ProblemFilters.exclude[DirectMissingMethodProblem]("scala.quoted.Quotes#reflectModule.ValOrDefDefMethods")
[error] 
[error] Filers in MiMaFilters.Scala3Library are used in this check
[error]  
[error] stack trace is suppressed; run last scala3-library-bootstrapped / mimaReportBinaryIssues for the full output
[error] (scala3-library-bootstrapped / mimaReportBinaryIssues) Failed binary compatibility check against org.scala-lang:scala3-library_3:3.3.0! Found 1 potential problems (filtered 35)

More documentation is available in MiMaFilters.Scala3Library.

Refactored filter lists to strengthen TastyCore and Interfaces to use separate backward and forwards lists. Also extracted the Scala2LibraryBootstrappedMiMaFileters to reduce noise in the MiMaFilter files.

Now it tells which filer list is related to this test
Extract the Scala 2 library bootstrapped breaking changes into a separate
file. These are not that important, there we care more about the TASTy MiMa.
This makes it simpler to read and maintain the MiMaFilters.

Also some renaming to make the semantics of the lists more explicit.
mimaReportBinaryIssues.result.value match {
case Inc(inc: Incomplete) =>
streams.value.log.error(s"\nFilers in $issueFilterLocation are used in this check.\n ")
throw inc
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I am not sure if there is a cleaner way to do this.

@nicolasstucki nicolasstucki requested a review from sjrd February 5, 2024 11:43
@nicolasstucki nicolasstucki assigned sjrd and unassigned nicolasstucki Feb 5, 2024
@sjrd sjrd merged commit 30cd883 into scala:main Feb 5, 2024
@sjrd sjrd deleted the improve-mima-reporting branch February 5, 2024 14:18
@Kordyjan Kordyjan added this to the 3.4.1 milestone Feb 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants