Repository navigation
flutter tool downloading Dart SDK twice #14700
Description
Activity
- addedtoolAffects the "flutter" command-line tool. See also t: labels.Affects the "flutter" command-line tool. See also t: labels.a: first hourThe first hour of using FlutterThe first hour of using Flutter
on Feb 14, 2018 IDEs use the
bin/cache/dart-sdkpath; we'll need that to continue existing (or a migration plan for the IDE plugins).The migration plan forward would be to use
bin/cache/artifacts/engine/<linux-x64|darwin-x64|windows-x64>/dart-sdkinstead ofbin/cache/dart-sdk. Would that present a problem for IDE?Alternatively, we could potentially explore symlinks, but I'm not sure whether whether we're ok with only supporting more recent versions of Windows that supports symlinks... Maybe we already do?
@goderbauerSymlinks (or copying files on platforms w/o useable symlinks) would work.
The migration plan forward would be to use bin/cache/artifacts/engine/<linux-x64|darwin-x64|windows-x64>/dart-sdk
I'd have a preference for a path that clients could use that didn't need to have detailed knowledge about how to construct the path (that wasn't different per OS and rely on the correct OS ids).
bin/cache/dart-sdkis really pretty good from that perspective :) Keeping it would be great.In any case, heads up that tools are relying on the current path, and we'd want to have a migration plan and timeframe if we do decide to change.
Copying could work. The motivation for this bug is only to avoid a large download for the user.
I understand that introducing platform-sniffing code adds complexity into the tool, but creating symlinks or copying dart sdk puts increased cognitive load on the users(why there are two copies, if we end up copying which one is master, etc).
Of course we might have no choice but symlink/copy in case there is architectural problem with using platform-specific paths(like dependency_overrides section in flutter_tools/pubspec.yaml)
This could be a horrible idea, but another solution would be to have shell scripts that live in
bin/cache/dart-sdkthat call out to the platform-specific delegates.This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of
flutter doctor -vand a minimal reproduction of the issue.- locked as resolved and limited conversation to collaborators
on Sep 3, 2021
After #14610, those two SDKs are identical, yet we're still making the user download them both. That's ~116M of unnecessary download.
/cc @aam