Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

Conversation

@cyanglaz
Copy link
Contributor

@cyanglaz cyanglaz commented Apr 8, 2023

Build macos framework with fapplication-extension flag.
Added a test to ensure a extension target can link to the framework (with -fapplication-extension)

To fully support extensions on macos, we still need to modify FlutterDartProject for the extension to find the flutter frameworks bundle. Since #37421 seems to be landing soon, we can wait for it lands.

part of flutter/flutter#124290

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 Hixie said 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.

@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 Hixie on the #hackers channel in Chat (don't just cc him here, he won't see it! He's on 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.

Comment on lines 342 to 356
framework_search_path = rebase_path("$root_out_dir")
visibility = [ ":*" ]
cflags_objc = [ "-F$framework_search_path" ]

ldflags = [
"-F$framework_search_path",
"-fapplication-extension",
"-Xlinker",
"-fatal_warnings",
]
frameworks = [ "FlutterMacOS.framework" ]

sources = [ "framework/Source/FlutterUmbrellaImport.m" ]

deps = [ ":_generate_symlinks" ]
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is the test. @Hixie

This build target will fail if the FlutterMacOS framework is not application extension safe.

Copy link
Member

Choose a reason for hiding this comment

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

If you haven't yet you'll need to ping him in Discord in the #hackers channel.

You could also rename tFlutterUmbrellaImport to something that would indicate it's a test https://github.com/flutter/cocoon/blob/412b236f4b16175e9459cdcff430147da4f6ff37/app_dart/lib/src/request_handlers/github/webhook_subscription.dart#L35

@cyanglaz cyanglaz force-pushed the app_extension_macos branch from cdbff59 to 02fb42e Compare April 9, 2023 05:53
@flutter-dashboard
Copy link

Golden file changes have been found for this pull request. Click here to view and triage (e.g. because this is an intentional change).

If you are still iterating on this change and are not ready to resolve the images on the Flutter Gold dashboard, consider marking this PR as a draft pull request above. You will still be able to view image results on the dashboard, commenting will be silenced, and the check will not try to resolve itself until marked ready for review.

Changes reported for pull request #41011 at sha 02fb42e

@cyanglaz cyanglaz force-pushed the app_extension_macos branch from 02fb42e to 5644791 Compare April 9, 2023 20:11
Copy link
Member

@jmagman jmagman left a comment

Choose a reason for hiding this comment

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

LGTM, glad the macOS side Just Worked.

ORIGIN: ../../../flutter/shell/platform/darwin/ios/framework/Source/FlutterUIPressProxy.h + ../../../flutter/LICENSE
ORIGIN: ../../../flutter/shell/platform/darwin/ios/framework/Source/FlutterUIPressProxy.mm + ../../../flutter/LICENSE
ORIGIN: ../../../flutter/shell/platform/darwin/ios/framework/Source/FlutterUmbrellaImport.m + ../../../flutter/LICENSE
ORIGIN: ../../../flutter/shell/platform/darwin/ios/framework/Source/tFlutterUmbrellaImportTests.m + ../../../flutter/LICENSE
Copy link
Member

Choose a reason for hiding this comment

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

Stray t in the front.

Suggested change
ORIGIN: ../../../flutter/shell/platform/darwin/ios/framework/Source/tFlutterUmbrellaImportTests.m + ../../../flutter/LICENSE
ORIGIN: ../../../flutter/shell/platform/darwin/ios/framework/Source/FlutterUmbrellaImportTests.m + ../../../flutter/LICENSE

@cyanglaz cyanglaz marked this pull request as draft April 11, 2023 17:24
@cyanglaz cyanglaz marked this pull request as ready for review April 11, 2023 17:24
@cyanglaz
Copy link
Contributor Author

cyanglaz commented Apr 11, 2023

Golden file change is probably the same as: flutter/flutter#124295

Will ignore the message in this PR.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

autosubmit Merge PR when tree becomes green via auto submit App platform-macos will affect goldens

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants