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

Version ranges should handle prerelease versions the same way npm does #20302

Closed
munificent opened this issue Jul 31, 2014 · 3 comments
Closed
Assignees
Labels
type-enhancement A request for a change that isn't a bug

Comments

@munificent
Copy link
Member

Currently in pub, a constraint like "<1.0.0" will allow "1.0.0-dev". In practice, this rarely matters because it will try any non-prerelease version before considering 1.0.0-dev, but I think it's still goes against the user's intuition.

It seems totally wrong to allow an experimental unstable version of something whose stable version you don't allow. Npm's interpretation is:

>1.2.3 Greater than a specific version.

<1.2.3 Less than a specific version. If there is no prerelease tag on the version range, then no prerelease version will be allowed either, even though these are technically "less than".

>=1.2.3 Greater than or equal to. Note that prerelease versions are NOT equal to their "normal" equivalents, so 1.2.3-beta will not satisfy this range, but 2.3.0-beta will.

<=1.2.3 Less than or equal to. In this case, prerelease versions ARE allowed, so 1.2.3-beta would satisfy.

I think we should change pub to match this. I don't think it will impact many users because pre-release versions are already deprioritized by the solver.

@nex3
Copy link
Member

nex3 commented Jul 31, 2014

I agree.

@munificent
Copy link
Member Author

Added Fixed label.

@DartBot
Copy link

DartBot commented Jun 5, 2015

This issue has been moved to dart-lang/pub#1076.

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type-enhancement A request for a change that isn't a bug
Projects
None yet
Development

No branches or pull requests

4 participants