Skip to content

Reland "[flutter_tools] Remove globals from macOS build, migration, and Xcode project" - #195552

Merged
auto-submit[bot] merged 3 commits into
flutter:masterfrom
bkonyi:di/28d-macos-build-and-xcode-project-reland
Oct 29, 2026
Merged

auto-submit[bot] merged 3 commits into
flutter:masterfrom
bkonyi:di/28d-macos-build-and-xcode-project-reland

Conversation

@bkonyi

@bkonyi bkonyi commented Oct 29, 2026

Copy link
Copy Markdown
Contributor

Relands #193652, which was reverted in #195535 due to a semantic merge conflict with #194052: runMacOSPodInstall in build_macos.dart referenced globals.cocoaPods and globals.templateRenderer after the globals.dart import was removed.

This reland fixes the conflict by passing the injected cocoaPods and threading required TemplateRenderer templateRenderer into buildMacOS, BuildMacosCommand, MacOSDevice, MacOSDevices, and FlutterDeviceManager.

Part of #47161

Pre-launch Checklist

@bkonyi bkonyi added the CICD Run CI/CD label Oct 29, 2026
@github-actions github-actions Bot added platform-ios iOS applications specifically tool Affects the "flutter" command-line tool. See also t: labels. platform-macos Building on or for macOS specifically a: desktop Running on desktop team-ios Owned by iOS platform team team-macos Owned by the macOS platform team labels Oct 29, 2026
@bkonyi
bkonyi marked this pull request as ready for review October 29, 2026 02:20
@bkonyi
bkonyi requested review from a team as code owners October 29, 2026 02:20

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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.

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

Labels

a: desktop Running on desktop CICD Run CI/CD platform-ios iOS applications specifically platform-macos Building on or for macOS specifically team-ios Owned by iOS platform team team-macos Owned by the macOS platform team tool Affects the "flutter" command-line tool. See also t: labels.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants