-
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
[Feature request] pub upgrade prompts #2038
Comments
Instead of duplicating information from the changelog in the pubspec, we could parse the changelog. |
|
@mit-mit the 2 use cases I think this might help with are:
|
Maybe an alternate solution is to actually represent the gradle dependencies as pub dependencies? |
@mit-mit I think that would be good to have on its own in addition to this, but there's also so much that can go into making plugin updates potentially breaking that I think it would be hard to completely capture everything as a dependency graph in pub. Off the top of my head:
This particular change involved Gradle dependencies, but there's a lot of confusing breaking plugin updates like this that don't. |
Now we have dependabot parsing changelogs for us when upgrading through that. But it would still be cool to have this as a feature in the pub client. |
For package updates that include breaking changes it can be sometimes useful to present the developer(package user) with a prompt showing a message provided by the package developer.
I think this would be useful when the change in the package requires more than just adjusting the code to a new API.
While the CHANGELOG is the official place to include such instructions the recent experience with upgrading flutter plugins to use AndroidX showed that many people don't always read these(e.g flutter/flutter#27226 flutter/flutter#27146 flutter/flutter#27156)
What I envision is that we could include some breaking change message with the upgrade(in pubspec.yaml?) which will result in something like the following when running
pub upgrade
:The 2 use cases I think this might help with are:
battery: ^0.2.0
in his pubspec, he sees there's a new major upgrade to the battery package, he goes to pubspec.yaml and changes tobattery: ^0.3.0
planning on spending some time figuring out the new API changes. But instead he gets some obscure Gradle error he doesn't know how to deal with.battery: any
. (yeah this is not recommended, but this happens in practice)I believe this would be mostly useful for Flutter plugins where it is common to require some manual environment setup steps from the package users(e.g set up API keys, config Gradle, config Info.plist, etc...)
cc @kevmoo @mklim
The text was updated successfully, but these errors were encountered: