Skip to content

Export FlutterSceneDelegate #170169

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

Merged
merged 4 commits into from
Jun 10, 2025

Conversation

gaaclarke
Copy link
Member

This allows people to subclass FlutterSceneDelegate. This is necessary for many workflows like capturing launchoptions.

Pre-launch Checklist

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

@gaaclarke gaaclarke requested a review from a team as a code owner June 6, 2025 18:59
@flutter-dashboard
Copy link

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.

@gaaclarke gaaclarke requested a review from hellohuanlin June 6, 2025 19:00
@github-actions github-actions bot added platform-ios iOS applications specifically engine flutter/engine repository. See also e: labels. team-ios Owned by iOS platform team labels Jun 6, 2025
@flutter-dashboard
Copy link

CI had a failure that stopped further tests from running. We need to investigate to determine the root cause.

SHA at time of execution: 228030a.

Possible causes:

  • Configuration Changes: The .ci.yaml file might have been modified between the creation of this pull request and the start of this test run. This can lead to ci yaml validation errors.
  • Infrastructure Issues: Problems with the CI environment itself (e.g., quota) could have caused the failure.

A blank commit, or merging to head, will be required to resume running CI for this PR.

Error Details:

GitHub Error: You have exceeded a secondary rate limit. Please wait a few minutes before you try again. If you reach out to GitHub Support for help, please include the request ID 816E:3018AC:1CBE11A:39D06EE:684353B2.

Stack trace:

#0      GitHub.handleStatusCode (package:github/src/common/github.dart:486:5)
#1      GitHub.request (package:github/src/common/github.dart:422:7)
<asynchronous suspension>
#2      GitHub.requestJson (package:github/src/common/github.dart:323:22)
<asynchronous suspension>
#3      RetryOptions.retry (package:retry/retry.dart:131:16)
<asynchronous suspension>
#4      LuciBuildService.scheduleTryBuilds (package:cocoon_service/src/service/luci_build_service.dart:245:24)
<asynchronous suspension>
#5      Scheduler._runCiTestingStage (package:cocoon_service/src/service/scheduler.dart:1234:9)
<asynchronous suspension>
#6      Scheduler.proceedToCiTestingStage (package:cocoon_service/src/service/scheduler.dart:1295:7)
<asynchronous suspension>
#7      Scheduler._closeSuccessfulEngineBuildStage (package:cocoon_service/src/service/scheduler.dart:1106:5)
<asynchronous suspension>
#8      Scheduler.processCheckRunCompletion (package:cocoon_service/src/service/scheduler.dart:1039:9)
<asynchronous suspension>
#9      Scheduler.processCheckRun (package:cocoon_service/src/service/scheduler.dart:1379:9)
<asynchronous suspension>
#10     GithubWebhookSubscription.post (package:cocoon_service/src/request_handlers/github/webhook_subscription.dart:115:24)
<asynchronous suspension>
#11     RequestHandler.service (package:cocoon_service/src/request_handling/request_handler.dart:45:20)
<asynchronous suspension>
#12     SubscriptionHandler.service (package:cocoon_service/src/request_handling/subscription_handler.dart:140:5)
<asynchronous suspension>
#13     createServer.<anonymous closure> (package:cocoon_service/server.dart:328:7)
<asynchronous suspension>

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.

Could you add a test that uses this and maybe checks the window isn't null?

Rough example, here's a macOS one that grabs the app delegate

NSMenu *applicationMenu = ((FlutterAppDelegate *)NSApplication.sharedApplication.delegate).applicationMenu;
XCTAssertEqual(applicationMenu.numberOfItems, 11);
XCTAssertEqualObjects([applicationMenu itemAtIndex:0].title, @"About Flutter Gallery");

Could put it here, even though it's not a platform view test:

@gaaclarke
Copy link
Member Author

Just subclassing FlutterSceneDelegate in a flutter level test should assert that the symbol is public (it would fail to link when this is wrong). I'm not sure where to put it though. I don't want to put it in the examples directory since creating one isn't an example we want to provide (yet?).

@gaaclarke
Copy link
Member Author

Could you add a test

Done, added it to the release_smoke_test.

@gaaclarke gaaclarke added the autosubmit Merge PR when tree becomes green via auto submit App label Jun 6, 2025
Copy link
Contributor

auto-submit bot commented Jun 6, 2025

autosubmit label was removed for flutter/flutter/170169, because - The status or check suite Mac web_tool_tests has failed. Please fix the issues identified (or deflake) before re-applying this label.

@auto-submit auto-submit bot removed the autosubmit Merge PR when tree becomes green via auto submit App label Jun 6, 2025
@gaaclarke gaaclarke added the autosubmit Merge PR when tree becomes green via auto submit App label Jun 8, 2025
@auto-submit auto-submit bot removed the autosubmit Merge PR when tree becomes green via auto submit App label Jun 8, 2025
Copy link
Contributor

auto-submit bot commented Jun 8, 2025

autosubmit label was removed for flutter/flutter/170169, because - The status or check suite Windows web_tool_tests_1_2 has failed. Please fix the issues identified (or deflake) before re-applying this label.

@gaaclarke
Copy link
Member Author

rebasing to hopefully remove web_tool_tests although I can't get turning them to bringup landed

@gaaclarke
Copy link
Member Author

merging master, still running into #170264

@gaaclarke gaaclarke force-pushed the exportflutterscenedelegate branch from b272e30 to e70289f Compare June 9, 2025 23:29
@gaaclarke
Copy link
Member Author

I've rebased this PR on what I estimate is the last good commit before a dart roll.

@gaaclarke gaaclarke added the autosubmit Merge PR when tree becomes green via auto submit App label Jun 10, 2025
@gaaclarke
Copy link
Member Author

As i expected, rebasing to before 2eec076 allowed this to pass CI.

@gaaclarke gaaclarke added this pull request to the merge queue Jun 10, 2025
Merged via the queue into flutter:master with commit 85867b0 Jun 10, 2025
182 checks passed
@gaaclarke gaaclarke deleted the exportflutterscenedelegate branch June 10, 2025 01:29
@flutter-dashboard flutter-dashboard bot removed the autosubmit Merge PR when tree becomes green via auto submit App label Jun 10, 2025
Hamza-Bashir4586 added a commit to Hamza-Bashir4586/flutter that referenced this pull request Jun 10, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Jun 12, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
engine flutter/engine repository. See also e: labels. platform-ios iOS applications specifically team-ios Owned by iOS platform team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants