Migrate "pub get" to "dart pub get"
See original GitHub issueThe top-level pub
command is scheduled for deprecation in favor of dart pub
.
We added dart pub
in version 2.10.0
, so it might still be necessary to call pub get
for some older versions of the Dart SDK.
However, we plan to insert a deprecation warning in the top-level pub
command, in Dart 2.12.0
(next stable release of the Dart SDK). Hence, to avoid users experiencing a deprecation warning in pub get
output, it would be preferable to migrate to dart pub get
now.
Issue Analytics
- State:
- Created 3 years ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
dart pub get
Get is one of the commands of the pub tool. ... This command gets all the dependencies listed in the pubspec.yaml file in...
Read more >Updating your pub package to Dart 2 | by Filip Hracek - Medium
There's a migration guide here: dartlang.org/dart-2. Go read it, it has really useful bits of information, like the existence of the dart2_fix tool,...
Read more >convert | Dart Package - Pub.dev
Utilities for converting between data representations. Provides a number of Sink, Codec, Decoder, and Encoder types.
Read more >Using packages - Flutter documentation
Run flutter pub get in the terminal, or click Packages get in IntelliJ or Android Studio. Open lib/main.dart and replace its full contents...
Read more >Dart: pub get vs pub upgrade - Stack Overflow
If a dependency isn't locked, pub will get the latest version of that dependency that satisfies all the version constraints. This is the...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Currently we’re running tests by running
dart [pub snapshot path]
. This is to get the same pause-on-start behaviour as when running non-tests on the VM (so we don’t need to have separate code to handle this). This isn’t ideal, but it seemed better than having to maintain separate code to handle this.We used to set
DART_VM_OPTIONS=--pause_isolates_on_start=true
but that had the issue of cascading to child processes too, which can mess up user tests that spawn Dart instances. There’s a little discussion about that in https://github.com/dart-lang/pub/issues/1018.So for now, unless you think there will be breakage, I’ll leave the tests as-is but fix up the rest.
Yes, all
pub
commands should usedart pub
😃There is also
dart test
now, for running tests.