Skip to content

[record_use] Add recorded uses to link hooks#184869

Merged
auto-submit[bot] merged 5 commits into
flutter:masterfrom
dcharkes:record-use-implementation
Apr 14, 2026
Merged

[record_use] Add recorded uses to link hooks#184869
auto-submit[bot] merged 5 commits into
flutter:masterfrom
dcharkes:record-use-implementation

Conversation

@dcharkes
Copy link
Copy Markdown
Contributor

@dcharkes dcharkes commented Apr 10, 2026

Bug:

Invokes the Dart compiler with --recorded-uses and pipes the result to the link hook invocation if the Flutter experiment is enabled.

Testing:

  • Changes the existing integration test to expect the right number of translations (4 -> 2).
  • Enables the web integration test, as fixes have rolled from Dart to Flutter now.

Implementation quirks:

  • Accessing the experiment flag required updating a bunch of tests to have the feature flags accessible.

Does not yet:

  • Split the build and link hooks into separate targets. The build hooks can run in parallel with the Dart compilation, the link hooks can not. (So for now, when the experiment is enabled run the dart build hooks after dart compilation instead of concurrently.) I'll follow up with a separate CL to reshuffle the targets.

@github-actions github-actions Bot added the tool Affects the "flutter" command-line tool. See also t: labels. label Apr 10, 2026
@dcharkes dcharkes force-pushed the record-use-implementation branch from a7e7dad to 34b91f3 Compare April 10, 2026 07:12
@dcharkes dcharkes added the CICD Run CI/CD label Apr 10, 2026
@dcharkes dcharkes force-pushed the record-use-implementation branch from 34b91f3 to cae5395 Compare April 10, 2026 07:28
@github-actions github-actions Bot removed the CICD Run CI/CD label Apr 10, 2026
@dcharkes dcharkes added the CICD Run CI/CD label Apr 10, 2026
@dcharkes dcharkes force-pushed the record-use-implementation branch from cae5395 to 15ec6b3 Compare April 10, 2026 07:48
@github-actions github-actions Bot removed the CICD Run CI/CD label Apr 10, 2026
@dcharkes dcharkes added the CICD Run CI/CD label Apr 10, 2026
@dcharkes dcharkes force-pushed the record-use-implementation branch from 15ec6b3 to 3b3277a Compare April 10, 2026 08:30
@github-actions github-actions Bot removed the CICD Run CI/CD label Apr 10, 2026
@dcharkes dcharkes added CICD Run CI/CD labels Apr 10, 2026
@fluttergithubbot
Copy link
Copy Markdown
Contributor

An existing Git SHA, 3b3277ae1f1e5092cbcf9a02f2d8d08d5f8141ec, was detected, and no actions were taken.

To re-trigger presubmits after closing or re-opeing a PR, or pushing a HEAD commit (i.e. with --force) that already was pushed before, push a blank commit (git commit --allow-empty -m "Trigger Build") or rebase to continue.

@dcharkes dcharkes force-pushed the record-use-implementation branch from 3b3277a to 2347966 Compare April 10, 2026 08:34
@dcharkes dcharkes added CICD Run CI/CD and removed CICD Run CI/CD labels Apr 10, 2026
@dcharkes dcharkes force-pushed the record-use-implementation branch from 2347966 to bb34e07 Compare April 10, 2026 08:40
@dcharkes dcharkes added CICD Run CI/CD and removed CICD Run CI/CD labels Apr 10, 2026
@dcharkes dcharkes force-pushed the record-use-implementation branch from bb34e07 to 0af70a5 Compare April 10, 2026 08:47
@dcharkes dcharkes added CICD Run CI/CD and removed CICD Run CI/CD labels Apr 10, 2026
@github-actions github-actions Bot added a: desktop Running on desktop team-ios Owned by iOS platform team team-macos Owned by the macOS platform team team-windows Owned by the Windows platform team and removed CICD Run CI/CD labels Apr 10, 2026
@github-actions github-actions Bot removed the CICD Run CI/CD label Apr 10, 2026
@dcharkes dcharkes added the CICD Run CI/CD label Apr 10, 2026
reidbaker
reidbaker previously approved these changes Apr 10, 2026
Copy link
Copy Markdown
Contributor

@reidbaker reidbaker left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am not familiar with this work but the android changes are ok with me.

bkonyi
bkonyi previously approved these changes Apr 10, 2026
Copy link
Copy Markdown
Contributor

@bkonyi bkonyi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM with one nit.

Comment thread packages/flutter_tools/lib/src/build_system/targets/native_assets.dart Outdated
@dcharkes dcharkes dismissed stale reviews from bkonyi and reidbaker via d54a360 April 12, 2026 14:26
@github-actions github-actions Bot removed the CICD Run CI/CD label Apr 12, 2026
@dcharkes dcharkes added the CICD Run CI/CD label Apr 12, 2026
Copy link
Copy Markdown
Member

@goderbauer goderbauer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@dcharkes dcharkes added CICD Run CI/CD autosubmit Merge PR when tree becomes green via auto submit App and removed CICD Run CI/CD labels Apr 14, 2026
@fluttergithubbot
Copy link
Copy Markdown
Contributor

An existing Git SHA, d54a3600f0e7a91c3afb6a7441a38c09937c3103, was detected, and no actions were taken.

To re-trigger presubmits after closing or re-opeing a PR, or pushing a HEAD commit (i.e. with --force) that already was pushed before, push a blank commit (git commit --allow-empty -m "Trigger Build") or rebase to continue.

@github-actions github-actions Bot removed the CICD Run CI/CD label Apr 14, 2026
@dcharkes dcharkes added the CICD Run CI/CD label Apr 14, 2026
@auto-submit auto-submit Bot added this pull request to the merge queue Apr 14, 2026
Merged via the queue into flutter:master with commit c4391ec Apr 14, 2026
154 checks passed
@flutter-dashboard flutter-dashboard Bot removed the autosubmit Merge PR when tree becomes green via auto submit App label Apr 14, 2026
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Apr 14, 2026
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Apr 14, 2026
auto-submit Bot pushed a commit to flutter/packages that referenced this pull request Apr 14, 2026
flutter/flutter@2fa45e0...c1b14e9

2026-04-14 15619084+vashworth@users.noreply.github.com Rebuild flutter tool skill (flutter/flutter#184975)
2026-04-14 engine-flutter-autoroll@skia.org Roll Skia from 0851d988db03 to 4c382df6a25a (1 revision) (flutter/flutter#185025)
2026-04-14 engine-flutter-autoroll@skia.org Roll Dart SDK from 5504504b38c2 to ee5afcef0596 (1 revision) (flutter/flutter#185024)
2026-04-14 dacoharkes@google.com [ci] Split up integration.shard record_use_test.dart (flutter/flutter#185022)
2026-04-14 engine-flutter-autoroll@skia.org Roll Skia from d34c84df4c37 to 0851d988db03 (3 revisions) (flutter/flutter#185012)
2026-04-14 dacoharkes@google.com [record_use] Add recorded uses to link hooks (flutter/flutter#184869)
2026-04-14 engine-flutter-autoroll@skia.org Roll Skia from 0e98a9c635bb to d34c84df4c37 (5 revisions) (flutter/flutter#185009)
2026-04-14 engine-flutter-autoroll@skia.org Roll Dart SDK from ef28089d6533 to 5504504b38c2 (3 revisions) (flutter/flutter#185008)
2026-04-14 engine-flutter-autoroll@skia.org Roll Fuchsia Linux SDK from K_2AkZL3Drs6cGE1q... to rB8LAuZL_DwHMssTU... (flutter/flutter#185007)
2026-04-14 rmacnak@google.com [fuchsia] Replace ambient-replace-as-executable with VmexResource. (flutter/flutter#184967)
2026-04-13 chinmaygarde@google.com [Impeller] Commands that don't specify their own viewports get the viewport of the render pass. (flutter/flutter#177473)
2026-04-13 engine-flutter-autoroll@skia.org Roll Skia from bc1df263ff3f to 0e98a9c635bb (1 revision) (flutter/flutter#184995)
2026-04-13 737941+loic-sharma@users.noreply.github.com Update autosubmit guide with the emergency label (flutter/flutter#184993)
2026-04-13 69043738+aNOOBisTheGod@users.noreply.github.com [flutter_tools] Cache pubspec reads and share PackageGraph/PackageConfig across workspace packages during pub get post-processing (flutter/flutter#184528)
2026-04-13 15619084+vashworth@users.noreply.github.com Fix codesign verification test for SwiftPM Add to App (flutter/flutter#184980)
2026-04-13 87962825+kyungilcho@users.noreply.github.com Preprovision Android NDK for flavored builds and reuse matching unflavored NDKs (flutter/flutter#183555)
2026-04-13 15619084+vashworth@users.noreply.github.com Reland "Disable async mode with LLDB" (flutter/flutter#184970)
2026-04-13 engine-flutter-autoroll@skia.org Roll Skia from 55ddd6bb8be5 to bc1df263ff3f (6 revisions) (flutter/flutter#184968)
2026-04-13 matej.knopp@gmail.com Expose platform specific handles for multi-window API (flutter/flutter#184662)

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 boetger@google.com,stuartmorgan@google.com 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
master-wayne7 pushed a commit to master-wayne7/flutter that referenced this pull request Apr 15, 2026
Bug:

* dart-lang/native#2690

Invokes the Dart compiler with `--recorded-uses` and pipes the result to
the link hook invocation if the Flutter experiment is enabled.

Testing:

* Changes the existing integration test to expect the right number of
translations (4 -> 2).
* Enables the web integration test, as fixes have rolled from Dart to
Flutter now.

Implementation quirks:

* Accessing the experiment flag required updating a bunch of tests to
have the feature flags accessible.

Does not yet:

* Split the build and link hooks into separate targets. The build hooks
can run in parallel with the Dart compilation, the link hooks can not.
(So for now, when the experiment is enabled run the dart build hooks
_after_ dart compilation instead of concurrently.) I'll follow up with a
separate CL to reshuffle the targets.
mbcorona pushed a commit to mbcorona/flutter that referenced this pull request Apr 15, 2026
Bug:

* dart-lang/native#2690

Invokes the Dart compiler with `--recorded-uses` and pipes the result to
the link hook invocation if the Flutter experiment is enabled.

Testing:

* Changes the existing integration test to expect the right number of
translations (4 -> 2).
* Enables the web integration test, as fixes have rolled from Dart to
Flutter now.

Implementation quirks:

* Accessing the experiment flag required updating a bunch of tests to
have the feature flags accessible.

Does not yet:

* Split the build and link hooks into separate targets. The build hooks
can run in parallel with the Dart compilation, the link hooks can not.
(So for now, when the experiment is enabled run the dart build hooks
_after_ dart compilation instead of concurrently.) I'll follow up with a
separate CL to reshuffle the targets.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

a: desktop Running on desktop CICD Run CI/CD team-ios Owned by iOS platform team team-linux Owned by the Linux platform team team-macos Owned by the macOS platform team team-windows Owned by the Windows platform team tool Affects the "flutter" command-line tool. See also t: labels.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants