Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build macOS engine as an xcframework #50300

Merged
merged 6 commits into from
Feb 22, 2024

Conversation

vashworth
Copy link
Contributor

@vashworth vashworth commented Feb 2, 2024

Creates and adds FlutterMacOS.xcframework to out/mac or out/host.

Creates and archives FlutterMacOS.xcframework when building mac_host_engine. Archives the xcframework in a new zipped folder at darwin-x64/framework.zip, darwin-x64-profile/framework.zip, darwin-x64-release/framework.zip.

The FlutterMacOS.framework is also still archived currently - I thought it'd be better to keep it archived so we don't have to worry about the tool breaking until we're ready to remove it.

Part of flutter/flutter#126016.

Pre-launch Checklist

  • I read the Contributor Guide and followed the process outlined there for submitting PRs.
  • I read the Tree Hygiene wiki page, which explains my responsibilities.
  • I read and followed the Flutter Style Guide and the C++, Objective-C, Java style guides.
  • I listed at least one issue that this PR fixes in the description above.
  • I added new tests to check the change I am making or feature I am adding, or the PR is test-exempt. See testing the engine for instructions on writing and running engine tests.
  • I updated/added relevant documentation (doc comments with ///).
  • I signed the CLA.
  • All existing and new tests are passing.

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

@vashworth vashworth marked this pull request as ready for review February 5, 2024 15:59
@flutter-dashboard
Copy link

It looks like this pull request may not have tests. Please make sure to add tests before merging. If you need an exemption to this rule, contact "@test-exemption-reviewer" in the #hackers channel in Chat (don't just cc them here, they won't see it! Use Discord!).

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.

@vashworth vashworth marked this pull request as draft February 5, 2024 16:09
@vashworth
Copy link
Contributor Author

@jmagman I'm not sure how to test this. When you did it for #22506, seems like you tested it by adding it as a framework in the scenarios app. However, macos doesn't have a scenarios app

@jmagman
Copy link
Member

jmagman commented Feb 6, 2024

When you did it for #22506, seems like you tested it by adding it as a framework in the scenarios app. However, macos doesn't have a scenarios app

It's not ideal, but you could add tests in the framework, ready to merge right after the commit rolls into the framework and you are pretty confident it won't be reverted (probably not worth a manual roll).

https://github.com/flutter/flutter/blob/83aca58fa7cdc4b8ba019cbad863afbef11c6c05/packages/flutter_tools/test/host_cross_arch.shard/ios_content_validation_test.dart#L32-L53

Note that the framework codesigning tests run on beta and stable will fail until you add FlutterMacOS.xcframework:

https://github.com/flutter/flutter/blob/83aca58fa7cdc4b8ba019cbad863afbef11c6c05/dev/bots/test.dart#L1729
https://github.com/flutter/flutter/blob/83aca58fa7cdc4b8ba019cbad863afbef11c6c05/dev/bots/test.dart#L1759

@jmagman
Copy link
Member

jmagman commented Feb 8, 2024

The FlutterMacOS.framework is also still archived currently - I thought it'd be better to keep it archived so we don't have to worry about the tool breaking until we're ready to remove it.

+1, let's make sure we have the tool change as ready as possible so the artifact size isn't doubled on the next stable.

@vashworth
Copy link
Contributor Author

Corresponding framework PR: flutter/flutter#143244

@vashworth

This comment was marked as outdated.

@vashworth
Copy link
Contributor Author

This PR should not affect verify_binaries_codesigned test or the tool.

verify_binaries_codesigned uses artifacts downloaded by the tool
https://github.com/flutter/flutter/blob/c530276f7806c77da2541c518a0e103c9bb44f10/dev/bots/test.dart#L1660-L1667.

And the tool only downloads artifacts specifically specified to be downloaded. For example: https://github.com/flutter/flutter/blob/c530276f7806c77da2541c518a0e103c9bb44f10/packages/flutter_tools/lib/src/flutter_cache.dart#L860-L869

From what I can tell, uploading this new zip file shouldn't affect anything.

@vashworth vashworth marked this pull request as ready for review February 15, 2024 19:01
@vashworth
Copy link
Contributor Author

@zanderso Would you be comfortable reviewing? @jmagman is OOO. Also, just realized there's a merge conflict, I'll fix it shortly 😅

Copy link
Member

@zanderso zanderso left a comment

Choose a reason for hiding this comment

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

lgtm

shell/platform/darwin/macos/BUILD.gn Outdated Show resolved Hide resolved
shell/platform/darwin/macos/BUILD.gn Outdated Show resolved Hide resolved
@vashworth vashworth added the autosubmit Merge PR when tree becomes green via auto submit App label Feb 22, 2024
@auto-submit auto-submit bot merged commit 73a6e07 into flutter:main Feb 22, 2024
28 checks passed
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Feb 22, 2024
auto-submit bot pushed a commit to flutter/flutter that referenced this pull request Feb 22, 2024
…143980)

