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

[macOS] Remove FlutterApplication class #40939

Merged
merged 1 commit into from Apr 5, 2023

Conversation

cbracken
Copy link
Member

@cbracken cbracken commented Apr 5, 2023

The need for the FlutterApplication NSApplication subclass was eliminated in 8679b67. The relevant app termination logic was moved into FlutterAppDelegate in that patch. Removing FlutterApplication needs to be done in three stages:

  1. Migrate logic to FlutterAppDelegate. [macOS] Handle termination in FlutterAppDelegate #40929.
  2. Update Flutter tool template. Update migrator to migrate all apps using FlutterApplication back to NSApplication. [macOS] Remigrate principal class to NSApplication flutter#124173.
  3. Eliminate FlutterApplication.h header since all references to it have now been removed. [macOS] Remove FlutterApplication class #40939.

No tests since, as described above, this is the removal of unused (as of step 2 above) code.

Issue: flutter/flutter#30735

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.

The need for the FlutterApplication NSApplication subclass was
eliminated in 8679b67. The relevant app
termination logic was moved into FlutterAppDelegate in that patch.
Removing FlutterApplication needs to be done in three stages:
1. Migrate logic to FlutterAppDelegate (done in above patch)
2. Update Flutter tool template. Update migrator to migrate all apps
   using FlutterApplication back to NSApplication. This is done in
   flutter/flutter#124173.
3. Eliminate FlutterApplication.h header since all references to it have
   now been removed.

Issue: flutter/flutter#30735
@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 #40939 at sha 158598a

Copy link
Contributor

@gspencergoog gspencergoog left a comment

Choose a reason for hiding this comment

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

32384589-a60f0e74-c078-11e7-9bc1-e5b5287aea9d

@cbracken cbracken merged commit 1592b60 into flutter:main Apr 5, 2023
39 of 40 checks passed
@cbracken cbracken deleted the remove-flutter-application branch April 5, 2023 16:07
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Apr 5, 2023
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Apr 5, 2023
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Apr 5, 2023
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Apr 5, 2023
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Apr 5, 2023
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Apr 5, 2023
@cbracken cbracken restored the remove-flutter-application branch April 6, 2023 22:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants