[flutter_tools] Fix arm64e incorrectly matching arm64 in regex check#184057
Conversation
|
It looks like this pull request may not have tests. Please make sure to add tests or get an explicit test exemption before merging. If you are not sure if you need tests, consider this rule of thumb: the purpose of a test is to make sure someone doesn't accidentally revert the fix. Ask yourself, is there anything in your PR that you feel it is important we not accidentally revert back to how it was before your fix? Reviewers: Read the Tree Hygiene page and make sure this patch meets those guidelines before LGTMing. If you believe this PR qualifies for a test exemption, contact "@test-exemption-reviewer" in the #hackers channel in Discord (don't just cc them here, they won't see it!). The test exemption team is a small volunteer group, so all reviewers should feel empowered to ask for tests, without delegating that responsibility entirely to the test exemption group. |
|
Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). View this failed invocation of the CLA check for more information. For the most up to date status, view the checks section at the bottom of the pull request. |
There was a problem hiding this comment.
Code Review
This pull request fixes a bug where a regular expression was incorrectly matching arm64e when checking for arm64. The change correctly adds a word boundary to the regex to ensure only the arm64 architecture is matched. This prevents arm64 from being incorrectly excluded from simulator builds when only arm64e is specified as excluded.
| } | ||
|
|
||
| return !buildSettings.contains(RegExp('EXCLUDED_ARCHS.*arm64')); | ||
| return !buildSettings.contains(RegExp(r'EXCLUDED_ARCHS.*\barm64\b')); |
There was a problem hiding this comment.
While this change correctly fixes the regular expression for the project's buildSettings, the same faulty regex appears to be used earlier in the pluginsSupportArmSimulator function when checking podBuildSettings inside a for loop. To completely fix the bug, the regex in the loop should also be updated with a word boundary (\barm64\b) to ensure consistent behavior for both project settings and pod settings.
There was a problem hiding this comment.
Nope, there is no faulty regex in the loop. There is only one instance of the EXCLUDED_ARCHS.*arm64 regex and it's already been fixed
There was a problem hiding this comment.
@trizin lg but can you address gemini's feedback?
|
@okorohelijah done! |
|
auto label is removed for flutter/flutter/184057, Failed to enqueue flutter/flutter/184057 with HTTP 400: GraphQL mutate failed. |
|
@trizin |
|
/cc @hellohuanlin from ios triage for re-review. |
flutter/flutter@81c87ea...bf18e39 2026-04-10 [email protected] [flutter_tools] Fix arm64e incorrectly matching arm64 in regex check (flutter/flutter#184057) 2026-04-10 [email protected] Specify GitHub Repo in GH CLI calls for revert workflow. (flutter/flutter#184878) 2026-04-10 [email protected] Don't use `git add -N` in the sync engine workflow. (flutter/flutter#184882) 2026-04-10 [email protected] Roll Skia from af67d5555e35 to 25b01e5f4ea0 (14 revisions) (flutter/flutter#184865) 2026-04-10 [email protected] [Dot shorthands] Finish examples/api migration (flutter/flutter#183967) 2026-04-10 [email protected] Roll Dart SDK from 98a143f8873e to e715805ddbd3 (1 revision) (flutter/flutter#184864) 2026-04-10 98614782+auto-submit[bot]@users.noreply.github.com Reverts "Disable async mode with LLDB (#184768)" (flutter/flutter#184868) 2026-04-09 [email protected] Skip freeze check in the merge queue (flutter/flutter#184854) 2026-04-09 [email protected] Remove unused variable in `ProcessTextPlugin.java` (flutter/flutter#184161) 2026-04-09 [email protected] Roll Fuchsia Linux SDK from pDXMXRIjEHTw7B0sk... to lZcRfPoCLnDttrf9P... (flutter/flutter#184842) 2026-04-09 [email protected] Roll Dart SDK from bd6280c3e8e9 to 98a143f8873e (5 revisions) (flutter/flutter#184824) 2026-04-09 [email protected] Remove `linux_android_emu_unstable android_engine_vulkan_tests` (flutter/flutter#184787) 2026-04-09 [email protected] Roll Packages from 0e0a032 to 1aa892c (9 revisions) (flutter/flutter#184829) 2026-04-09 [email protected] [record_use] Add experimental flag and test project (flutter/flutter#184719) 2026-04-09 [email protected] Disable async mode with LLDB (flutter/flutter#184768) 2026-04-09 [email protected] Update link for rolling forward to aligned Dart hash (flutter/flutter#184780) 2026-04-09 [email protected] Roll Skia from 4d0f5389e131 to af67d5555e35 (3 revisions) (flutter/flutter#184825) 2026-04-09 [email protected] UberSDFContent refactoring and handle stroke miter limit for stroked rects (flutter/flutter#184603) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/flutter-packages Please CC [email protected],[email protected] on the revert to ensure that a human is aware of the problem. To file a bug in Packages: 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
…lutter#184057) Fixes flutter#184056 The regex `EXCLUDED_ARCHS.*arm64` in `pluginsSupportArmSimulator()` matches `arm64e` as a substring, causing Flutter to incorrectly exclude arm64 from simulator builds when plugins only exclude arm64e. This adds a word boundary (\\barm64\\b) so that arm64e is no longer a false positive match, fixing simulator builds on Apple Silicon Macs. Also strengthens the existing test assertion to verify arm64 is NOT added to EXCLUDED_ARCHS when only arm64e is excluded by plugins. ## Pre-launch Checklist - [x] I read the [Contributor Guide] and followed the process outlined there for submitting PRs. - [x] I read the [AI contribution guidelines] and understand my responsibilities, or I am not using AI tools. - [x] I read the [Tree Hygiene] wiki page, which explains my responsibilities. - [x] I read and followed the [Flutter Style Guide], including [Features we expect every widget to implement]. - [x] I signed the [CLA]. - [x] I listed at least one issue that this PR fixes in the description above. - [x] I updated/added relevant documentation (doc comments with `///`). - [x] I added new tests to check the change I am making, or this PR is [test-exempt]. - [x] I followed the [breaking change policy] and added [Data Driven Fixes] where supported. - [x] All existing and new tests are passing.
Fixes #184056
The regex
EXCLUDED_ARCHS.*arm64inpluginsSupportArmSimulator()matchesarm64eas a substring, causing Flutter to incorrectly exclude arm64 fromsimulator builds when plugins only exclude arm64e.
This adds a word boundary (\barm64\b) so that arm64e is no longer a false
positive match, fixing simulator builds on Apple Silicon Macs.
Also strengthens the existing test assertion to verify arm64 is NOT added
to EXCLUDED_ARCHS when only arm64e is excluded by plugins.
Pre-launch Checklist
///).