-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[analyzer] multiple copies of plugin launched #48925
Comments
Yes, we should look into fixing this. Right now we use the 'bootstrap package path' to determine uniqueness. This works for the case where you're running multiple versions of a plugin, but fails to take into account that there are two locations for the |
flutter/flutter#53833 has a discussion on issues caused by the Flutter-local pub cache (and there are references to 4 other related issues). |
@ookami-kb Thanks for the great details. Can you hazard a guess about how this happened? One guess I have is that |
@srawlins yes, exactly. It's a monorepo (actually, even a workspace with 2 monorepos) opened in VS Code with |
To over-communicate and recap what @srawlins and @bwilkerson wrote.
|
You can resolve the issue by specifying that you want exactly |
Yeah, that makes sense. Thanks! |
If you have a monorepo with several packages, and these packages use different versions of some analyzer plugin (
dart_code_metrics
in our case), or you have both Flutter and pure Dart packages in this monorepo, you end up with multiple plugin instances running – the CPU and memory consumption goes very high in this case and analyzer performance degrades pretty noticeably.Analysis Server Diagnostics screenshot:
This is understandable since they have different package paths, but probably there's a way to reuse some entities (if it's not already the case) to reduce memory / CPU utilization.
The problem with different plugin versions is solvable (we can and we should unify plugin versions within monorepo anyway), but mixing Dart and Flutter packages is a common case, and having 2 plugin instances running is a pain point.
The text was updated successfully, but these errors were encountered: