Reland (framework): Support linux-arm64 host for Android gen_snapshot artifact download#187593
Draft
dbebawy wants to merge 1 commit into
Draft
Reland (framework): Support linux-arm64 host for Android gen_snapshot artifact download#187593dbebawy wants to merge 1 commit into
dbebawy wants to merge 1 commit into
Conversation
… artifact download Framework follow-up to the engine reland in flutter#187591. This is the flutter_tools half of flutter#182552: teach the cache and artifact resolution to look for `linux-arm64/gen_snapshot` (and the `linux-arm64.zip` archive shape) when the host CPU is arm64, instead of the hardcoded `linux-x64`. The original PR flutter#182552 landed both halves together, which led to the revert flutter#186693: framework code advertised the linux-arm64 paths before the engine builder ever shipped those artifacts to GCS, breaking `flutter precache --all` for every user at the next beta cut. Sequencing fix for the reland: - flutter#187591 lands first (engine builder for linux-arm64 host AOT, cross-compiled from x64 bots, gated `bringup: true`). - Once the new builder has produced `linux-arm64.zip` to GCS for at least one release cycle, THIS PR lands. - That guarantees the manifest never advertises an artifact that doesn't exist on GCS. Files: - packages/flutter_tools/lib/src/flutter_cache.dart: convert the hardcoded `_linuxBinaryDirs` const list into a function parameterized by host architecture, using the existing `cache.getHostPlatformArchName()` pattern from `LinuxEngineArtifacts`. - packages/flutter_tools/lib/src/artifacts.dart: replace a stale TODO comment with an accurate explanation of why `darwin-arm64` is remapped to `darwin-x64` (universal binary). No Linux remapping is needed since Linux ships native binaries per host architecture. - packages/flutter_tools/test/general.shard/cache_test.dart: new tests covering both x64 and arm64 host artifact resolution, following the existing `LinuxEngineArtifacts` test pattern. - packages/flutter_tools/test/general.shard/artifacts_test.dart: same for `getArtifactPath` resolving `gen_snapshot` paths. Related flutter#75864 Related flutter#168980
Contributor
Author
|
Opening this in draft so the framework half can get review in parallel with the engine reland #187591. Hold for merge until both gates clear:
A scheduled job is watching both conditions and will flip this PR from draft → ready for review when met. The body has the full sequencing rationale. Tagging in the folks who care about both halves:
The diff itself is small (+91/−12 across 4 files) and self-contained to |
13 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Framework half of the reland of #182552. Opened as a draft for code review in parallel with #187591 (engine reland). Do not merge until both gates clear:
linux_arm64_android_aot_enginebuilder has producedlinux-arm64.zipto GCS for at least one engine SHA after merge.The original PR #182552 landed both halves together, which is why the revert #186693 broke
flutter precache --all: framework code advertised paths that didn't yet exist on GCS. This time, framework lands only after the artifacts are confirmed present. A scheduled job is watching for the two conditions and will flip this PR from draft → ready for review when both are met.Changes
packages/flutter_tools/lib/src/flutter_cache.dart: convert the hardcoded_linuxBinaryDirsconst list into a function parameterized by host architecture, using the existingcache.getHostPlatformArchName()pattern fromLinuxEngineArtifacts.packages/flutter_tools/lib/src/artifacts.dart: replace a stale TODO comment with an accurate explanation of whydarwin-arm64is remapped todarwin-x64(universal binary). No Linux remapping needed since Linux ships native binaries per host architecture.packages/flutter_tools/test/general.shard/cache_test.dart: new tests covering both x64 and arm64 host artifact resolution, following the existingLinuxEngineArtifactstest pattern.packages/flutter_tools/test/general.shard/artifacts_test.dart: same forgetArtifactPathresolvinggen_snapshotpaths.Related #75864
Related #168980
Why open this before #187591 lands?
To get code review on the framework half in parallel rather than serially. The actual sequencing-dependency (artifacts must exist before framework manifests them) is enforced by keeping this in draft, not by waiting to open the PR. Reviewers can verify the framework changes are correct without taking on the merge-timing risk.
Pre-launch Checklist