Repository navigation
Reland "[flutter_tools] Remove globals from macOS build, migration, and Xcode project" - #195552
Merged
auto-submit[bot] merged 3 commits intoOct 29, 2026
Conversation
bkonyi
marked this pull request as ready for review
October 29, 2026 02:20
Contributor
There was a problem hiding this comment.
Code Review
This pull request refactors dependency injection across the macOS and iOS build commands and project structures in flutter_tools by removing direct usage of global variables in favor of passing dependencies explicitly, such as AppleContext, TemplateRenderer, FeatureFlags, and PlistParser, through constructors and method parameters. The review feedback identifies a potential runtime exception in build_macos.dart where the nullable cocoaPods property is destructured as non-nullable, and suggests updating the pattern to allow nullability.
chingjun
approved these changes
Oct 29, 2026
This was referenced Oct 29, 2026
9 of 11 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Relands #193652, which was reverted in #195535 due to a semantic merge conflict with #194052:
runMacOSPodInstallinbuild_macos.dartreferencedglobals.cocoaPodsandglobals.templateRendererafter theglobals.dartimport was removed.This reland fixes the conflict by passing the injected
cocoaPodsand threadingrequired TemplateRenderer templateRendererintobuildMacOS,BuildMacosCommand,MacOSDevice,MacOSDevices, andFlutterDeviceManager.Part of #47161
Pre-launch Checklist
///).