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

Support pub upgrade --dry-run #42832

Open
timolehto opened this issue Oct 16, 2019 · 3 comments
Open

Support pub upgrade --dry-run #42832

timolehto opened this issue Oct 16, 2019 · 3 comments
Labels
c: new feature Nothing broken; request for a new capability P3 Issues that are less important to the Flutter project team-tool Owned by Flutter Tool team tool Affects the "flutter" command-line tool. See also t: labels. triaged-tool Triaged by Flutter Tool team

Comments

@timolehto
Copy link

The issue has mostly been resolved on the dart side already and it actually supports the --dry-run option dart-lang/sdk#15243. However, flutter does not. So in a dart project one can run:

pub upgrade --dry-run

But with a flutter project you can't do that. If you try using the pub command from dart sdk, you get this error:

Resolving dependencies...
Because card_communicator depends on flutter_test any from sdk which doesn't exist (the Flutter SDK is not available), version
  solving failed.

Flutter users should run `flutter pub get` instead of `pub get`.

And on the other hand:

$ flutter pub upgrade --dry-run
Could not find an option named "dry-run".


Run 'flutter -h' (or 'flutter <command> -h') for available flutter commands and options.

So, yeah would be super nice to get this feature also available for flutter side. @munificent you were heavily involved with the dart side of things. Maybe you know how this could be made to work for flutter? It sounds like the heavy lifting for this has already been done and supporting this on flutter side might be almost trivial?

@BondarenkoStas BondarenkoStas added c: new feature Nothing broken; request for a new capability tool Affects the "flutter" command-line tool. See also t: labels. labels Oct 16, 2019
@munificent
Copy link
Contributor

It should be doable as far as I know, but I don't know much about flutter pub.

@jonahwilliams
Copy link
Member

Interestingly flutter pub pub upgrade --dry-run works fine

@jmagman jmagman added this to Awaiting triage in Tools - Dart and pub review Jan 13, 2020
@mit-mit
Copy link
Member

mit-mit commented Mar 31, 2020

@jonahwilliams this is a general problem with all flags on pub commands. It looks like the overall Flutter flags parser errors out if you try to pass flags, even though the pub command implementation tries to just pass them onto to pub.

@jonahwilliams jonahwilliams moved this from Awaiting triage to Engineer reviewed in Tools - Dart and pub review Jul 6, 2020
@jmagman jmagman added the P3 Issues that are less important to the Flutter project label Aug 18, 2020
@flutter-triage-bot flutter-triage-bot bot added team-tool Owned by Flutter Tool team triaged-tool Triaged by Flutter Tool team labels Jul 8, 2023
@Hixie Hixie removed the easy fix label Aug 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c: new feature Nothing broken; request for a new capability P3 Issues that are less important to the Flutter project team-tool Owned by Flutter Tool team tool Affects the "flutter" command-line tool. See also t: labels. triaged-tool Triaged by Flutter Tool team
Projects
Tools - Dart and pub review
  
Engineer reviewed
Development

No branches or pull requests

7 participants