Repository navigation
[flutter_tools] Explain unsupported Android AOT builds on Linux arm64 hosts - #194453
Conversation
There was a problem hiding this comment.
Code Review
This pull request adds a check in AndroidAot to handle cases where gen_snapshot is missing on Linux arm64 hosts targeting Android. Instead of failing with a ProcessException, it now throws a descriptive ToolExit with an actionable error message and a link to the relevant GitHub issue. It also adds corresponding unit tests to verify this behavior when gen_snapshot is missing and when it is present. I have no feedback to provide.
|
Hi @reidbaker, just checking whether you have had a chance to look at this. I am happy to change anything if a different approach would fit better. |
|
So sorry this slipped through my review cracks. Thank you for your contributions to flutter. |
|
Thank you, @reidbaker. I do not have permission to add labels. Could you add CICD and autosubmit when you have a chance? |
|
We require 2 approvals so @mboetger can add auto submit if he agrees with me. Cicd added and again sorry for the slow review |
|
autosubmit label was removed for flutter/flutter/194453, because The base commit of the PR is older than 7 days and can not be merged. Please merge the latest changes from the main into this branch and resubmit the PR. |
|
autosubmit label was removed for flutter/flutter/194453, because - The status or check suite ci.yaml validation has failed. Please fix the issues identified (or deflake) before re-applying this label. |
The Flutter SDK does not ship gen_snapshot for Linux arm64 hosts targeting Android, so profile and release Android builds on these hosts fail with a raw ProcessException about a missing linux-arm64/gen_snapshot. Replace it with a ToolExit that says the configuration is unsupported, shows the expected path, and links the feature request. A gen_snapshot placed at the expected path is still used, so self-built binaries keep working. Fixes flutter#168980
129a2a5 to
d2968fb
Compare
|
Thank you both. I rebased onto master to clear both of the bot's reasons; the change itself is the same. The push removed the CICD label, so could one of you re-add CICD and autosubmit? |
|
autosubmit label was removed for flutter/flutter/194453, because - The status or check suite Dashboard Checks has failed. Please fix the issues identified (or deflake) before re-applying this label. |
|
Thank you for adding the labels. The only failure was |
On Linux arm64 hosts, any profile or release Android build fails with a raw
ProcessException, because the Flutter SDK does not includegen_snapshotfor Android on this host. This PR replaces that with aToolExitthat says the configuration is not supported, shows the path the tool expected, and links the feature request.If a
gen_snapshothas been placed at the expected path (for example, a self-built binary), the build still uses it, so existing workarounds keep working.Since #193647 the build target has no access to
OperatingSystemUtils, so it recognizes a Linux arm64 host from thelinux-arm64directory that the cached artifacts putgen_snapshotin. Builds that use a local engine are not affected.Output of the
flutter assemblestep thatflutter build apk --releaseruns, captured in a linux/arm64 Debian container with the SDK at/flutter(master 8274c72, then with this change applied):Before:
After:
This does not add Linux arm64 host support for Android builds; that is tracked in #75864.
Fixes #168980
Pre-launch Checklist
///).