Conversation
…ice away from globals
There was a problem hiding this comment.
Code Review
This pull request refactors multiple iOS-related classes in flutter_tools to replace global state access with explicit dependency injection. Key components, including EmulatorManager, IOSDevice, IOSSimulator, LLDB, and XCDevice, now accept dependencies such as Xcode, Platform, FileSystem, and OperatingSystemUtils directly. The reviewer suggests further improvements to simplify constructors, remove redundant dependencies like XcodeProjectInterpreter, and enhance test hermeticity by making certain parameters required rather than relying on fallback logic.
|
This pull request has been changed to a draft. The currently pending flutter-gold status will not be able to resolve until a new commit is pushed or the change is marked ready for review again. For more guidance, visit Writing a golden file test for Reviewers: Read the Tree Hygiene page and make sure this patch meets those guidelines before LGTMing. |
…imulators, emulators, and LLDB
There was a problem hiding this comment.
Code Review
This pull request refactors several iOS-related classes and tools in the Flutter tool codebase to replace global variable usages with constructor-injected dependencies, enhancing testability. The review feedback highlights several opportunities to improve this dependency injection, such as storing and passing the injected ProcessManager in IOSSimulatorUtils, using the non-nullable _shutdownHooks instance field instead of the nullable parameter in IOSDevice, making the Logger parameter required in IOSEmulators and IOSEmulator, and removing an invalid const constructor from IOSEmulator.
…ed in iOS device/emulator classes
Migrates iOS devices, simulators, emulators, CoreDeviceControl, XcodeDebug, and XCDevice away from globals.dart to explicit dependency injection.
Part of #188471
Pre-launch Checklist
///).