Skip to content

Conversation

@auto-submit
Copy link
Contributor

@auto-submit auto-submit bot commented Sep 25, 2024

Reverts: #155430

Initiated by: eyebrowsoffire

Reason for reverting: Postsubmit failures closing the tree. See the following examples:

https://ci.chromium.org/ui/p/flutter/builders/prod/Mac_ios%20native_assets_ios/5738/overview
https://ci.chromium.org/ui/p/flutter/builders/prod/Mac_arm64_mokey%20native_assets_android/583/overview
https://ci.chromium.org/ui/p/flutter/builders/prod/Linux_pixel_7pro%20native_assets_android/4075/overview
https://ci.chromium.org/u

Original PR Author: mkustermann

Reviewed By: {bkonyi, dcharkes}

This change reverts the following previous change:
tl;dr Removes 50% (>1650 locs) of native asset related code in packages/flutter_tools

Before this PR the invocation of dart build/link/dry-run was implemented per OS. This lead to very large code duplication of almost identical, but sligthly different code. It also led to similarly duplicated test code.

Almost the entire dart build/link/dry-run implementation is identical across OSes. There's small variations:

  • configuration of the build (e.g. android/macos/ios version, ios sdk, ...)
  • determining target locations & copying the final shared libraries

This PR unifies the implementation by reducing the code to basically two main functions:

  • runFlutterSpecificDartBuild which is responsible for

    • obtain flutter configuration
    • perform dart build (& link)
    • determine target location & install binaries
  • runFlutterSpecificDartDryRunOnPlatforms which is responsible for a similar (but not same):

    • obtain flutter configuration
    • perform dart dry run
    • determine target location

these two functions will call out to helpers for the OS specific functionality:

  • _assetTargetLocationsForOS for determining the location of the code assets

  • _copyNativeCodeAssetsForOS for copying the code assets (and possibly overriting the install name, etc)

=> Since we get rid of the code duplication across OSes and have only a single code path for the build/link/dry-run, we can also remove the duplicated tests that were pretty much identical across OSes.

We also harden the building code by adding asserts, e.g.

  • the dry fun functionality should never be used by flutter test

  • the build/native_assets/<os>/native_assets.yaml should only be used by flutter test and the dry-run of flutter run

=> We change the tests to also comply with these invariants (so the tests are not testing things that cannot happen in reality)

We also rename {,Flutter}NativeAssetsBuildRunner to disambiguate it from the package:native_asset_builder's NativeAssetsBuildRunner.

We also reorganize the main code to make it readable from top-down and make members private where they can be.

