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

Prerelease is included into the update proposal #956

Closed
eed3si9n opened this issue Sep 16, 2019 · 3 comments · Fixed by #1009
Closed

Prerelease is included into the update proposal #956

eed3si9n opened this issue Sep 16, 2019 · 3 comments · Fixed by #1009
Labels
bug Something isn't working

Comments

@eed3si9n
Copy link
Contributor

steps

scala/scala-collection-compat#254

problem

sbt-pgp 2.0.1-M3 is a prerelease version.

expectation

Prerelease versions should not proposed.

notes

#665 added sbt plugin proposal. I don't see anything about dependencyAllowPreRelease there, so I'm not sure where it's coming from.

@fthomas
Copy link
Member

fthomas commented Sep 16, 2019

Thanks for the report, @eed3si9n! I think this happened because sbt-updates considers 1.1.2-1 a prerelease (because of the -1) and therefore also lists 2.0.1-M3 as an acceptable newer version. Projects that use(d) sbt-pgp 1.1.2 received updates to 2.0.0 only.

@eed3si9n
Copy link
Contributor Author

Based on Semantic Versioning, I think it's fine to consider 1.1.2-1 a prerelease (even though there have been prior cases like Scala 2.9.1-1).

To simplify the discussion, let's suppose it was called sbt-pgp 1.1.2-M1 instead and suppose that was a legitimate milestone for sbt-pgp 1.1.2. Even still, I don't think the fact that the project used one prerelease should be considered a signal that it's at all safe to bump to a prerelease of sbt-pgp 2.0.1 or any other future versions.

According to https://semver.org/spec/v2.0.0.html#spec-item-9:

A pre-release version indicates that the version is unstable and might not satisfy the intended compatibility requirements as denoted by its associated normal version.

This is the case with sbt at least where we might be adding new API and removing APIs as we learn things, and I'd assume for most libraries too. If someone by accident merged a non-bincompat upstream library, they could end up producing a non-bincompat libraries themselves.

@fthomas
Copy link
Member

fthomas commented Sep 17, 2019

I agree with you that updating to a prerelease of a different version doesn't make much sense. There was another PR where ScalaTest was updated from 3.1.0-SNAP13 to 3.2.0-M1 but waiting for 3.1.0 final would have been the more sensible option here.

Btw, I think updates to a newer prerelease of the same version are fine, for example from 1.1.2-M1 to 1.1.2-M2.

@fthomas fthomas added the bug Something isn't working label Sep 17, 2019
fthomas added a commit that referenced this issue Sep 30, 2019
This contains code from #851 for preventing updates to a pre-release of
another version series. Version.selectNext is now responsible for
selecting the next version from a list of possible newer versions. This
functions implements the scheme described in
https://github.com/fthomas/scala-steward/blob/master/docs/faq.md#how-does-scala-steward-decide-what-version-it-is-updating-to
and also filters out all bumps between pre-releases of different version
series. This code incidentally also makes the code to deal with updates
from non-snapshot to snapshot versions (#485) superfluous.

Closes #956.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants