-
Notifications
You must be signed in to change notification settings - Fork 6k
iOS: Migrate FlutterAppDelegate to ARC #55472
iOS: Migrate FlutterAppDelegate to ARC #55472
Conversation
It looks like this pull request may not have tests. Please make sure to add tests before merging. If you need an exemption, contact "@test-exemption-reviewer" in the #hackers channel in Discord (don't just cc them here, they won't see it!). 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 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. |
fc0825a
to
3cab92d
Compare
test-exempt: No semantic changes. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This imports "FlutterViewController" so that's why it wasn't done yet. We were migrating leaf -> root. That made me refactor some as I was doing the other ARC work, like #52271.
However, I'm not sure if the value of doing that is worth needing to migrate FlutterViewController and FlutterEngine monsters together (they are so snarled I couldn't break the import cycle). wdyt?
I'm tempted to migrate piecewise what we can safely migrate until we whittle it down to nothing. As you say, that lands us at the FlutterEngine/FlutterViewController tangle in the end. Any reason to limit ourselves to taking a leaf to root approach? |
Answering my own question -- I'd likely need to look at the FlutterViewController header to answer that one. Taking a look. Answer: it looks like there's nothing that would be problematic in there at the moment, and I'd expect the compiler to shout if anyone were to add, say, an |
@stuartmorgan I thought there was a design doc for this, but I can't find it. I wasn't able to untangle the dependencies of the remaining MRC files: engine/shell/platform/darwin/ios/BUILD.gn Lines 182 to 194 in f21f2b2
I'm not sure when we're even going to have the bandwidth to migrate all of those in one monster-PR, especially with merge conflicts (I sure gave up). What do you think about merging the rest individually, ignoring the dependency tree, if we commit to actually doing it all ASAP but in separate PRs? Can you think of why that's a really bad idea, vs keeping these last few MRC files around forever? |
When we were still on the old, pre-ARC With the ARC-safe |
Migrates the FlutterAppDelegate.mm translation unit to be compiled with the `-fobjc-arc` compiler flag. Issue: flutter/flutter#137801
Except in the initialiser, where `self` is not yet fully initialised. In this case, it's a simple property so this really makes no real difference, but best practices etc.
30ffe8c
to
5ff70d0
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you!
…155865) flutter/engine@9c8e5cb...f3b11bc 2024-09-28 [email protected] Revert "Reland "[canvaskit] Further improve overlay optimization by splitting pictures"" (flutter/engine#55501) 2024-09-28 [email protected] Migrate `try/finally` calls to `addTearDown`. (flutter/engine#55499) 2024-09-27 [email protected] iOS: Migrate FlutterAppDelegate to ARC (flutter/engine#55472) 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 [email protected],[email protected] 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
…lutter#155865) flutter/engine@9c8e5cb...f3b11bc 2024-09-28 [email protected] Revert "Reland "[canvaskit] Further improve overlay optimization by splitting pictures"" (flutter/engine#55501) 2024-09-28 [email protected] Migrate `try/finally` calls to `addTearDown`. (flutter/engine#55499) 2024-09-27 [email protected] iOS: Migrate FlutterAppDelegate to ARC (flutter/engine#55472) 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 [email protected],[email protected] 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
Migrates the FlutterAppDelegate.mm translation unit to be compiled with the
-fobjc-arc
compiler flag.No test changes since no this change includes no semantic changes, and thus covered by existing tests such as
testReleasesWindowOnDealloc
.Issue: flutter/flutter#137801
Pre-launch Checklist
///
).If you need help, consider asking for advice on the #hackers-new channel on Discord.