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

Commit 119a057

Browse files
authored
[macOS] Eliminate archive_gen_snapshot target (#53948)
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. [C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
1 parent 5b9fc4e commit 119a057

File tree

2 files changed

+5
-21
lines changed

2 files changed

+5
-21
lines changed

build/archives/BUILD.gn

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -272,23 +272,7 @@ if (host_os == "win") {
272272
}
273273
}
274274

275-
# Archives Flutter Mac Artifacts
276275
if (is_mac) {
277-
zip_bundle("archive_gen_snapshot") {
278-
deps = [ "//flutter/lib/snapshot:create_macos_gen_snapshots" ]
279-
suffix = "-$flutter_runtime_mode"
280-
if (flutter_runtime_mode == "debug") {
281-
suffix = ""
282-
}
283-
output = "$full_platform_name$suffix/gen_snapshot.zip"
284-
files = [
285-
{
286-
source = "${root_out_dir}/gen_snapshot_${target_cpu}"
287-
destination = "gen_snapshot_${target_cpu}"
288-
},
289-
]
290-
}
291-
292276
group("flutter_embedder_framework") {
293277
deps = [
294278
"//flutter/shell/platform/embedder:flutter_embedder_framework_archive",

ci/builders/mac_host_engine.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -42,11 +42,11 @@
4242
"ninja": {
4343
"config": "ci/host_debug",
4444
"targets": [
45-
"flutter/build/archives:archive_gen_snapshot",
4645
"flutter/build/archives:artifacts",
4746
"flutter/build/archives:dart_sdk_archive",
4847
"flutter/build/archives:flutter_embedder_framework",
4948
"flutter/build/dart:copy_dart_sdk",
49+
"flutter/lib/snapshot:create_macos_gen_snapshots",
5050
"flutter/shell/platform/darwin/macos:zip_macos_flutter_framework",
5151
"flutter/tools/font_subset",
5252
"flutter:unittests"
@@ -127,8 +127,8 @@
127127
"config": "ci/host_profile",
128128
"targets": [
129129
"flutter/build/dart:copy_dart_sdk",
130-
"flutter/build/archives:archive_gen_snapshot",
131130
"flutter/build/archives:artifacts",
131+
"flutter/lib/snapshot:create_macos_gen_snapshots",
132132
"flutter/shell/platform/darwin/macos:zip_macos_flutter_framework",
133133
"flutter:unittests"
134134
]
@@ -214,9 +214,9 @@
214214
"ninja": {
215215
"config": "ci/host_release",
216216
"targets": [
217-
"flutter/build/archives:archive_gen_snapshot",
218217
"flutter/build/archives:artifacts",
219218
"flutter/build/dart:copy_dart_sdk",
219+
"flutter/lib/snapshot:create_macos_gen_snapshots",
220220
"flutter/shell/platform/darwin/macos:zip_macos_flutter_framework",
221221
"flutter/tools/font_subset",
222222
"flutter:unittests"
@@ -298,10 +298,10 @@
298298
"config": "ci/mac_debug_arm64",
299299
"targets": [
300300
"flutter/tools/font_subset",
301-
"flutter/build/archives:archive_gen_snapshot",
302301
"flutter/build/archives:artifacts",
303302
"flutter/build/archives:dart_sdk_archive",
304303
"flutter/build/archives:flutter_embedder_framework",
304+
"flutter/lib/snapshot:create_macos_gen_snapshots",
305305
"flutter/shell/platform/darwin/macos:zip_macos_flutter_framework"
306306
]
307307
},
@@ -442,10 +442,10 @@
442442
"config": "ci/mac_release_arm64",
443443
"targets": [
444444
"flutter:unittests",
445-
"flutter/build/archives:archive_gen_snapshot",
446445
"flutter/build/archives:artifacts",
447446
"flutter/build/dart:copy_dart_sdk",
448447
"flutter/impeller/golden_tests:impeller_golden_tests",
448+
"flutter/lib/snapshot:create_macos_gen_snapshots",
449449
"flutter/shell/platform/darwin/macos:zip_macos_flutter_framework",
450450
"flutter/tools/font_subset"
451451
]

0 commit comments

Comments
 (0)