-
Notifications
You must be signed in to change notification settings - Fork 230
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
pub global run needs to check if it should downgrade packages #2866
Comments
workaround, if the root package, in this case Hmm, I'm not sure this is new, I think the same issues existed when we shipped extension methods. There is patch in #2867 |
@mit-mit, please reflag if you think this is critical. From chat I think the conclusion is that this only affects users who downgrade SDK. In either case, the fix proposed will just print a prettier error message telling the user to run: Which is better than the error message above, but hardly the end of the world. If read probably the error message above, actually says:
Which is close to indicating: that this doesn't work because you downgraded you SDK version. |
I'm OK with removing critical given the new understanding. |
Closing this, as I think this was fixed as a side-effect of #4410 (checking the resolution before pub run) |
If you
pub global activate
a package on a recent SDK, and then downgrade to an older SDK,pub global run
may try to run with the same packages that may have SDK constraints in their pubspec disallowing them.As of today you can see this with the following example:
2.12.0-
version.pub global activate flutter_plugin_tools
. Picks upcharcode
version1.2.0
2.10.5
pub global run flutter_plugin_tools
.The text was updated successfully, but these errors were encountered: