Repository navigation
Use the Dart SDK built from Flutter engine rather than from dartlang.org - #14610
Conversation
|
@tvolkert, this is the follow-up to today's conversation regarding using engine's dart sdk instead of downloaded one. Immediate thing that gets broken with this switch is building of the flutter This is happening I believe because but engine's dart sdk is tagged as Looking at |
tvolkert
left a comment
There was a problem hiding this comment.
Changes lgtm, but you'll need to update update_dart_sdk.ps1 as well for Windows hosts.
|
thanks @tvolkert , I left the best for the last! |
|
/cc @goderbauer for Windows changes |
|
I don't see a description. Can you clarify, please, what this change does? |
|
@mit-mit, flutter engine has dart sdk built as an artifact. This change switches from using dart sdk downloaded based on dart sdk tag(that has to be advanced expliclty) from general dart sdk repository, to using dart sdk that is built as part of flutter engine build. |
|
Got it. Two follow-up questions then:
|
|
I don't think anything will change in regards to frequency of dart rolls into the engine. So flutter tools will be on same bleeding edge version of dart sdk as engine is. Yes, you will lose ability to override dart sdk version. Part of the reason is that dart sdk used by flutter tools has to produce kernel file that is compatible, can be consumed by the engine. That means at this point that both flutter tools and engine have to be on the same dart sdk. |
|
OK, that's sad, but I understand |
|
Would be nice to update the description of this PR to explain more what this does. :) Not clear from the comments what the consequences of this are. |
This is follow-up to flutter#14610
What then is the new process for rolling flutter framework to a new SDK? |
Flutter tools get the same bleeding edge dart sdk that Flutter engine is on as soon Flutter engine is rolled into Flutter tools. |
|
Right, but presumably the framework doesn't. That is, the file |
|
Right, the file should be deleted. |
|
Interesting. Couple of questions:
|
Yep
Correct. We used to refuse flutter_tools changes until they could be seamlessly rolled into Google. But the cognitive overhead benefits of having one Dart SDK version for all of Flutter was significant enough that we relaxed this constraint. It does mean that from time to time, we'll need to submit things like #14599 to work around this disparity in Dart SDK versions externally and internally.
Keep in mind that this only applies to the |
I think this is the source of confusion. You are talking about what is used to run flutter framework (and client) code, I'm talking about what is used to analyze flutter framework (and client) code. The flutter framework was always running inside flutter engine, but it was always being analyzed by something that was pinned to an earlier version. I understand from the comments above that this is no longer the case. |
|
Correct, that's no longer the case. The fact that it used to behave like that was itself a source of confusion since (a) whether it was analyzed inside the Flutter engine or using the host SDK was actually dependent upon whether you passed a |
|
Ok, interesting. So are flutter dev/stable releases going to try to use Dart dev/stable releases, or will y'all just go with whatever version of Dart is live at the time? |
|
We're not gonna match our dev/stable releases to Dart dev/stable releases. Our dev releases get cut every time we successfully roll Flutter into Google (which vets the commit as passing level-1 muster), with whatever Dart SDK commit happened to be live in that Flutter build. Each dev release is then a candidate to get promoted to a beta release (as long as it hasn't since been discovered to have release-blocking issues). And then every beta release is a candidate to get promoted to a more stable (e.g. release) channel. |
|
Ok, thanks for the clarification. This has a pretty large impact on how we roll out breaking changes, since it means that you guys will now need to be fixed up first |
Just one more comment on this - your level-1 muster here is probably substantially less validation than you're getting now, since you will only be testing out the Dart SDK that you roll into Google on Flutter code in Google, rather than on all Google Dart code, as is done when we roll dev releases . |
That's a good point, though the non-Flutter Google Dart code is for the most part AngularDart, so to some extent it's exercising different bits of the sdk. Nonetheless, we could choose to adopt a policy of only rolling Dart into the Flutter engine at dev-tagged milestones... thoughts @Hixie @cbracken ? |
|
Alternatively, I suppose you could make a point of always rolling our dev releases (in addition to the usual bleeding edge rolls), and then trying to choose your own dev releases from among those releases? I guess that constrains your release candidates pretty substantially though. |
* Use already downloaded dart sdk for frontend_server. This is follow-up to #14610 * Remove reference to engine dart-sdk from artifacts * Remove unused imports * WIP to switch back to solution where dart sdk is downloaded into bin/cache/dart-sdk, but it is 'flutter precache -a' that can download all dart sdks for other platforms under bin/cache/artifacts/engine/<platform>/dart-sdk * Download all dart sdks when 'flutter precache -a'
|
By the way, just to be clear, I definitely agree that having just one version of the Dart sdk in play in flutter at a time is a good thing. |
|
We've always been on a bleeding edge build of the Dart SDK for the code running on the user device, which is what I'm particularly concerned about; this doesn't change that. I'm not aware of that ever having caused a problem. |
Ok, just one more one more comment... :) You're actually not even getting your level-1 checkout for the analyzer from this, since analysis of internal flutter code is done with the standard Dart SDK rather than the flutter engine. I personally really think you would be well-advised to work with keerti to get some kind of automated presubmit run with your release candidates. |
…org (flutter#14610) * Use engine-built dart sdk * Download dart-sdk from engine * Move up deps to fix dart sdk constraint problem * Update update_dart_sdk.ps1 for Windows * Fix tests so they pass analysis * More types for tests * Roll engine * Update dart sdk stamp location in flutter.bat * Add newline
* Use already downloaded dart sdk for frontend_server. This is follow-up to flutter#14610 * Remove reference to engine dart-sdk from artifacts * Remove unused imports * WIP to switch back to solution where dart sdk is downloaded into bin/cache/dart-sdk, but it is 'flutter precache -a' that can download all dart sdks for other platforms under bin/cache/artifacts/engine/<platform>/dart-sdk * Download all dart sdks when 'flutter precache -a'
This switches Flutter tools from using dart sdk downloaded from the cloud based on the contents of
bin/internal/dart-sdk.versionto using dart sdk built as part of Flutter engine build.