Skip to content
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

Enable asset transformation for flutter build for iOS, Android, Windows, MacOS, Linux, and web (also flutter run without hot reload support) #143815

Merged

Conversation

andrewkolos
Copy link
Contributor

@andrewkolos andrewkolos commented Feb 21, 2024

See title. These are are the platforms that use the CopyAssets Target as part of their build target.

Partial implementation of #143348.

Pre-launch Checklist

  • I read the Contributor Guide and followed the process outlined there for submitting PRs.
  • I read the Tree Hygiene wiki page, which explains my responsibilities.
  • I read and followed the Flutter Style Guide, including Features we expect every widget to implement.
  • I signed the CLA.
  • I listed at least one issue that this PR fixes in the description above.
  • I updated/added relevant documentation (doc comments with ///).
  • I added new tests to check the change I am making, or this PR is test-exempt.
  • All existing and new tests are passing.

If you need help, consider asking for advice on the #hackers-new channel on Discord.

@andrewkolos andrewkolos added the tool Affects the "flutter" command-line tool. See also t: labels. label Feb 21, 2024
@andrewkolos andrewkolos changed the title Enable asset transformation for flutter build for iOS, Android, Windows, MacOS, Linux Enable asset transformation for flutter build for iOS, Android, Windows, MacOS, Linux, and web Feb 21, 2024
@andrewkolos andrewkolos marked this pull request as ready for review February 21, 2024 05:15
@andrewkolos andrewkolos force-pushed the asset-transformation-flutter-build-main branch from f204aee to 7a9708e Compare February 22, 2024 00:18
@andrewkolos
Copy link
Contributor Author

andrewkolos commented Feb 22, 2024

I suspect caching is likely to not work properly when path-dependencies are used as transformers.

Consider the scenario where I have a path dependency in use that as a transformer. I perform a build, edit the transformer's code, and then run a build again. The CopyAssets target doesn't depend on code files from path dependencies, so the asset won't get retransformed.

edit: I'm content in adding this as a TODO on the tracking issue.

@christopherfujino
Copy link
Member

I suspect caching is likely to not work properly when path-dependencies are used as transformers.

Consider the scenario where I have a path dependency in use that as a transformer. I perform a build, edit the transformer's code, and then run a build again. The CopyAssets target doesn't depend on code files from path dependencies, so the asset won't get retransformed.

edit: I'm content in adding this as a TODO on the tracking issue.

Unless you think there's some reason that path dependencies would be used MORE in this particular workflow, I'm ok with leaving this as a TODO. I think path deps in pubspec.yaml invalidates all kinds of caching assumptions in general.

@andrewkolos
Copy link
Contributor Author

Unless you think there's some reason that path dependencies would be used MORE in this particular workflow, I'm ok with leaving this as a TODO. I think path deps in pubspec.yaml invalidates all kinds of caching assumptions in general.

Indeed, see #141626 as an example.

Copy link
Member

@christopherfujino christopherfujino left a comment

Choose a reason for hiding this comment

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

Overall this LGTM. I weakly feel we should have some integration testing for this, but I'll comment my thoughts on #143348, I don't think it should block landing this, especially as the tests we do have seem to cover interesting API surface well.

@andrewkolos
Copy link
Contributor Author

andrewkolos commented Feb 22, 2024

Overall this LGTM. I weakly feel we should have some integration testing for this, but I'll comment my thoughts on #143348, I don't think it should block landing this, especially as the tests we do have seem to cover interesting API surface well.

Ack. I added a note about path dependencies to the tracking issue OP. Thanks for the quite fantastic review here—you caught at least one would-be P1.

@andrewkolos andrewkolos added the autosubmit Merge PR when tree becomes green via auto submit App label Feb 22, 2024
Copy link
Contributor

auto-submit bot commented Feb 22, 2024

auto label is removed for flutter/flutter/143815, due to - The status or check suite Google testing has failed. Please fix the issues identified (or deflake) before re-applying this label.

@auto-submit auto-submit bot removed the autosubmit Merge PR when tree becomes green via auto submit App label Feb 22, 2024
@christopherfujino
Copy link
Member

Ack. I added a note about path dependencies to the tracking issue OP. Thanks for the quite fantastic review here—you caught at least one would-be P1.

Was that not failing the build if the transformer failed? or something else?

@andrewkolos
Copy link
Contributor Author

andrewkolos commented Feb 22, 2024

Ack. I added a note about path dependencies to the tracking issue OP. Thanks for the quite fantastic review here—you caught at least one would-be P1.

Was that not failing the build if the transformer failed? or something else?

Yeah, that's what came to mind.

edit: FYI I see Google testing failing, and I have a g3fix going out

@andrewkolos andrewkolos changed the title Enable asset transformation for flutter build for iOS, Android, Windows, MacOS, Linux, and web Enable asset transformation for flutter build for iOS, Android, Windows, MacOS, Linux, and web (also flutter run without hot reload support) Feb 23, 2024
@andrewkolos andrewkolos added the autosubmit Merge PR when tree becomes green via auto submit App label Feb 23, 2024
@auto-submit auto-submit bot merged commit 4e814a5 into flutter:master Feb 23, 2024
121 checks passed
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Feb 24, 2024
…droid, Windows, MacOS, Linux, and web (also `flutter run` without hot reload support) (flutter/flutter#143815)
auto-submit bot pushed a commit to flutter/packages that referenced this pull request Feb 24, 2024
flutter/flutter@39585e6...f6c1082

2024-02-24 engine-flutter-autoroll@skia.org Roll Flutter Engine from 81035b7d56ef to 1d7d5e613d7e (1 revision) (flutter/flutter#144085)
2024-02-24 engine-flutter-autoroll@skia.org Roll Flutter Engine from a148bdb63740 to 81035b7d56ef (2 revisions) (flutter/flutter#144083)
2024-02-24 engine-flutter-autoroll@skia.org Roll Flutter Engine from 3c036c081534 to a148bdb63740 (1 revision) (flutter/flutter#144077)
2024-02-24 engine-flutter-autoroll@skia.org Roll Flutter Engine from 738042295f97 to 3c036c081534 (2 revisions) (flutter/flutter#144073)
2024-02-24 engine-flutter-autoroll@skia.org Roll Flutter Engine from ca2452074a49 to 738042295f97 (4 revisions) (flutter/flutter#144071)
2024-02-24 engine-flutter-autoroll@skia.org Roll Flutter Engine from 9409b75e8f35 to ca2452074a49 (2 revisions) (flutter/flutter#144068)
2024-02-24 mzhou620@gmail.com Adding support for DDC modules when running Flutter Web in debug mode (flutter/flutter#141423)
2024-02-24 engine-flutter-autoroll@skia.org Roll Flutter Engine from 733163c4e5d7 to 9409b75e8f35 (1 revision) (flutter/flutter#144061)
2024-02-23 andrewrkolos@gmail.com allow optional direct injection of Config instance into DevFS (flutter/flutter#144002)
2024-02-23 andrewrkolos@gmail.com Enable asset transformation for `flutter build` for iOS, Android, Windows, MacOS, Linux, and web (also `flutter run` without hot reload support) (flutter/flutter#143815)
2024-02-23 engine-flutter-autoroll@skia.org Roll Flutter Engine from 5d1c0d4dc327 to 733163c4e5d7 (1 revision) (flutter/flutter#144058)
2024-02-23 49699333+dependabot[bot]@users.noreply.github.com Bump github/codeql-action from 3.24.4 to 3.24.5 (flutter/flutter#144059)
2024-02-23 49699333+dependabot[bot]@users.noreply.github.com Bump codecov/codecov-action from 4.0.1 to 4.0.2 (flutter/flutter#144060)
2024-02-23 dkwingsmt@users.noreply.github.com Render the warm up frame in a proper rendering process (flutter/flutter#143290)
2024-02-23 engine-flutter-autoroll@skia.org Roll Flutter Engine from fbc9b889aee9 to 5d1c0d4dc327 (2 revisions) (flutter/flutter#144049)
2024-02-23 engine-flutter-autoroll@skia.org Roll Flutter Engine from b5bebfe43d29 to fbc9b889aee9 (3 revisions) (flutter/flutter#144041)
2024-02-23 jonahwilliams@google.com disable debug banner in m3 page test apps. (flutter/flutter#143857)
2024-02-23 31859944+LongCatIsLooong@users.noreply.github.com Relands "Changing `TextPainter.getOffsetForCaret` implementation to remove the logarithmic search (#143281)" (reverted in #143801) (flutter/flutter#143954)
2024-02-23 engine-flutter-autoroll@skia.org Roll Flutter Engine from 5f99a6c3289e to b5bebfe43d29 (1 revision) (flutter/flutter#144035)
2024-02-23 nate.w5687@gmail.com Implementing null-aware operators throughout the repository (flutter/flutter#143804)

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 dit@google.com,rmistry@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
LouiseHsu pushed a commit to LouiseHsu/packages that referenced this pull request Mar 7, 2024
…r#6200)

flutter/flutter@39585e6...f6c1082

2024-02-24 engine-flutter-autoroll@skia.org Roll Flutter Engine from 81035b7d56ef to 1d7d5e613d7e (1 revision) (flutter/flutter#144085)
2024-02-24 engine-flutter-autoroll@skia.org Roll Flutter Engine from a148bdb63740 to 81035b7d56ef (2 revisions) (flutter/flutter#144083)
2024-02-24 engine-flutter-autoroll@skia.org Roll Flutter Engine from 3c036c081534 to a148bdb63740 (1 revision) (flutter/flutter#144077)
2024-02-24 engine-flutter-autoroll@skia.org Roll Flutter Engine from 738042295f97 to 3c036c081534 (2 revisions) (flutter/flutter#144073)
2024-02-24 engine-flutter-autoroll@skia.org Roll Flutter Engine from ca2452074a49 to 738042295f97 (4 revisions) (flutter/flutter#144071)
2024-02-24 engine-flutter-autoroll@skia.org Roll Flutter Engine from 9409b75e8f35 to ca2452074a49 (2 revisions) (flutter/flutter#144068)
2024-02-24 mzhou620@gmail.com Adding support for DDC modules when running Flutter Web in debug mode (flutter/flutter#141423)
2024-02-24 engine-flutter-autoroll@skia.org Roll Flutter Engine from 733163c4e5d7 to 9409b75e8f35 (1 revision) (flutter/flutter#144061)
2024-02-23 andrewrkolos@gmail.com allow optional direct injection of Config instance into DevFS (flutter/flutter#144002)
2024-02-23 andrewrkolos@gmail.com Enable asset transformation for `flutter build` for iOS, Android, Windows, MacOS, Linux, and web (also `flutter run` without hot reload support) (flutter/flutter#143815)
2024-02-23 engine-flutter-autoroll@skia.org Roll Flutter Engine from 5d1c0d4dc327 to 733163c4e5d7 (1 revision) (flutter/flutter#144058)
2024-02-23 49699333+dependabot[bot]@users.noreply.github.com Bump github/codeql-action from 3.24.4 to 3.24.5 (flutter/flutter#144059)
2024-02-23 49699333+dependabot[bot]@users.noreply.github.com Bump codecov/codecov-action from 4.0.1 to 4.0.2 (flutter/flutter#144060)
2024-02-23 dkwingsmt@users.noreply.github.com Render the warm up frame in a proper rendering process (flutter/flutter#143290)
2024-02-23 engine-flutter-autoroll@skia.org Roll Flutter Engine from fbc9b889aee9 to 5d1c0d4dc327 (2 revisions) (flutter/flutter#144049)
2024-02-23 engine-flutter-autoroll@skia.org Roll Flutter Engine from b5bebfe43d29 to fbc9b889aee9 (3 revisions) (flutter/flutter#144041)
2024-02-23 jonahwilliams@google.com disable debug banner in m3 page test apps. (flutter/flutter#143857)
2024-02-23 31859944+LongCatIsLooong@users.noreply.github.com Relands "Changing `TextPainter.getOffsetForCaret` implementation to remove the logarithmic search (#143281)" (reverted in #143801) (flutter/flutter#143954)
2024-02-23 engine-flutter-autoroll@skia.org Roll Flutter Engine from 5f99a6c3289e to b5bebfe43d29 (1 revision) (flutter/flutter#144035)
2024-02-23 nate.w5687@gmail.com Implementing null-aware operators throughout the repository (flutter/flutter#143804)

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 dit@google.com,rmistry@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
@andrewkolos andrewkolos deleted the asset-transformation-flutter-build-main branch April 29, 2024 18:17
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request May 14, 2024
…droid, Windows, MacOS, Linux, and web (also `flutter run` without hot reload support) (flutter/flutter#143815)
arc-yong pushed a commit to Arctuition/packages-arc that referenced this pull request Jun 14, 2024
…r#6200)

flutter/flutter@39585e6...f6c1082

2024-02-24 engine-flutter-autoroll@skia.org Roll Flutter Engine from 81035b7d56ef to 1d7d5e613d7e (1 revision) (flutter/flutter#144085)
2024-02-24 engine-flutter-autoroll@skia.org Roll Flutter Engine from a148bdb63740 to 81035b7d56ef (2 revisions) (flutter/flutter#144083)
2024-02-24 engine-flutter-autoroll@skia.org Roll Flutter Engine from 3c036c081534 to a148bdb63740 (1 revision) (flutter/flutter#144077)
2024-02-24 engine-flutter-autoroll@skia.org Roll Flutter Engine from 738042295f97 to 3c036c081534 (2 revisions) (flutter/flutter#144073)
2024-02-24 engine-flutter-autoroll@skia.org Roll Flutter Engine from ca2452074a49 to 738042295f97 (4 revisions) (flutter/flutter#144071)
2024-02-24 engine-flutter-autoroll@skia.org Roll Flutter Engine from 9409b75e8f35 to ca2452074a49 (2 revisions) (flutter/flutter#144068)
2024-02-24 mzhou620@gmail.com Adding support for DDC modules when running Flutter Web in debug mode (flutter/flutter#141423)
2024-02-24 engine-flutter-autoroll@skia.org Roll Flutter Engine from 733163c4e5d7 to 9409b75e8f35 (1 revision) (flutter/flutter#144061)
2024-02-23 andrewrkolos@gmail.com allow optional direct injection of Config instance into DevFS (flutter/flutter#144002)
2024-02-23 andrewrkolos@gmail.com Enable asset transformation for `flutter build` for iOS, Android, Windows, MacOS, Linux, and web (also `flutter run` without hot reload support) (flutter/flutter#143815)
2024-02-23 engine-flutter-autoroll@skia.org Roll Flutter Engine from 5d1c0d4dc327 to 733163c4e5d7 (1 revision) (flutter/flutter#144058)
2024-02-23 49699333+dependabot[bot]@users.noreply.github.com Bump github/codeql-action from 3.24.4 to 3.24.5 (flutter/flutter#144059)
2024-02-23 49699333+dependabot[bot]@users.noreply.github.com Bump codecov/codecov-action from 4.0.1 to 4.0.2 (flutter/flutter#144060)
2024-02-23 dkwingsmt@users.noreply.github.com Render the warm up frame in a proper rendering process (flutter/flutter#143290)
2024-02-23 engine-flutter-autoroll@skia.org Roll Flutter Engine from fbc9b889aee9 to 5d1c0d4dc327 (2 revisions) (flutter/flutter#144049)
2024-02-23 engine-flutter-autoroll@skia.org Roll Flutter Engine from b5bebfe43d29 to fbc9b889aee9 (3 revisions) (flutter/flutter#144041)
2024-02-23 jonahwilliams@google.com disable debug banner in m3 page test apps. (flutter/flutter#143857)
2024-02-23 31859944+LongCatIsLooong@users.noreply.github.com Relands "Changing `TextPainter.getOffsetForCaret` implementation to remove the logarithmic search (#143281)" (reverted in #143801) (flutter/flutter#143954)
2024-02-23 engine-flutter-autoroll@skia.org Roll Flutter Engine from 5f99a6c3289e to b5bebfe43d29 (1 revision) (flutter/flutter#144035)
2024-02-23 nate.w5687@gmail.com Implementing null-aware operators throughout the repository (flutter/flutter#143804)

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 dit@google.com,rmistry@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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
autosubmit Merge PR when tree becomes green via auto submit App tool Affects the "flutter" command-line tool. See also t: labels.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants