Conversation
There was a problem hiding this comment.
Code Review
This pull request addresses a silent failure when opening Flutter projects without a .idea directory in IntelliJ IDEA by removing the FlutterProjectOpenProcessor and migrating the configuration logic to FlutterInitializer. Feedback focuses on optimizing the new initialization logic, specifically by merging redundant module loops to avoid duplicate SDK enablement and addressing performance concerns related to nested asynchronous tasks and frequent UI/IO updates during module configuration.
|
@gemini-code-assist review again? |
There was a problem hiding this comment.
Code Review
This pull request migrates Flutter project configuration logic from FlutterProjectOpenProcessor to FlutterInitializer to prevent silent failures when opening projects without a .idea directory. The changes include refactoring FlutterModuleUtils to support module configuration without a full project reload and introducing a mechanism to identify and fix unconfigured Flutter modules during startup. Review feedback highlights critical threading violations where heavy I/O operations, specifically project.save() and SDK path lookups, are performed on the Event Dispatch Thread (EDT), which could lead to UI freezes.
Fixes #8845.
Follows up on #8846 which I reverted before the last release because it was causing new projects to prompt the user to open twice (at least in my environment). The change I made since then is to not reload after setting up the modules.
The risk of not reloading is that there could be things that don't recognize the new module identity e.g., tool windows or DAS may not start properly. I checked that those two things aren't an issue, so I feel like this is reasonable and better than being prompted twice to open a new project.