Commit graph

9 commits

Author SHA1 Message Date
Mikkel Nygaard Ravn 681192a042
Fix test that makes assumptions about the impl of async method (#14804) 2018-02-21 20:47:26 +01:00
Greg Spencer 389e13f8b9
Fixing the pub get test so that it doesn't care what the flutter root looks like. (#13385) 2017-12-06 13:27:29 -08:00
Kevin Moore 13a6d40f90
flutter_tools: ensure the context value passed to pub is consistent (#13366)
Adds a class `PubContext` with a fixed set of allowed values
Make it clear these values should not be changed casually

Fixed one inconsistency already: update_packages vs update_pkgs
Provide more information for verify calls
Eliminate `ctx_` prefix.
2017-12-06 08:10:56 -08:00
Greg Spencer f29ecba6de
Use .pub-cache from Flutter root, if it exists. (#13358)
The purpose of this PR is to make it so that when the user runs 'flutter', if they have a .pub-cache directory in their flutter root, we use that instead of the default location for the pub cache. Otherwise, it should act as before.

The eventual goal is to support a pre-populated flutter .zip/.tar.gz file that has everything the developer needs in one bundle. In order for that to actually work, we need to have the pub cache be self-contained, and not in the user's home dir.

Another advantage of this is that if you have multiple flutter repos that you're switching between, then the versions in the pub cache will remain static when you switch between them.

This is an attempt to re-land: #13248. Includes a fix for the test that makes it work on bots in the presence of PUB_CACHE being set, and no other changes.
2017-12-05 14:46:39 -08:00
Greg Spencer c89cf6ccc6
Reverting my .pub-cache change to figure out why it's still failing. (#13355)
* Revert "Add tests."

This reverts commit 31bad961ff.

* Revert "Use .pub-cache from Flutter root, if it exists. (#13248)"

This reverts commit 72d6bcc3f7.
2017-12-05 12:51:18 -08:00
Greg Spencer 3174443e0e
Fix a problem with the flutter_tools/test/dart/pub_get_test.dart test. (#13354)
It turns out that when a PR build clones the flutter repo, it puts it into a directory called "flutter", and when the "real" build clones the flutter repo, it puts it into a directory called "build". This allowed the tests to succeed in my PR, but fail when I committed it.

This fixes the test so it doesn't depend on the cloned directory name.
2017-12-05 12:30:13 -08:00
Greg Spencer 72d6bcc3f7
Use .pub-cache from Flutter root, if it exists. (#13248)
The purpose of this PR is to make it so that when the user runs 'flutter', if they have a .pub-cache directory in their flutter root, we use that instead of the default location for the pub cache. Otherwise, it should act as before.

The eventual goal is to support a pre-populated flutter .zip/.tar.gz file that has everything the developer needs in one bundle. In order for that to actually work, we need to have the pub cache be self-contained, and not in the user's home dir.

Another advantage of this is that if you have multiple flutter repos that you're switching between, then the versions in the pub cache will remain static when you switch between them.
2017-12-05 12:02:14 -08:00
Kevin Moore c25608d83b
Provide more information in PUB_ENVIRONMENT for pub get/upgrade (#13307)
* Provide more information in PUB_ENVIRONMENT for `pub get/upgrade`

Should help diagnose and fix https://github.com/dart-lang/pub-dartlang-dart/issues/636
2017-12-01 16:20:06 -08:00
Ian Hickson 2cbc4a0202 Make "pub get" retry once a second when it fails. (#11882) 2017-08-31 19:35:05 -07:00