… around 50% of the native asset related code) (#155430)"

This reverts commit 621e7ef.
@auto-submit auto-submit bot added the revert of Bot Only: Tracking label for bot. Tracks new revert of pull requests. label Sep 25, 2024
@github-actions github-actions bot added tool Affects the "flutter" command-line tool. See also t: labels. a: desktop Running on desktop labels Sep 25, 2024
@auto-submit auto-submit bot merged commit 4dfa688 into master Sep 25, 2024
@auto-submit auto-submit bot deleted the revert_621e7ef9511fd224d7621f26c413beba2f4c0121 branch September 25, 2024 21:46
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Sep 26, 2024
… (removes around 50% of the native asset related code) (#155430)" (flutter/flutter#155713)
thejitenpatel pushed a commit to thejitenpatel/flutter that referenced this pull request Sep 26, 2024
…s around 50% of the native asset related code) (flutter#155430)" (flutter#155713)

Reverts: flutter#155430
Initiated by: eyebrowsoffire
Reason for reverting: Postsubmit failures closing the tree. See the following examples:

https://ci.chromium.org/ui/p/flutter/builders/prod/Mac_ios%20native_assets_ios/5738/overview
https://ci.chromium.org/ui/p/flutter/builders/prod/Mac_arm64_mokey%20native_assets_android/583/overview
https://ci.chromium.org/ui/p/flutter/builders/prod/Linux_pixel_7pro%20native_assets_android/4075/overview
https://ci.chromium.org/u
Original PR Author: mkustermann

Reviewed By: {bkonyi, dcharkes}

This change reverts the following previous change:
tl;dr Removes 50% (>1650 locs) of native asset related code in `packages/flutter_tools`

Before this PR the invocation of dart build/link/dry-run was implemented per OS. This lead to very large code duplication of almost identical, but sligthly different code. It also led to similarly duplicated test code.

Almost the entire dart build/link/dry-run implementation is identical across OSes. There's small variations:

  - configuration of the build (e.g. android/macos/ios version, ios sdk, ...)
  - determining target locations & copying the final shared libraries

This PR unifies the implementation by reducing the code to basically two main functions:

  * `runFlutterSpecificDartBuild` which is responsible for
    - obtain flutter configuration
    - perform dart build (& link)
    - determine target location & install binaries

  * `runFlutterSpecificDartDryRunOnPlatforms` which is responsible for a similar (but not same):
    - obtain flutter configuration
    - perform dart dry run
    - determine target location

these two functions will call out to helpers for the OS specific functionality:

  * `_assetTargetLocationsForOS` for determining the location of the code assets

  * `_copyNativeCodeAssetsForOS` for copying the code assets (and possibly overriting the install name, etc)

=> Since we get rid of the code duplication across OSes and have only a single code path for the build/link/dry-run, we can also remove the duplicated tests that were pretty much identical across OSes.

We also harden the building code by adding asserts, e.g.

  * the dry fun functionality should never be used by `flutter test`

  * the `build/native_assets/<os>/native_assets.yaml` should only be used by `flutter test` and the dry-run of `flutter run`

=> We change the tests to also comply with these invariants (so the tests are not testing things that cannot happen in reality)

We also rename `{,Flutter}NativeAssetsBuildRunner` to disambiguate it from the `package:native_asset_builder`'s `NativeAssetsBuildRunner`.

We also reorganize the main code to make it readable from top-down and make members private where they can be.
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Sep 26, 2024
… (removes around 50% of the native asset related code) (#155430)" (flutter/flutter#155713)
thejitenpatel pushed a commit to thejitenpatel/flutter that referenced this pull request Sep 26, 2024
…s around 50% of the native asset related code) (flutter#155430)" (flutter#155713)

Reverts: flutter#155430
Initiated by: eyebrowsoffire
Reason for reverting: Postsubmit failures closing the tree. See the following examples:

https://ci.chromium.org/ui/p/flutter/builders/prod/Mac_ios%20native_assets_ios/5738/overview
https://ci.chromium.org/ui/p/flutter/builders/prod/Mac_arm64_mokey%20native_assets_android/583/overview
https://ci.chromium.org/ui/p/flutter/builders/prod/Linux_pixel_7pro%20native_assets_android/4075/overview
https://ci.chromium.org/u
Original PR Author: mkustermann

Reviewed By: {bkonyi, dcharkes}

This change reverts the following previous change:
tl;dr Removes 50% (>1650 locs) of native asset related code in `packages/flutter_tools`

Before this PR the invocation of dart build/link/dry-run was implemented per OS. This lead to very large code duplication of almost identical, but sligthly different code. It also led to similarly duplicated test code.

Almost the entire dart build/link/dry-run implementation is identical across OSes. There's small variations:

  - configuration of the build (e.g. android/macos/ios version, ios sdk, ...)
  - determining target locations & copying the final shared libraries

This PR unifies the implementation by reducing the code to basically two main functions:

  * `runFlutterSpecificDartBuild` which is responsible for
    - obtain flutter configuration
    - perform dart build (& link)
    - determine target location & install binaries

  * `runFlutterSpecificDartDryRunOnPlatforms` which is responsible for a similar (but not same):
    - obtain flutter configuration
    - perform dart dry run
    - determine target location

these two functions will call out to helpers for the OS specific functionality:

  * `_assetTargetLocationsForOS` for determining the location of the code assets

  * `_copyNativeCodeAssetsForOS` for copying the code assets (and possibly overriting the install name, etc)

=> Since we get rid of the code duplication across OSes and have only a single code path for the build/link/dry-run, we can also remove the duplicated tests that were pretty much identical across OSes.

We also harden the building code by adding asserts, e.g.

  * the dry fun functionality should never be used by `flutter test`

  * the `build/native_assets/<os>/native_assets.yaml` should only be used by `flutter test` and the dry-run of `flutter run`

=> We change the tests to also comply with these invariants (so the tests are not testing things that cannot happen in reality)

We also rename `{,Flutter}NativeAssetsBuildRunner` to disambiguate it from the `package:native_asset_builder`'s `NativeAssetsBuildRunner`.

We also reorganize the main code to make it readable from top-down and make members private where they can be.
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Sep 26, 2024
… (removes around 50% of the native asset related code) (#155430)" (flutter/flutter#155713)
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Sep 26, 2024
… (removes around 50% of the native asset related code) (#155430)" (flutter/flutter#155713)
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Sep 26, 2024
… (removes around 50% of the native asset related code) (#155430)" (flutter/flutter#155713)
LouiseHsu pushed a commit to flutter/packages that referenced this pull request Sep 26, 2024
flutter/flutter@538e742...fa402c8

2024-09-26 [email protected] Roll Flutter Engine from
6328a0597b68 to 9e6133e8d906 (1 revision) (flutter/flutter#155762)
2024-09-26 [email protected] Roll Packages from
7da2374 to f38b780 (2 revisions) (flutter/flutter#155760)
2024-09-26 49699333+dependabot[bot]@users.noreply.github.com Bump
codecov/codecov-action from 4.4.1 to 4.5.0 (flutter/flutter#150229)
2024-09-26 [email protected] Roll Flutter Engine from
08f935236e45 to 6328a0597b68 (1 revision) (flutter/flutter#155750)
2024-09-26 [email protected] Roll Flutter Engine from
3a520a2a4399 to 08f935236e45 (1 revision) (flutter/flutter#155748)
2024-09-26 [email protected] Reland "[flutter_tools] Cleanup of
native asset related code (removes around 50% of the native asset
related code) (#155430)" (flutter/flutter#155745)
2024-09-26 [email protected] Roll Flutter Engine from
896208ee5828 to 3a520a2a4399 (1 revision) (flutter/flutter#155744)
2024-09-26 [email protected] Roll Flutter Engine from
fc6c85292b57 to 896208ee5828 (2 revisions) (flutter/flutter#155743)
2024-09-26 [email protected] Roll Flutter Engine from
3719454a879f to fc6c85292b57 (1 revision) (flutter/flutter#155738)
2024-09-26 [email protected] added ability to configure shadow
in banner (flutter/flutter#155296)
2024-09-26 [email protected] Roll Flutter Engine from
d4850c1ae648 to 3719454a879f (1 revision) (flutter/flutter#155736)
2024-09-26 [email protected] Roll Flutter Engine from
d6d5fdba6ae1 to d4850c1ae648 (18 revisions) (flutter/flutter#155733)
2024-09-25 [email protected] Move the Linux runner into a
subdirectory (flutter/flutter#153812)
2024-09-25 49699333+dependabot[bot]@users.noreply.github.com Bump
actions/checkout from 4.1.7 to 4.2.0 (flutter/flutter#155711)
2024-09-25 98614782+auto-submit[bot]@users.noreply.github.com Reverts
"[flutter_tools] Cleanup of native asset related code (removes around
50% of the native asset related code) (#155430)"
(flutter/flutter#155713)
2024-09-25 [email protected] [flutter_tools] Cleanup of native asset
related code (removes around 50% of the native asset related code)
(flutter/flutter#155430)
2024-09-25 [email protected] reduce warnings inside
flutter.groovy file #2 (flutter/flutter#155628)
2024-09-25 [email protected] [Android] Update
`SystemUiMode` and `setSystemChromeEnabledSystemUIMode ` docs to note
targeting Android 15+ change (flutter/flutter#153466)
2024-09-25 [email protected] mark linux packages autoroller
bringup: true (flutter/flutter#155705)

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] 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
thejitenpatel pushed a commit to thejitenpatel/flutter that referenced this pull request Sep 27, 2024
…s around 50% of the native asset related code) (flutter#155430)" (flutter#155713)

Reverts: flutter#155430
Initiated by: eyebrowsoffire
Reason for reverting: Postsubmit failures closing the tree. See the following examples:

https://ci.chromium.org/ui/p/flutter/builders/prod/Mac_ios%20native_assets_ios/5738/overview
https://ci.chromium.org/ui/p/flutter/builders/prod/Mac_arm64_mokey%20native_assets_android/583/overview
https://ci.chromium.org/ui/p/flutter/builders/prod/Linux_pixel_7pro%20native_assets_android/4075/overview
https://ci.chromium.org/u
Original PR Author: mkustermann

Reviewed By: {bkonyi, dcharkes}

This change reverts the following previous change:
tl;dr Removes 50% (>1650 locs) of native asset related code in `packages/flutter_tools`

Before this PR the invocation of dart build/link/dry-run was implemented per OS. This lead to very large code duplication of almost identical, but sligthly different code. It also led to similarly duplicated test code.

Almost the entire dart build/link/dry-run implementation is identical across OSes. There's small variations:

  - configuration of the build (e.g. android/macos/ios version, ios sdk, ...)
  - determining target locations & copying the final shared libraries

This PR unifies the implementation by reducing the code to basically two main functions:

  * `runFlutterSpecificDartBuild` which is responsible for
    - obtain flutter configuration
    - perform dart build (& link)
    - determine target location & install binaries

  * `runFlutterSpecificDartDryRunOnPlatforms` which is responsible for a similar (but not same):
    - obtain flutter configuration
    - perform dart dry run
    - determine target location

these two functions will call out to helpers for the OS specific functionality:

  * `_assetTargetLocationsForOS` for determining the location of the code assets

  * `_copyNativeCodeAssetsForOS` for copying the code assets (and possibly overriting the install name, etc)

=> Since we get rid of the code duplication across OSes and have only a single code path for the build/link/dry-run, we can also remove the duplicated tests that were pretty much identical across OSes.

We also harden the building code by adding asserts, e.g.

  * the dry fun functionality should never be used by `flutter test`

  * the `build/native_assets/<os>/native_assets.yaml` should only be used by `flutter test` and the dry-run of `flutter run`

=> We change the tests to also comply with these invariants (so the tests are not testing things that cannot happen in reality)

We also rename `{,Flutter}NativeAssetsBuildRunner` to disambiguate it from the `package:native_asset_builder`'s `NativeAssetsBuildRunner`.

We also reorganize the main code to make it readable from top-down and make members private where they can be.
thejitenpatel pushed a commit to thejitenpatel/flutter that referenced this pull request Sep 27, 2024
…s around 50% of the native asset related code) (flutter#155430)" (flutter#155713)

Reverts: flutter#155430
Initiated by: eyebrowsoffire
Reason for reverting: Postsubmit failures closing the tree. See the following examples:

https://ci.chromium.org/ui/p/flutter/builders/prod/Mac_ios%20native_assets_ios/5738/overview
https://ci.chromium.org/ui/p/flutter/builders/prod/Mac_arm64_mokey%20native_assets_android/583/overview
https://ci.chromium.org/ui/p/flutter/builders/prod/Linux_pixel_7pro%20native_assets_android/4075/overview
https://ci.chromium.org/u
Original PR Author: mkustermann

Reviewed By: {bkonyi, dcharkes}

This change reverts the following previous change:
tl;dr Removes 50% (>1650 locs) of native asset related code in `packages/flutter_tools`

Before this PR the invocation of dart build/link/dry-run was implemented per OS. This lead to very large code duplication of almost identical, but sligthly different code. It also led to similarly duplicated test code.

Almost the entire dart build/link/dry-run implementation is identical across OSes. There's small variations:

  - configuration of the build (e.g. android/macos/ios version, ios sdk, ...)
  - determining target locations & copying the final shared libraries

This PR unifies the implementation by reducing the code to basically two main functions:

  * `runFlutterSpecificDartBuild` which is responsible for
    - obtain flutter configuration
    - perform dart build (& link)
    - determine target location & install binaries

  * `runFlutterSpecificDartDryRunOnPlatforms` which is responsible for a similar (but not same):
    - obtain flutter configuration
    - perform dart dry run
    - determine target location

these two functions will call out to helpers for the OS specific functionality:

  * `_assetTargetLocationsForOS` for determining the location of the code assets

  * `_copyNativeCodeAssetsForOS` for copying the code assets (and possibly overriting the install name, etc)

=> Since we get rid of the code duplication across OSes and have only a single code path for the build/link/dry-run, we can also remove the duplicated tests that were pretty much identical across OSes.

We also harden the building code by adding asserts, e.g.

  * the dry fun functionality should never be used by `flutter test`

  * the `build/native_assets/<os>/native_assets.yaml` should only be used by `flutter test` and the dry-run of `flutter run`

=> We change the tests to also comply with these invariants (so the tests are not testing things that cannot happen in reality)

We also rename `{,Flutter}NativeAssetsBuildRunner` to disambiguate it from the `package:native_asset_builder`'s `NativeAssetsBuildRunner`.

We also reorganize the main code to make it readable from top-down and make members private where they can be.
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Dec 11, 2024
… (removes around 50% of the native asset related code) (#155430)" (flutter/flutter#155713)
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Dec 12, 2024
… (removes around 50% of the native asset related code) (#155430)" (flutter/flutter#155713)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

a: desktop Running on desktop revert of Bot Only: Tracking label for bot. Tracks new revert of pull requests. tool Affects the "flutter" command-line tool. See also t: labels.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants