Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Would be nice if flutter run only downloaded the necessary artifacts #6491

Open
eseidelGoogle opened this issue Oct 24, 2016 · 14 comments · Fixed by #27374 or #27735
Open

Would be nice if flutter run only downloaded the necessary artifacts #6491

eseidelGoogle opened this issue Oct 24, 2016 · 14 comments · Fixed by #27374 or #27735
Labels
c: new feature Nothing broken; request for a new capability P2 Important issues not at the top of the work list team-tool Owned by Flutter Tool team tool Affects the "flutter" command-line tool. See also t: labels. triaged-tool Triaged by Flutter Tool team

Comments

@eseidelGoogle
Copy link
Contributor

I was on a train with bad wifi. It was painful.

I was trying to run the gallery on an iOS Simulator.

%flutter run
Building flutter tool...
Downloading package sky_engine...                    8101ms
Running 'pub get' in sky_engine...                   450ms
Downloading package sky_services...                  596ms
Running 'pub get' in sky_services...                 3139ms
Downloading package flutter_services...              1929ms
Running 'pub get' in flutter_services...             2294ms
Building Dart SDK summary...                         1753ms
Downloading engine artifacts android-arm...          177027ms
Downloading engine artifacts android-arm-profile...  164117ms
Downloading engine artifacts android-arm-release...  115925ms
Downloading engine artifacts android-x64...          78964ms
Downloading engine artifacts android-x86...          78600ms
Downloading engine artifacts ios...                  178979ms
Downloading engine artifacts ios-profile...          189778ms
Downloading engine artifacts ios-release...          152586ms
Downloading darwin-x64 tools...                      232022ms
Downloading android-arm-profile/darwin-x64 tools...  34656ms
Downloading android-arm-release/darwin-x64 tools...  139862ms
Running 'pub get' in flutter_gallery...              870ms

FYI @danrubel

@eseidelGoogle eseidelGoogle added the tool Affects the "flutter" command-line tool. See also t: labels. label Oct 24, 2016
@sethladd sethladd added the c: new feature Nothing broken; request for a new capability label Oct 26, 2016
@eseidelGoogle
Copy link
Contributor Author

We've had a couple complaints about downloads being slow or not resuming well from users in china who have network issues. Unclear if this specific bug would help them though.

@Hixie Hixie added this to the 3: Make conferences happy milestone Nov 15, 2016
@olostan
Copy link

olostan commented Nov 15, 2016

Faced same issue when decided to do some coding in airport while waiting for the flight. Had to restart downloading couple of times, downloads were failing.

As an idea (except limitation of needed resources) - may be download in parallel? Sometimes on bad connections that helps.

@Hixie
Copy link
Contributor

Hixie commented Dec 9, 2016

I just had this with flutter analyze. There's really no reason to download an ARM engine if I want to analyze things... especially when I'm in a rush.

cc @danrubel @devoncarew @jason-simmons

@eseidelGoogle
Copy link
Contributor Author

The flutter-intellij plugin has considered even working around this issue themselves: flutter/flutter-intellij#730

@xster
Copy link
Member

xster commented Jul 24, 2017

Hard to work on flutter tools too on slow networks. Each dev cycle involves changing some code of the tools, clear the tool's snapshot but building the new flutter tools is a network dependent operation which can take a while.

@eseidelGoogle
Copy link
Contributor Author

I'm confused. Rebuilding the flutter_tools snapshot shouldn't involve the network. Only downloading the engine artifacts should?

@Hixie
Copy link
Contributor

Hixie commented Nov 21, 2017

This would also solve the issue where "flutter upgrade" fails because you're on a version that is unable to download all the artifacts for whatever reason (e.g. we failed to upload them).

@Hixie Hixie modified the milestones: 3: Current Milestone, 4: Next milestone Nov 21, 2017
@Hixie
Copy link
Contributor

Hixie commented Jan 16, 2019

cc @jonahwilliams

@jonahwilliams
Copy link
Member

This is somewhat blocked by the tree status, but is also related to how Gradle and XCode use artifacts. Currently they require everything up front, which we need to change eventually to make this work.

@jonahwilliams
Copy link
Member

We've made good progress on this. All new artifacts (macOS, Linux, Windows, Web, and Fuchsia) are lazy by default. There are still a few places in the tools where we end up downloading all of Android and iOS.

@jmagman jmagman added this to Awaiting triage in Tools - installer / upgrade review via automation Jan 11, 2020
@christopherfujino christopherfujino moved this from Awaiting triage to Engineer reviewed in Tools - installer / upgrade review Jan 23, 2020
@kf6gpe kf6gpe added the P2 Important issues not at the top of the work list label May 29, 2020
@kf6gpe kf6gpe removed this from the Goals milestone Jun 2, 2020
@Hixie Hixie removed this from the Goals milestone Jun 2, 2020
@Hixie Hixie removed this from the None. milestone Aug 17, 2020
@jonahwilliams
Copy link
Member

For additional context from #64446 (which I am de-duping into this bug). There are some remaining cases where we eagerly download artifacts for devices that are connected but that we do not intend to use - this has mostly come up with the non-ephemeral devices.

A reasonable fix would be to defer additional artifact downloading until after we have selected a device.

@xster
Copy link
Member

xster commented Aug 31, 2020

+1 I still run into this on scenarios like downloading ios-release tools when I flutter run (debug) on iOS devices etc.

@jonahwilliams
Copy link
Member

That one is slightly separate, we download all of the bundles (debug/profile/release) all at once because splitting them up ended up breaking too many integration tests (at the time). it might be easier now that the build systems have been cleaned up

@pedromassango
Copy link
Member

A possible related issue #64822 (Cache the SDK on switching channel).

@flutter-triage-bot flutter-triage-bot bot added team-tool Owned by Flutter Tool team triaged-tool Triaged by Flutter Tool team labels Jul 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c: new feature Nothing broken; request for a new capability P2 Important issues not at the top of the work list team-tool Owned by Flutter Tool team tool Affects the "flutter" command-line tool. See also t: labels. triaged-tool Triaged by Flutter Tool team
Projects
9 participants