-
Notifications
You must be signed in to change notification settings - Fork 229
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
Introduce a pub upgrade --(no)-allow-prereleases
flag.
#2471
Comments
One question we have not answered:
But it is not clear how to generalize this. (Should we allow that also transitively - what does |
The use case I feel the most strongly about is the one where a
The developer starts with this
Running Updates are now published on pub.dev:
The developer now hears about
The developer runs I suggest that a pub get/upgrade without an Could not resolve, foo They can then either use the flag, or change pubspec.yaml to:
|
I agree that this is probably the most desirable behavior, with a small tweak which is that we allow explicit pre-release dependencies in pre-release packages always. This way an explicit pre-release dependency in the root package is allowed to itself have pre-release deps without any warnings. Reasoning
|
@sigurdm recently did a warning to discourage this too.
We could enforce this, but I'm not sure we need to be this strict.
That, or we could print a warning if we use pre-releases in the solution. So 1st try to solve without pre-releases (except those allowed by root pubspec.yaml, or transitively from there), then try to solve with pre-releases if that doesn't work. And print a warning if we had to do a second resolution. |
If we go with the solution suggested by @jakemac53 two more questions came up while @jonasfj and i discussed this a bit:
|
My suggestion: Without the |
Are we still interested in this? |
It is somewhat surprising that the solver will use pre-releases for dependencies.
See eg. #2446
Ideally this would be off by default - but that might be a breaking change.
If solving without prereleases fails we should probably report that a solution exists with prereleases and mention the flag.
The text was updated successfully, but these errors were encountered: