You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Would be nice if flutter run only downloaded the necessary artifacts #6491
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.
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.
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.
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).
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.
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.
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.
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
Activity
eseidelGoogle commentedon Oct 29, 2016
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.
olostan commentedon 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 commentedon 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 commentedon Feb 17, 2017
The flutter-intellij plugin has considered even working around this issue themselves: flutter/flutter-intellij#730
xster commentedon 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 commentedon Jul 24, 2017
I'm confused. Rebuilding the flutter_tools snapshot shouldn't involve the network. Only downloading the engine artifacts should?
Hixie commentedon 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 commentedon Jan 16, 2019
cc @jonahwilliams
2 remaining items
jonahwilliams commentedon Feb 22, 2019
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 commentedon Apr 22, 2019
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.
jonahwilliams commentedon Aug 31, 2020
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 commentedon 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 commentedon Aug 31, 2020
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 commentedon Sep 1, 2020
A possible related issue #64822 (Cache the SDK on switching channel).