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

Add MIMA_CHECK_DIRECTION environment input for direction #98

Merged
merged 2 commits into from
Apr 15, 2023

Conversation

lolgab
Copy link
Owner

@lolgab lolgab commented Apr 15, 2023

This allows people to dynamically check for different directions, for example having multiple Github Actions checks for, one with backward and one with forward to check if source compatibility might be broken.

@lolgab lolgab marked this pull request as ready for review April 15, 2023 07:41
Copy link
Collaborator

@lefou lefou left a comment

Choose a reason for hiding this comment

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

This is a good idea and I wanted something like this myself. Conceptually this is also ok, as the mimaReportBinaryIssues target is a command, which is not cached.

Please note, that in upcomming Mill 0.11, you don't need a separate input target; you can just make the rhs of mimaCheckDirection an T.input. (com-lihaoyi/mill#2402)

@lolgab
Copy link
Owner Author

lolgab commented Apr 15, 2023

Great! I will keep in mind your suggestion to avoid the separate input when I will drop Mill 0.10.

@lolgab lolgab merged commit 5808cfe into main Apr 15, 2023
@lolgab lolgab deleted the check-direction-env branch April 15, 2023 08:24
@lefou
Copy link
Collaborator

lefou commented Apr 15, 2023

This allows people to dynamically check for different directions, for example having multiple Github Actions checks for, one with backward and one with forward to check if source compatibility might be broken.

Just nitpicking, you can't check source compatibility with this, as MiMa operates on byte code.

@lolgab
Copy link
Owner Author

lolgab commented Apr 15, 2023

@lefou Yes I know, but it's what people are using to have an approximation of it and also to have a way to check if new functionality has been added or not.
As an example, the README of sbt-version-policy says:

[MiMa] can only detect binary incompatibilities. To detect source incompatibilities, this
plugin uses MiMa in forward mode as an approximation. This is not always correct and may
lead to false positives or false negatives. This is a known limitation of the current
implementation.

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