Skip to content
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

Auto-generate MiMa exclusions via scalafix #503

Open
armanbilge opened this issue Aug 25, 2021 · 1 comment
Open

Auto-generate MiMa exclusions via scalafix #503

armanbilge opened this issue Aug 25, 2021 · 1 comment

Comments

@armanbilge
Copy link
Member

As proposed in #380 (comment).

The idea is to use @japgolly's API report machinery to automatically generate exclusions for known binary-compatible changes for facades as delineated in #461 (comment). This would enable us to use MiMa without the headache of an overwhelming number of false-positives. Furthermore, I think this would be a significant step towards an auto-generation scheme as described in #487 (comment).

I know MiMa exclusions can be specified via files (this is how Akka projects manage theirs) and also in the SBT build. The former strategy is very compatible with the API-report generation scheme, but requires an extra prePR step and CI overhead to keep this in sync with the source. If it's not too ambitious, I wonder if during the MiMa check the exclusions can be generated programmatically instead of read from a (programatically-generated) file. If it works, that would be a significant simplification and remove a burden from both maintenance and contribution.

@armanbilge
Copy link
Member Author

I was daydreaming about this and realized there was some subtlety I missed when I first wrote this up. Unlike API reports, which we want re-generated for every PR so we can compare the diff, we actually do not want to re-generate MiMa exclusions because these should be based on the last stable version. Generating exclusions based on the current code is self-serving and would let you sneak all kinds of bad stuff in ;)

With this in mind: MiMa exclusions should definitely be generated into files (like the API reports) and my idea above about dynamically loading the exclusions should be tossed. Furthermore, re-generating these exclusions should not happen in a prePR step, but only after releasing a new version of scala-js-dom.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant