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 mill-mima to check binary compatibility #255

Merged
merged 4 commits into from
Jul 28, 2021

Conversation

lolgab
Copy link
Member

@lolgab lolgab commented Jul 16, 2021

I developed this plugin so we can check our ecosystem and avoid breakages of binary compatibility.
I think that at the point of maturity this ecosystem is, we should start to check for binary compatibility and avoid breaking it.
Let me know what you think :)

build.sc Outdated
Comment on lines 26 to 31
def mimaPreviousArtifacts = Agg.from(
VcsVersion
.vcsState()
.lastTag
.map(lastTag => ivy"com.lihaoyi::utest::$lastTag")
)
Copy link
Member Author

Choose a reason for hiding this comment

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

This makes mimaReportBinaryIssues check for binary compatibility with the last tag on Git.

@lolgab lolgab marked this pull request as ready for review July 16, 2021 11:44
Copy link
Member

@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.

Looks good to me.

As a first step. I think later, maybe after the next major release, we want to check against all versions, esp. the first of a major release.

@lolgab
Copy link
Member Author

lolgab commented Jul 16, 2021

@lefou Isn't it the point of major releases to be breaking and without binary compatibility guarantees? Or do you mean that, for example, 1.3.1 should check for both 1.3.0 and 1.0.0?

@lefou
Copy link
Member

lefou commented Jul 16, 2021

I meant, that we may need to configure more than one version, not only the last tag. As you already suggested, for 1.3.3 we should addionally check against 1.3.0 and probably also 1.0.0.

@lefou
Copy link
Member

lefou commented Jul 16, 2021

Warning: currently used mill version in this repo is 0.9.6-xx but mill-mima requires mill 0.9.8!

@lolgab
Copy link
Member Author

lolgab commented Jul 16, 2021

Another nice thing to check would be forward compatibility for patch releases, but for that, the plugin should be smarter, I guess.

@lolgab lolgab force-pushed the add-mill-mima branch 3 times, most recently from 974a893 to 9812173 Compare July 25, 2021 14:08
@lolgab
Copy link
Member Author

lolgab commented Jul 28, 2021

I'm experiencing a strange error. Locally the __.mimaReportBinaryIssues completes fine. But on Github Actions it fails to get the last tag, failing with:

[42/714] de.tobiasroeser.mill.vcs.version.VcsVersion.vcsState 
fatal: no tag exactly matches 'ffb80f4d367a93f42bb19122894c877b0288bf4c'
fatal: No names found, cannot describe anything.

@lefou Have you ever experienced this?

@lefou
Copy link
Member

lefou commented Jul 28, 2021

I'm experiencing a strange error. Locally the __.mimaReportBinaryIssues completes fine. But on Github Actions it fails to get the last tag, failing with:

[42/714] de.tobiasroeser.mill.vcs.version.VcsVersion.vcsState 
fatal: no tag exactly matches 'ffb80f4d367a93f42bb19122894c877b0288bf4c'
fatal: No names found, cannot describe anything.

@lefou Have you ever experienced this?

This is probably because GH by default does not check out the full history but only some (50?) commits. If your tag is more commits in the past, you won't see any tags. To change, add the fetch-depth option to the checkout action:

      - uses: actions/checkout@v2
        with:
          fetch-depth: 0

@lolgab
Copy link
Member Author

lolgab commented Jul 28, 2021

@lefou Gotcha! Thank you!

@lolgab lolgab merged commit 9090d45 into com-lihaoyi:master Jul 28, 2021
@lolgab lolgab deleted the add-mill-mima branch July 28, 2021 14:45
@lolgab
Copy link
Member Author

lolgab commented Jul 28, 2021

Thank you for the reviews!
Now I'm going to add the plugin to the various com-lihaoyi repositories!

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