Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

[macOS] Eliminate archive_gen_snapshot target #53948

Merged
merged 1 commit into from
Jul 16, 2024

Conversation

cbracken
Copy link
Member

@cbracken cbracken commented Jul 16, 2024

This target produced an unused zipfile named gen_snapshot.zip containing the gen_snapshot_${target_arch} binary for the current build's target architecture.

The macOS recipe JSON produces the real gen_snapshot.zip that gets uploaded to the cloud bucket and pulled down by the tool. See:

{
"name": "Debug-gen_snapshots",
"parameters": [
"--dst",
"out/debug/snapshot",
"--arm64-out-dir",
"out/ci/mac_debug_arm64",
"--x64-out-dir",
"out/ci/host_debug",
"--zip"
],
"script": "flutter/sky/tools/create_macos_gen_snapshots.py"
},
{
"name": "Profile-gen_snapshots",
"parameters": [
"--dst",
"out/profile/snapshot",
"--arm64-out-dir",
"out/ci/mac_profile_arm64",
"--x64-out-dir",
"out/ci/host_profile",
"--zip"
],
"script": "flutter/sky/tools/create_macos_gen_snapshots.py"
},
{
"name": "Release-gen_snapshots",
"parameters": [
"--dst",
"out/release/snapshot",
"--arm64-out-dir",
"out/ci/mac_release_arm64",
"--x64-out-dir",
"out/ci/host_release",
"--zip"
],
"script": "flutter/sky/tools/create_macos_gen_snapshots.py"

The recipe did, however, rely on the archive_gen_snapshot rule to ensure that the underlying gen_snapshot targets were actually built. See, for example:

"flutter/build/archives:archive_gen_snapshot",

A few benefits:

  • Eliminates an unnecessary zip operation.
  • Eliminates confusion from grepping for gen_snapshot.zip and finding the wrong location in the source.
  • Grepping for create_macos_gen_snapshots will turn up the usage in the JSON build file.

Issue: flutter/flutter#151848

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 and the C++, Objective-C, Java style guides.
  • I listed at least one issue that this PR fixes in the description above.
  • I added new tests to check the change I am making or feature I am adding, or the PR is test-exempt. See testing the engine for instructions on writing and running engine tests.
  • I was thoroughly confused by the fact that my changes to the contents of gen_snapshot.zip weren't showing up in the cloud bucket or tool.
  • I updated/added relevant documentation (doc comments with ///).
  • I signed the CLA.
  • All existing and new tests are passing.

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

This target produced an unused zipfile named `gen_snapshot.zip`
containing the `gen_snapshot_${target_arch}` binary for the current
build's target architecture.

The macOS recipe JSON produces the real `gen_snapshot.zip` that gets
uploaded to the cloud bucket and pulled down by the tool. See:
https://github.com/flutter/engine/blob/e5215e6854bc61cf8d5bae48715d73293bc1f91c/ci/builders/mac_host_engine.json#L555-L592

The recipe did, however, rely on the `archive_gen_snapshot` rule to
ensure that the underlying `gen_snapshot` targets were actually built.
See, for example:
https://github.com/flutter/engine/blob/e5215e6854bc61cf8d5bae48715d73293bc1f91c/ci/builders/mac_host_engine.json#L45

A few benefits:
* Eliminates an unnecessary zip operation.
* Eliminates confusion from grepping for gen_snapshot.zip and finding
  the wrong location in the source.
* Grepping for create_macos_gen_snapshots will turn up the usage in the
  JSON build file.
Copy link
Member

@zanderso zanderso left a comment

Choose a reason for hiding this comment

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

LGTM and to clarify, this only eliminates the unused .zip file, but the recipe is still not yet using the lipo'd gen_snapshots, correct?

@cbracken
Copy link
Member Author

Yep - that's exactly correct. This is just a cleanup of dead code so the next person who has to deal with this archive has it easier.

@cbracken
Copy link
Member Author

And I mean, if we're being realistic, the next person to deal with this is probably one of the people on this patch.

@cbracken cbracken added the autosubmit Merge PR when tree becomes green via auto submit App label Jul 16, 2024
@auto-submit auto-submit bot merged commit 119a057 into flutter:main Jul 16, 2024
31 checks passed
@cbracken cbracken deleted the depend-on-gen_snapshots-directly branch July 16, 2024 21:44
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Jul 17, 2024
auto-submit bot pushed a commit to flutter/flutter that referenced this pull request Jul 17, 2024
…ions) (#151868)

Manual roll requested by [email protected]

flutter/engine@5b9fc4e...b2bdd68

2024-07-16 [email protected] [Impeller] Use depth transform in framebuffer blend entities. (flutter/engine#53951)
2024-07-16 [email protected] [macOS] Eliminate archive_gen_snapshot target (flutter/engine#53948)

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/flutter-engine-flutter-autoroll
Please CC [email protected],[email protected] on the revert to ensure that a human
is aware of the problem.

To file a bug in Flutter: 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
TytaniumDev pushed a commit to TytaniumDev/flutter that referenced this pull request Aug 7, 2024
…ions) (flutter#151868)

Manual roll requested by [email protected]

flutter/engine@5b9fc4e...b2bdd68

2024-07-16 [email protected] [Impeller] Use depth transform in framebuffer blend entities. (flutter/engine#53951)
2024-07-16 [email protected] [macOS] Eliminate archive_gen_snapshot target (flutter/engine#53948)

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/flutter-engine-flutter-autoroll
Please CC [email protected],[email protected] on the revert to ensure that a human
is aware of the problem.

To file a bug in Flutter: 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
Buchimi pushed a commit to Buchimi/flutter that referenced this pull request Sep 2, 2024
…ions) (flutter#151868)

Manual roll requested by [email protected]

flutter/engine@5b9fc4e...b2bdd68

2024-07-16 [email protected] [Impeller] Use depth transform in framebuffer blend entities. (flutter/engine#53951)
2024-07-16 [email protected] [macOS] Eliminate archive_gen_snapshot target (flutter/engine#53948)

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/flutter-engine-flutter-autoroll
Please CC [email protected],[email protected] on the revert to ensure that a human
is aware of the problem.

To file a bug in Flutter: 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 subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
autosubmit Merge PR when tree becomes green via auto submit App
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants