-
Notifications
You must be signed in to change notification settings - Fork 29.8k
Closed
Labels
P1High-priority issues at the top of the work listHigh-priority issues at the top of the work lista: first hourThe first hour of using FlutterThe first hour of using Flutterc: new featureNothing broken; request for a new capabilityNothing broken; request for a new capabilitycustomer: productdependency: dartDart team may need to help usDart team may need to help ustoolAffects the "flutter" command-line tool. See also t: labels.Affects the "flutter" command-line tool. See also t: labels.
Description
Our package archives pre-caches packages in $FLUTTER_ROOT/.pub-cache, whereas normal Pub behavior is to use $HOME/.pub-cache. This causes a number of issues:
- If a developer has multiple Flutter SDKs installed (e.g. master + stable), they end up with two duplicated caches, wasting disk space
- If a developer has both a Flutter and Dart SDK installed, again they have duplicated caches
- General confusion over where the pub cache is located
- It causes package versioning issues when switching between SDKs or SDK versions. Often causes hard-to-debug issues with
pub global activatepackages with commands available from$PATH
The existence of and support for $FLUTTER_ROOT/.pub-cache supports the "offline" Flutter tool usage (e.g. flutter create --offline) as well as lowering the number of "post-installation" downloads the user has to suffer. But given that we don't advertise the --offline flag very well, many users aren't gaining its benefit. This leaves us with all the pain of the solution and little of the gain.
Two things we could do to improve this:
- Make the Flutter tool relocate
$FLUTTER_ROOT/.pub-cacheto$HOME/.pub-cachewhen it detects its existence. - Nudge users towards
--offlineif their command fails due to lack of connectivity.
timsneath, TimWhiting, jacob314, ookami-kb, sigurdm and 3 more
Metadata
Metadata
Assignees
Labels
P1High-priority issues at the top of the work listHigh-priority issues at the top of the work lista: first hourThe first hour of using FlutterThe first hour of using Flutterc: new featureNothing broken; request for a new capabilityNothing broken; request for a new capabilitycustomer: productdependency: dartDart team may need to help usDart team may need to help ustoolAffects the "flutter" command-line tool. See also t: labels.Affects the "flutter" command-line tool. See also t: labels.