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

Prereleases come before releases #135

Closed
wants to merge 1 commit into from

Conversation

rossabaker
Copy link
Member

On http4s-fabric, there are three tags:

  • v1.0.0-M30
  • v1.0.0-M30.1 (trying to publish)
  • v1.0.0 (unpublished)

M30.1 is failing trying to MiMa the non-existent 1.0.0, because it thinks 1.0.0-M30.1 > 1.0.0. It should be filtered: a prerelease comes before the corresponding final release.

See http4s/http4s-fabric#1

@armanbilge
Copy link
Member

armanbilge commented Feb 3, 2022

The problem is there are two kinds of prereleases.

Doing this right means accounting for x.y.z-RCn comes before x.y.z but x.y.z-c6d2fdf comes after x.y.z.

#12 (comment)

So, to get this "right" we have to account for both situations: making the change here would mean that x.y.z-c6d2fdf is not checked against x.y.z.

However, in practice we can shunt this issue because previous MiMa artifacts are determined from tags, and there should never be a v1.0.0 tag when the current version is 1.0.0-M30. Is that the situation in fabric? Edit, ah I see it is. Is there a legit reason for that?

@rossabaker
Copy link
Member Author

Oh, I didn't think about snapshots. I think Maven has special handling for "alpha", "beta", "RC", and "M". Alternatively, it could be handled by looking for 7-hexdigit prereleases. Or, as noted, it could be handled just by not pushing tags too early.

@armanbilge
Copy link
Member

I would like to solve this :) I looked into Coursier and it has a very good Version model that seems to sort these right. So I think we can switch to that.

Closing for now since this is tracked by #14.

@armanbilge armanbilge closed this Feb 3, 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