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

Consider yanking the rc.0 release for a different one #504

Closed
thomaseizinger opened this issue Jan 30, 2023 · 2 comments
Closed

Consider yanking the rc.0 release for a different one #504

thomaseizinger opened this issue Jan 30, 2023 · 2 comments

Comments

@thomaseizinger
Copy link

Technically, nothing is wrong with releasing a different pre-release version. Pre-releases are by definition unstable and can make breaking changes.

However, as we can see from mcginty/snow#146, getting this wrong is very easy and I am not sure how many people are aware of the subtleties in how pre-release identifiers are compared: Lexically.

This means the just released rc.0 has a higher precedence than the the previous pre.5 release and thus, cargo automatically upgrades to it.

I think the impact on the ecosystem would be less if breaking changes between pre-releases were to use a different pre-release identifier: alpha for example.

@tarcieri
Copy link
Contributor

tarcieri commented Jan 30, 2023

It's expected for rc.0 to to be lexicographically higher than pre.*. It's newer and signals a higher level of maturity.

But even if it were e.g. pre.6, what would that matter?

The problem is snow is requiring ^4.0.0-pre.2. This will match any new prerelease, even if they contain breaking changes.

Arguably this behavior is a bug in the semver crate. Prereleases are expected to contain breaking changes.

The solution is for snow to lock to =4.0.0-pre.2 until upgrading to newer prereleases (or ideally soon, releases)

@thomaseizinger
Copy link
Author

Arguably this behavior is a bug in the semver crate. Prereleases are expected to contain breaking changes.

You are right. I just thought more about this and I came to the same conclusion. cargo likely shouldn't upgrade from one pre-release to the other (with the exception of alpha.1 to alpha.2 maybe?) But even that introduces a convention that people will have to learn.

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

No branches or pull requests

2 participants