-
Notifications
You must be signed in to change notification settings - Fork 29.7k
[native_assets] Use kernel concatenation #147158
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
Conversation
|
It looks like this pull request may not have tests. Please make sure to add tests before merging. If you need an exemption to this rule, contact "@test-exemption-reviewer" in the #hackers channel in Chat (don't just cc them here, they won't see it! Use Discord!). 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. |
|
@christopherfujino @stuartmorgan There are some implementation considerations for this PR.
I've taken the approach with the smallest complexity and smallest diff for now. Do you think we should incur the increased complexity for more speedy builds? |
|
FYI @mosuem |
| /// even though it is not listed as an input. Pub inserts a timestamp into | ||
| /// the file which causes unnecessary rebuilds, so instead a subset of the contents | ||
| /// are used an input instead. | ||
| class KernelSnapshot extends Target { |
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.
Can you update the dartdoc to explain its relationship to KernelSnapshot.
|
|
||
| final String dillPath = environment.buildDir.childFile(dillName).path; | ||
|
|
||
| final CompilerOutput? output = await compiler.compile( |
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.
Could we skip the compile if the user doesn't have native assets?
christopherfujino
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.
LGTM!
|
Thanks @christopherfujino ! |
|
auto label is removed for flutter/flutter/147158, due to - The status or check suite Windows module_test has failed. Please fix the issues identified (or deflake) before re-applying this label. |
|
auto label is removed for flutter/flutter/147158, due to - The status or check suite Windows module_test has failed. Please fix the issues identified (or deflake) before re-applying this label. |
flutter/flutter@dba4f77...5d3bca4 2024-04-25 [email protected] Roll Flutter Engine from 6b33890a4701 to 674890ce7141 (1 revision) (flutter/flutter#147365) 2024-04-25 [email protected] [native_assets] Use kernel concatenation (flutter/flutter#147158) 2024-04-25 [email protected] Roll Flutter Engine from ccd57f5a4bc4 to 6b33890a4701 (2 revisions) (flutter/flutter#147359) 2024-04-25 [email protected] Roll Flutter Engine from 9de649ed2926 to ccd57f5a4bc4 (1 revision) (flutter/flutter#147356) 2024-04-25 [email protected] Roll Flutter Engine from 2f48456a425a to 9de649ed2926 (2 revisions) (flutter/flutter#147354) 2024-04-25 [email protected] Roll Flutter Engine from f48f3b6a0172 to 2f48456a425a (1 revision) (flutter/flutter#147351) 2024-04-25 [email protected] Roll Flutter Engine from b30c0a765680 to f48f3b6a0172 (8 revisions) (flutter/flutter#147348) 2024-04-25 [email protected] Allow the SceneBuilder, PictureRecord, and Canvas constructor calls from the rendering layer to be hooked (flutter/flutter#147271) 2024-04-24 49699333+dependabot[bot]@users.noreply.github.com Bump actions/checkout from 4.1.3 to 4.1.4 (flutter/flutter#147334) 2024-04-24 [email protected] Fix filled color is wrong for a focused and hovered TextField (flutter/flutter#146976) 2024-04-24 [email protected] Roll Flutter Engine from b5d5832f7144 to b30c0a765680 (14 revisions) (flutter/flutter#147336) 2024-04-24 [email protected] Run new_gallery__transition_perf on mokey in staging (flutter/flutter#147339) 2024-04-24 [email protected] Remove hidden dependencies on the default goldenFileComparator. (flutter/flutter#146956) 2024-04-24 [email protected] Add create app and plugin templates for Swift Package Manager (flutter/flutter#147082) 2024-04-24 [email protected] Add support for overriding `reverseCurve` with `ExpansionTile.expansionAnimationStyle` (flutter/flutter#147103) 2024-04-24 [email protected] Mark firebase tests as `bringup: true` (flutter/flutter#147338) 2024-04-24 [email protected] Add Valentin Vignal to AUTHORS (flutter/flutter#147314) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/flutter-packages Please CC [email protected],[email protected],[email protected] on the revert to ensure that a human is aware of the problem. To file a bug in Packages: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://issues.skia.org/issues/new?component=1389291&template=1850622 Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
flutter/flutter@dba4f77...5d3bca4 2024-04-25 [email protected] Roll Flutter Engine from 6b33890a4701 to 674890ce7141 (1 revision) (flutter/flutter#147365) 2024-04-25 [email protected] [native_assets] Use kernel concatenation (flutter/flutter#147158) 2024-04-25 [email protected] Roll Flutter Engine from ccd57f5a4bc4 to 6b33890a4701 (2 revisions) (flutter/flutter#147359) 2024-04-25 [email protected] Roll Flutter Engine from 9de649ed2926 to ccd57f5a4bc4 (1 revision) (flutter/flutter#147356) 2024-04-25 [email protected] Roll Flutter Engine from 2f48456a425a to 9de649ed2926 (2 revisions) (flutter/flutter#147354) 2024-04-25 [email protected] Roll Flutter Engine from f48f3b6a0172 to 2f48456a425a (1 revision) (flutter/flutter#147351) 2024-04-25 [email protected] Roll Flutter Engine from b30c0a765680 to f48f3b6a0172 (8 revisions) (flutter/flutter#147348) 2024-04-25 [email protected] Allow the SceneBuilder, PictureRecord, and Canvas constructor calls from the rendering layer to be hooked (flutter/flutter#147271) 2024-04-24 49699333+dependabot[bot]@users.noreply.github.com Bump actions/checkout from 4.1.3 to 4.1.4 (flutter/flutter#147334) 2024-04-24 [email protected] Fix filled color is wrong for a focused and hovered TextField (flutter/flutter#146976) 2024-04-24 [email protected] Roll Flutter Engine from b5d5832f7144 to b30c0a765680 (14 revisions) (flutter/flutter#147336) 2024-04-24 [email protected] Run new_gallery__transition_perf on mokey in staging (flutter/flutter#147339) 2024-04-24 [email protected] Remove hidden dependencies on the default goldenFileComparator. (flutter/flutter#146956) 2024-04-24 [email protected] Add create app and plugin templates for Swift Package Manager (flutter/flutter#147082) 2024-04-24 [email protected] Add support for overriding `reverseCurve` with `ExpansionTile.expansionAnimationStyle` (flutter/flutter#147103) 2024-04-24 [email protected] Mark firebase tests as `bringup: true` (flutter/flutter#147338) 2024-04-24 [email protected] Add Valentin Vignal to AUTHORS (flutter/flutter#147314) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/flutter-packages Please CC [email protected],[email protected],[email protected] on the revert to ensure that a human is aware of the problem. To file a bug in Packages: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://issues.skia.org/issues/new?component=1389291&template=1850622 Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
Uses kernel concatenation to concatenate the
program.dillandnative_assets.dill.This will enable compiling
native_assets.dillafterprogram.dillso that tree-shaking information can be used.Issue:
Implementation choices
Targets.Update: Both of these are mitigated by not running the kernel compiler process if there are no native assets at all.
Implementation notes
This only updates
flutter assemble.The kernel compilation calls in
flutter rundo not require kernel concatenation. The native-assets-kernel-mapping influtter runcontains results from--dry-runinvocations ofhook/build.dart(and in the futurehook/link.dart). These--dry-runinvocations do not get access to tree-shaking information, so thelinkhook to be introduced later can be run before Dart compilation.Tests
Targets tests to reflect the new implementation.Related CLs
Pre-launch Checklist
///).