-
Notifications
You must be signed in to change notification settings - Fork 6k
[et] Add support for building Dart SDK from source #55824
Conversation
|
It looks like this pull request may not have tests. Please make sure to add tests before merging. If you need an exemption, contact "@test-exemption-reviewer" in the #hackers channel in Discord (don't just cc them here, they won't see it!). If you are not sure if you need tests, consider this rule of thumb: the purpose of a test is to make sure someone doesn't accidentally revert the fix. Ask yourself, is there anything in your PR that you feel it is important we not accidentally revert back to how it was before your fix? Reviewers: Read the Tree Hygiene page and make sure this patch meets those guidelines before LGTMing. The test exemption team is a small volunteer group, so all reviewers should feel empowered to ask for tests, without delegating that responsibility entirely to the test exemption group. |
0acc7dd to
0edcd1f
Compare
|
@dcharkes Some questions I have *) Does the build-dart-from-source decision have to be made when invoking gn or can it be deferred into how ninja runs? I wonder if we should default to building Dart SDK from source from third_party/dart when using And then we add one flag which is "--dart-source-dir" that can be used to change which directory of dart we use. |
|
Thanks @dcharkes this seems super useful. |
Hm, in that case we should detect third_party/dart is a different checkout? than what DEPS specifies? E.g. using
I used Dart SDK for
These flags are passed to
sg!
This would prevent (P.S. I'm OOO for a couple of weeks starting shortly, so this PR will likely sit. Feel free to work on it, or land something different and close it.) |
I'd recommend against this because it will slow down local engine development workflows. The engine build uses a different RBE instance than the build out of the Dart tree, and is not configured to use RBE for Dart compilation, which will result in long initial build times. |
|
An overall concern I have with this change is repeating the same mistake that we made with |
|
Thanks for the contribution @dcharkes! Some thoughts (paraphrasing above):
No. I agree with @zanderso we should support a
No, for the reasons Zach outlines here: it will not be RBE compiled. If we want this feature, i.e. we believe building from source is a priority, and/or building from source by default is a priority, let's file a follow-up issue and discuss further.
Mixed. I can see parallels between |
matanlurey
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Needs a bit more thought, but I really appreciate the contribution/conversation starter.
That's not strictly* true anymore. It was true on Goma on RBE, but there's only one instance backing Dart & Flutter's RBE reclient builds. *: While we're using the same instance, its likely that builds out of the Flutter tree don't use exactly same configurations/inputs so we're probably not benefitting from the shared cache, yet. |
|
Triage: Looks like we aren't going to move ahead with this. Closing. But please re-open if I am mistaken. |
|
I will just comment that I ran into this recently, where the only reason I could actually debug flutter/flutter#156713 was because I was pointed to this PR that I could then patch-in. I wasted hours running my head against the well because of what turned out to be dart changes not being compiled* --- without (at least from what I saw) any warning. I am not married to this specific change, but the current state of affairs is not great. * or maybe half-compiled --- I managed to get a crash about mismatching sha's at one point which was when I finally figured out that something was wrong. |
|
I know this isn't exactly what you wanted, but we are adding support for custom GN args in I'll update our documentation as well to explain how the flag can be used: |
|
In theory this is good to go as |
|
SGTM. Thanks! |
Add support for building Dart from source (for doing HHH development locally).
Supports workflow tried in:
It would be even better if
etcould detect if third_party/dart is the expected version. But I'm not entirely sure how to approach that.Maybe the cli should be a config
--dart=prebuilt--dart=build--dart=build-fullinstead.(FYI: I'm OOO for the next couple of weeks.)