Open iapicca opened 5 years ago
Please file this issue in the pub
client, see:
https://github.com/dart-lang/pub
@jonasfj @iapicca – I did the transfer!
I'm seconding this. I use many global Dart CLI tools. To name a few:
$ dart pub global list
mason_cli 0.1.0-dev.45
melos 2.9.0
patrol_cli 1.0.1+1
spec_cli 0.1.4
When I upgrade Flutter (and Dart with it), I have to manually activate
each of these packages. Such a small feature, but would be great to have it!
@sigurdm, perhaps we should consider this use-case in some of thoughts we're trying to collect around dart run
and friends.
Yes - indeed.
I would like to work on this.
Is this feature still wanted by the dart team? Are there any concerns/considerations that have to be evaluated first?
@sigurdm I don't mind an dart pub global update
or dart pub global upgrade
command.
What do you think?
@SunlightBro
The concern I have to with touching anything related to dart pub global
is always PUB_CACHE
, because:
PUB_CACHE
wrt. to dart pub global
must be compatible (or recomputed across SDK versions).PUB_CACHE
layouts.But if we can't do a dart pub global update
command without changing the layout in PUB_CACHE
, I don't see much harm.
Perhaps, we should debate if it's:
dart pub global update
, or,dart pub global upgrade
, and,--all
flag :rofl: I'm thinking we should probably aim to mirror behavior of dart pub upgrade
.
So maybe it's:
dart pub global upgrade [[--all] | <packages...>]
Examples
dart pub global upgrade --all
, upgrade all globally installed packagesdart pub global upgrade foo
, upgrade only foo
.dart pub global upgrade foo bar
, upgrade foo
and bar
.dart pub global upgrade
, print usage.Definitly get the concern about PUB_CACHE, My thought was to also have something like
dart pub global upgrade -n, --dry-run
that would list all packages that would be updated
@SunlightBro hmm, might I suggest you start by proposing what dart pub global upgrade --help
should print.
After all, if you're going to do this, the help page has to be written anyways.
And the --help
page effectively has to:
Hi, it's not a real issue, just a suggestion: in need to update a package (webdev) I had to run "pub global deactivate " and then "pub global activate ".
It's fine for a single package, but what if you need to upgrade several packages? Wouldn't be useful to have a "pub global update" command? Also is a command that I sort of expected to find.
Thanks for reading, keep up the good job Francesco