Skip to content

Conversation

@Sameri11
Copy link
Contributor

@Sameri11 Sameri11 commented Mar 26, 2025

This PR resolves warning when building macOS app in environments with multiple available destinations (i.e. arm Macs with Rosetta).

Debug Release Profile
Before image image image
After image image image

For release/profile builds generic/platform=macOS was chosen because these configurations are "fat" (includes all arches) so it is a preferred way of building device-agnostic actions such as xcodebuild build, as per xcodebuild documentation.

fixes #86590

Also, kudos to @zhibisora. This PR is heavily inspired by #148920. Although, I failed to properly rebase it onto current master (you know, monorepo merge and format changes).

Pre-launch Checklist

If you need help, consider asking for advice on the #hackers-new channel on Discord.

@github-actions github-actions bot added tool Affects the "flutter" command-line tool. See also t: labels. a: desktop Running on desktop team-ios Owned by iOS platform team labels Mar 26, 2025
@Sameri11 Sameri11 force-pushed the fix-macos-arch-specify branch 8 times, most recently from 76aaae0 to 2a738f8 Compare March 28, 2025 15:39
@jellis206
Copy link

I believe in you!

@Sameri11 Sameri11 force-pushed the fix-macos-arch-specify branch 3 times, most recently from 112eb22 to 89bd093 Compare March 30, 2025 14:08
@Sameri11 Sameri11 marked this pull request as ready for review March 31, 2025 15:46
@Sameri11 Sameri11 force-pushed the fix-macos-arch-specify branch from 89bd093 to f8268f2 Compare April 21, 2025 15:57
@Sameri11 Sameri11 requested a review from a team as a code owner April 21, 2025 15:57
@vashworth vashworth self-requested a review April 21, 2025 15:58
@Sameri11 Sameri11 force-pushed the fix-macos-arch-specify branch 3 times, most recently from 267a786 to 1fc9ec6 Compare April 26, 2025 19:28
@Sameri11 Sameri11 requested a review from vashworth April 26, 2025 20:10
Copy link
Contributor

@vashworth vashworth left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Woo, super happy to see this fixed. Thanks for the PR!

@vashworth vashworth requested a review from bkonyi April 29, 2025 15:54
@Sameri11
Copy link
Contributor Author

Hi @bkonyi ! Just a gentle reminder about this. If you could take a moment to review it, I would greatly appreciate it!

@bkonyi bkonyi added the autosubmit Merge PR when tree becomes green via auto submit App label May 26, 2025
@bkonyi
Copy link
Contributor

bkonyi commented May 26, 2025

Sorry for the delay @Sameri11! This one slipped past me.

LGTM!

@auto-submit auto-submit bot added this pull request to the merge queue May 26, 2025
Merged via the queue into flutter:master with commit 742141a May 26, 2025
143 checks passed
@flutter-dashboard flutter-dashboard bot removed the autosubmit Merge PR when tree becomes green via auto submit App label May 26, 2025
@Sameri11
Copy link
Contributor Author

@vashworth @bkonyi thanks for review! :)

stan-at-work pushed a commit to stan-at-work/flutter that referenced this pull request May 26, 2025
<!--
Thanks for filing a pull request!
Reviewers are typically assigned within a week of filing a request.
To learn more about code review, see our documentation on Tree Hygiene:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md
-->

This PR resolves warning when building macOS app in environments with
multiple available destinations (i.e. arm Macs with Rosetta).

| | Debug | Release | Profile |
|---|---|---|---|
| **Before** | <img width="657" alt="image"
src="https://github.com/user-attachments/assets/5207f2cc-2785-4bef-8eb0-e9a5a7431c91"
/> | <img width="699" alt="image"
src="https://github.com/user-attachments/assets/31f38373-adf9-4797-982d-782569be0681"
/> | <img width="699" alt="image"
src="https://github.com/user-attachments/assets/be1432f9-0668-44b9-b75e-ae4a56c0ff6e"
/> |
| **After** | <img width="672" alt="image"
src="https://github.com/user-attachments/assets/62f3b37b-8461-4274-b9be-53df22bec82d"
/> | <img width="672" alt="image"
src="https://github.com/user-attachments/assets/7c0489e7-0f7f-4498-b9d2-6d566722a05a"
/> | <img width="672" alt="image"
src="https://github.com/user-attachments/assets/d0a3e065-3ae7-4d53-beb5-d2a96aa01aea"
/> |


