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

Fail if tag is older than base version #105

Closed
armanbilge opened this issue Jan 26, 2022 · 4 comments · Fixed by #136 or #158
Closed

Fail if tag is older than base version #105

armanbilge opened this issue Jan 26, 2022 · 4 comments · Fixed by #136 or #158
Labels

Comments

@armanbilge
Copy link
Member

As long as you have binary-breaking changes on a branch, then tagging a non-breaking version number will fail the bincompat checks.

However, currently in sbt-typelevel the series/0.4 branch and main (base version 0.5) are actually binary-compatible, but semantically incompatible. So accidentally tagging 0.4.x on main would succeed in publishing, which is not what we want.

@armanbilge armanbilge added the bug label Jan 26, 2022
@rossabaker
Copy link
Member

I just commented somewhere else, but I'd also like to be scolded if the base version is older than the latest tag on the branch. I've seen MiMa failures at publish time because the new tag is the first time MiMa runs on new versions.

@armanbilge
Copy link
Member Author

Yes, I replied there too 😉 that is already supported: if the base version is older than the latest tag, it will fail to start sbt.

@armanbilge
Copy link
Member Author

@osleonard will work on this :)

@armanbilge armanbilge added this to the v0.5.0 milestone Jan 28, 2022
@armanbilge
Copy link
Member Author

@osleonard btw let me know if you need any more pointers, since this is a bug I'd really love to get this into the next release :)

Here's where do the check in the opposite direction, if the baseVersion is older than the latest tag:

.flatMap { previous =>
if (previous > baseV)
sys.error(s"Your tlBaseVersion $baseV is behind the latest tag $previous")
else if (baseV.isSameSeries(previous))
Some(previous)
else
None
}

@armanbilge armanbilge removed this from the v0.5.0 milestone Feb 2, 2022
osleonard added a commit to osleonard/sbt-typelevel that referenced this issue Feb 3, 2022
osleonard added a commit to osleonard/sbt-typelevel that referenced this issue Feb 3, 2022
osleonard added a commit to osleonard/sbt-typelevel that referenced this issue Feb 3, 2022
osleonard added a commit to osleonard/sbt-typelevel that referenced this issue Feb 3, 2022
osleonard added a commit to osleonard/sbt-typelevel that referenced this issue Feb 4, 2022
osleonard added a commit to osleonard/sbt-typelevel that referenced this issue Feb 4, 2022
osleonard added a commit to osleonard/sbt-typelevel that referenced this issue Feb 4, 2022
osleonard added a commit to osleonard/sbt-typelevel that referenced this issue Feb 4, 2022
osleonard added a commit to osleonard/sbt-typelevel that referenced this issue Feb 4, 2022
osleonard added a commit to osleonard/sbt-typelevel that referenced this issue Feb 4, 2022
@osleonard osleonard mentioned this issue Feb 4, 2022
This was linked to pull requests Feb 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants