Repository navigation
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
|
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 |
|
Closing this. The engine reland #187591 was closed unmerged by @jtmcdole on 2026-07-07 (deferred until Google's Android team ships official linux-arm64 tooling), so this framework half has no landing target — advertising The branch stays on my fork at |
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