flutter/engine@cb6115d...c5d2e01

2024-02-22 30870216+gaaclarke@users.noreply.github.com [Impeller] moved the kernel size assert to a more appropriate location. (flutter/engine#50880)
2024-02-22 15619084+vashworth@users.noreply.github.com Build macOS engine as an xcframework (flutter/engine#50300)
2024-02-22 skia-flutter-autoroll@skia.org Roll Skia from dd8cd405d145 to a285cd79614c (3 revisions) (flutter/engine#50878)

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/flutter-engine-flutter-autoroll
Please CC jimgraham@google.com,rmistry@google.com,zra@google.com on the revert to ensure that a human
is aware of the problem.

To file a bug in Flutter: 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/flutter that referenced this pull request Feb 23, 2024
auto-submit bot pushed a commit to flutter/flutter that referenced this pull request Feb 23, 2024
…sions) (#143989)

Manual roll requested by goderbauer@google.com

flutter/engine@06448ee...0f3ad23

2024-02-22 98614782+auto-submit[bot]@users.noreply.github.com Reverts "Implement frame timing callbacks in Skwasm. (#50737)" (flutter/engine#50895)
2024-02-22 skia-flutter-autoroll@skia.org Roll Dart SDK from 0f0f7400c38a to e2f2d9b464e9 (4 revisions) (flutter/engine#50881)
2024-02-22 skia-flutter-autoroll@skia.org Roll Skia from a285cd79614c to 58772db6bc46 (3 revisions) (flutter/engine#50884)
2024-02-22 30870216+gaaclarke@users.noreply.github.com [Impeller] moved the kernel size assert to a more appropriate location. (flutter/engine#50880)
2024-02-22 15619084+vashworth@users.noreply.github.com Build macOS engine as an xcframework (flutter/engine#50300)
2024-02-22 skia-flutter-autoroll@skia.org Roll Skia from dd8cd405d145 to a285cd79614c (3 revisions) (flutter/engine#50878)
2024-02-22 dnfield@google.com Avoid generated plugin registrant warnings for scenario_app (flutter/engine#50874)
2024-02-22 15619084+vashworth@users.noreply.github.com Delete and create iOS simulator before running Scenario app test (flutter/engine#50835)
2024-02-22 skia-flutter-autoroll@skia.org Roll Skia from b9c16065b76d to dd8cd405d145 (2 revisions) (flutter/engine#50872)
2024-02-22 zanderso@users.noreply.github.com Remove 'bringup: true' from 'Mac mac_unopt' (flutter/engine#50865)
2024-02-22 31859944+LongCatIsLooong@users.noreply.github.com Pass the missing strut half leading flag over to skia paragraph builder (flutter/engine#50385)
2024-02-22 jacksongardner@google.com Implement frame timing callbacks in Skwasm. (flutter/engine#50737)
2024-02-22 flar@google.com [Impeller] Add stroke benchmarks that create UVs with no transform (flutter/engine#50847)
2024-02-22 98614782+auto-submit[bot]@users.noreply.github.com Reverts "Remove WindowManager reflection in SingleViewPresentation.java (#49996)" (flutter/engine#50873)
2024-02-22 zanderso@users.noreply.github.com Use RBE on more Windows builders (flutter/engine#50866)
2024-02-22 98614782+auto-submit[bot]@users.noreply.github.com Reverts "[Impeller] cache onscreen render targets. (#50751)" (flutter/engine#50871)

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/flutter-engine-flutter-autoroll
Please CC goderbauer@google.com,jimgraham@google.com,rmistry@google.com,zra@google.com on the revert to ensure that a human
is aware of the problem.

To file a bug in Flutter: 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
affects: desktop autosubmit Merge PR when tree becomes green via auto submit App platform-macos
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants