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

MiMa for 2.7.0 and JDK9 classes #31693

Merged
merged 3 commits into from
Oct 20, 2022
Merged

MiMa for 2.7.0 and JDK9 classes #31693

merged 3 commits into from
Oct 20, 2022

Conversation

johanandren
Copy link
Member

Discovered something strange when trying to bump MiMa check to cover 2.7.0:

The MiMa plgin looks at classes in a single directory (mimaCurrentClassfiles), but our tricky JDK9+ only sources setup compile to a different directory under target/ (target/scala-2.13/CompileJdk9-classes vs the usual target/scala-2.13/classes).

This should mean that MiMa never covered those JDK9+ classes, however MiMa didn't fail until we added 2.7.0 to the MiMa check. I haven't been able to figure out why it didn't fail before with what to MiMa looks like classes being removed.

To workaround this I've added another plugin which is triggered by the JDK9 plugin and merges the regular class directory and the Jdk9 class directory into a separate directory, only for mima to do its binary compatibility check on.

Verified by triggering mima failures in both regular classes and JDK9 only classes.

Copy link
Member

@patriknw patriknw left a comment

Choose a reason for hiding this comment

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

LGTM after one nitpick
Mysterious.

project/MiMa.scala Outdated Show resolved Hide resolved
@patriknw patriknw merged commit 2e2f0dc into main Oct 20, 2022
@patriknw patriknw deleted the wip-mima-and-jdk9-classes branch October 20, 2022 09:15
@patriknw patriknw added this to the 2.7.1 milestone Oct 20, 2022
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.

2 participants