For release/profile builds `generic/platform=macOS` was chosen because
these configurations are "fat" (includes all arches) so it is a
preferred way of building device-agnostic actions such as `xcodebuild
build`, as per `xcodebuild` documentation.

fixes flutter#86590 

Also, kudos to @zhibisora. This PR is heavily inspired by
flutter#148920. Although, I failed to
properly rebase it onto current master (you know, monorepo merge and
format changes).


## Pre-launch Checklist

- [x] I read the [Contributor Guide] and followed the process outlined
there for submitting PRs.
- [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.

If you need help, consider asking for advice on the #hackers-new channel
on [Discord].

<!-- Links -->
[Contributor Guide]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#overview
[Tree Hygiene]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md
[test-exempt]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#tests
[Flutter Style Guide]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md
[Features we expect every widget to implement]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md#features-we-expect-every-widget-to-implement
[CLA]: https://cla.developers.google.com/
[flutter/tests]: https://github.com/flutter/tests
[breaking change policy]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#handling-breaking-changes
[Discord]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Chat.md
[Data Driven Fixes]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Data-driven-Fixes.md
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request May 27, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request May 27, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request May 27, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request May 27, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request May 28, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request May 28, 2025
auto-submit bot pushed a commit to flutter/packages that referenced this pull request May 28, 2025
flutter/flutter@4372bfb...0e536eb

2025-05-28 [email protected] Introduces FlutterPluginRegistrant protocol. (flutter/flutter#169399)
2025-05-28 98614782+auto-submit[bot]@users.noreply.github.com Reverts "Initialize `default-flavor` in `FlutterCommand`, adds integration test. (#169298)" (flutter/flutter#169581)
2025-05-28 [email protected] Initialize `default-flavor` in `FlutterCommand`, adds integration test. (flutter/flutter#169298)
2025-05-28 [email protected] Update DEPS to  add dart-lang/ai repo (flutter/flutter#169540)
2025-05-28 [email protected] Roll Skia from 92311f2ba0b7 to 82d326fc2148 (1 revision) (flutter/flutter#169552)
2025-05-28 [email protected] dev/bots: improve service worker test code (flutter/flutter#169231)
2025-05-28 [email protected] Make Android team platform view TESTOWNERS (flutter/flutter#169297)
2025-05-28 [email protected] Roll Skia from 044f58f78a73 to 92311f2ba0b7 (9 revisions) (flutter/flutter#169542)
2025-05-27 [email protected] Roll Skia from 443f5257f382 to 044f58f78a73 (16 revisions) (flutter/flutter#169530)
2025-05-27 [email protected] [web] Fix unresponsive input above SelectionArea in Safari and Firefox. (flutter/flutter#167275)
2025-05-27 [email protected] Set pause_isolates_on_start flag if --start-paused (flutter/flutter#169392)
2025-05-27 [email protected] Roll Packages from af0b9a9 to 6eebe72 (24 revisions) (flutter/flutter#169514)
2025-05-27 [email protected] Roll Fuchsia Linux SDK from 5mpmPsuD8rpeiJizT... to nC9hLWjYVlChDTEPh... (flutter/flutter#169498)
2025-05-27 [email protected] Split hint from label and expose it via aria-description or aria-describedby (flutter/flutter#169157)
2025-05-26 [email protected] 🐛 Normalize generated file paths for the l10n generator (flutter/flutter#169467)
2025-05-26 [email protected] Roll Dart SDK from d811152316e4 to 6aeb798bdbe2 (2 revisions) (flutter/flutter#169478)
2025-05-26 [email protected] [Cupertino] Apply RSuperellipse to most Cupertino widgets (flutter/flutter#167784)
2025-05-26 [email protected] Roll `package:dds` to 5.0.2 (flutter/flutter#169471)
2025-05-26 [email protected] Use `.flutter-plugins-dependencies` for crash reporting. (flutter/flutter#169319)
2025-05-26 [email protected] Remove now disabled code that would generate `.flutter-plugins`. (flutter/flutter#169320)
2025-05-26 [email protected] Roll Dart SDK from 7dab9bffe1f7 to d811152316e4 (1 revision) (flutter/flutter#169473)
2025-05-26 [email protected] Precise browser resizing with integration_test and driver (flutter/flutter#160678)
2025-05-26 [email protected] Add `/coverage/` to `.gitignore.tmp` (flutter/flutter#169387)
2025-05-26 [email protected] Make test output with encoded `dart-defines=...` human readable. (flutter/flutter#169353)
2025-05-26 [email protected] Use at most `PROC~/2` tasks to transform assets. (flutter/flutter#169386)
2025-05-26 [email protected] Forward exit code from dart test to flutter test (flutter/flutter#168604)
2025-05-26 [email protected] Fix warning when building for macOS desktop (flutter/flutter#165996)

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
FMorschel pushed a commit to FMorschel/packages that referenced this pull request Jun 9, 2025
…r#9334)

flutter/flutter@4372bfb...0e536eb

2025-05-28 [email protected] Introduces FlutterPluginRegistrant protocol. (flutter/flutter#169399)
2025-05-28 98614782+auto-submit[bot]@users.noreply.github.com Reverts "Initialize `default-flavor` in `FlutterCommand`, adds integration test. (#169298)" (flutter/flutter#169581)
2025-05-28 [email protected] Initialize `default-flavor` in `FlutterCommand`, adds integration test. (flutter/flutter#169298)
2025-05-28 [email protected] Update DEPS to  add dart-lang/ai repo (flutter/flutter#169540)
2025-05-28 [email protected] Roll Skia from 92311f2ba0b7 to 82d326fc2148 (1 revision) (flutter/flutter#169552)
2025-05-28 [email protected] dev/bots: improve service worker test code (flutter/flutter#169231)
2025-05-28 [email protected] Make Android team platform view TESTOWNERS (flutter/flutter#169297)
2025-05-28 [email protected] Roll Skia from 044f58f78a73 to 92311f2ba0b7 (9 revisions) (flutter/flutter#169542)
2025-05-27 [email protected] Roll Skia from 443f5257f382 to 044f58f78a73 (16 revisions) (flutter/flutter#169530)
2025-05-27 [email protected] [web] Fix unresponsive input above SelectionArea in Safari and Firefox. (flutter/flutter#167275)
2025-05-27 [email protected] Set pause_isolates_on_start flag if --start-paused (flutter/flutter#169392)
2025-05-27 [email protected] Roll Packages from af0b9a9 to 6eebe72 (24 revisions) (flutter/flutter#169514)
2025-05-27 [email protected] Roll Fuchsia Linux SDK from 5mpmPsuD8rpeiJizT... to nC9hLWjYVlChDTEPh... (flutter/flutter#169498)
2025-05-27 [email protected] Split hint from label and expose it via aria-description or aria-describedby (flutter/flutter#169157)
2025-05-26 [email protected] 🐛 Normalize generated file paths for the l10n generator (flutter/flutter#169467)
2025-05-26 [email protected] Roll Dart SDK from d811152316e4 to 6aeb798bdbe2 (2 revisions) (flutter/flutter#169478)
2025-05-26 [email protected] [Cupertino] Apply RSuperellipse to most Cupertino widgets (flutter/flutter#167784)
2025-05-26 [email protected] Roll `package:dds` to 5.0.2 (flutter/flutter#169471)
2025-05-26 [email protected] Use `.flutter-plugins-dependencies` for crash reporting. (flutter/flutter#169319)
2025-05-26 [email protected] Remove now disabled code that would generate `.flutter-plugins`. (flutter/flutter#169320)
2025-05-26 [email protected] Roll Dart SDK from 7dab9bffe1f7 to d811152316e4 (1 revision) (flutter/flutter#169473)
2025-05-26 [email protected] Precise browser resizing with integration_test and driver (flutter/flutter#160678)
2025-05-26 [email protected] Add `/coverage/` to `.gitignore.tmp` (flutter/flutter#169387)
2025-05-26 [email protected] Make test output with encoded `dart-defines=...` human readable. (flutter/flutter#169353)
2025-05-26 [email protected] Use at most `PROC~/2` tasks to transform assets. (flutter/flutter#169386)
2025-05-26 [email protected] Forward exit code from dart test to flutter test (flutter/flutter#168604)
2025-05-26 [email protected] Fix warning when building for macOS desktop (flutter/flutter#165996)

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
Ortes pushed a commit to Ortes/packages that referenced this pull request Jun 25, 2025
…r#9334)

flutter/flutter@4372bfb...0e536eb

2025-05-28 [email protected] Introduces FlutterPluginRegistrant protocol. (flutter/flutter#169399)
2025-05-28 98614782+auto-submit[bot]@users.noreply.github.com Reverts "Initialize `default-flavor` in `FlutterCommand`, adds integration test. (#169298)" (flutter/flutter#169581)
2025-05-28 [email protected] Initialize `default-flavor` in `FlutterCommand`, adds integration test. (flutter/flutter#169298)
2025-05-28 [email protected] Update DEPS to  add dart-lang/ai repo (flutter/flutter#169540)
2025-05-28 [email protected] Roll Skia from 92311f2ba0b7 to 82d326fc2148 (1 revision) (flutter/flutter#169552)
2025-05-28 [email protected] dev/bots: improve service worker test code (flutter/flutter#169231)
2025-05-28 [email protected] Make Android team platform view TESTOWNERS (flutter/flutter#169297)
2025-05-28 [email protected] Roll Skia from 044f58f78a73 to 92311f2ba0b7 (9 revisions) (flutter/flutter#169542)
2025-05-27 [email protected] Roll Skia from 443f5257f382 to 044f58f78a73 (16 revisions) (flutter/flutter#169530)
2025-05-27 [email protected] [web] Fix unresponsive input above SelectionArea in Safari and Firefox. (flutter/flutter#167275)
2025-05-27 [email protected] Set pause_isolates_on_start flag if --start-paused (flutter/flutter#169392)
2025-05-27 [email protected] Roll Packages from af0b9a9 to 6eebe72 (24 revisions) (flutter/flutter#169514)
2025-05-27 [email protected] Roll Fuchsia Linux SDK from 5mpmPsuD8rpeiJizT... to nC9hLWjYVlChDTEPh... (flutter/flutter#169498)
2025-05-27 [email protected] Split hint from label and expose it via aria-description or aria-describedby (flutter/flutter#169157)
2025-05-26 [email protected] 🐛 Normalize generated file paths for the l10n generator (flutter/flutter#169467)
2025-05-26 [email protected] Roll Dart SDK from d811152316e4 to 6aeb798bdbe2 (2 revisions) (flutter/flutter#169478)
2025-05-26 [email protected] [Cupertino] Apply RSuperellipse to most Cupertino widgets (flutter/flutter#167784)
2025-05-26 [email protected] Roll `package:dds` to 5.0.2 (flutter/flutter#169471)
2025-05-26 [email protected] Use `.flutter-plugins-dependencies` for crash reporting. (flutter/flutter#169319)
2025-05-26 [email protected] Remove now disabled code that would generate `.flutter-plugins`. (flutter/flutter#169320)
2025-05-26 [email protected] Roll Dart SDK from 7dab9bffe1f7 to d811152316e4 (1 revision) (flutter/flutter#169473)
2025-05-26 [email protected] Precise browser resizing with integration_test and driver (flutter/flutter#160678)
2025-05-26 [email protected] Add `/coverage/` to `.gitignore.tmp` (flutter/flutter#169387)
2025-05-26 [email protected] Make test output with encoded `dart-defines=...` human readable. (flutter/flutter#169353)
2025-05-26 [email protected] Use at most `PROC~/2` tasks to transform assets. (flutter/flutter#169386)
2025-05-26 [email protected] Forward exit code from dart test to flutter test (flutter/flutter#168604)
2025-05-26 [email protected] Fix warning when building for macOS desktop (flutter/flutter#165996)

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
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Aug 14, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Aug 14, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Aug 15, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Aug 15, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Aug 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

a: desktop Running on desktop team-ios Owned by iOS platform team tool Affects the "flutter" command-line tool. See also t: labels.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

On Xcode 13 "flutter run -d macos" prints warning that there are multiple matching destinations, "arch:x86_64" and "name:Any Mac"

4 participants