Comparing Peter080202:master...Dart-Code:master · Peter080202/Dart-Code
Commits on Mar 12, 2026
-
Always run Flutter initialization (using
flutter --help) to ensure ……it's up-to-date If the local Flutter SDK has recently been upgraded, the Dart SDK on-disk might be out of date and the first invocation of `flutter` may kick off a download to fix this. Before this change, if there was a Dart SDK at all, we assumed it was all initialized correctly and proceeded to start up and spawn the analysis server, but this could then crash if Flutter started replacing the Dart SDK at the same time. With this change, we will _always_ run a `flutter` command (`flutter --help` because it's faster than `--version` which seems to do some other work) before proceeding. In the case where things are good, this may add ~1s to the startup, but this is better than the random failures. The "Flutter is initializing.." notification is now shown only if the process is still going after 5s, to avoid it showing quickly for everyone in the case of things working normally. Fixes Dart-Code#5971
-
Read package:test version from .dart_tool/package_graph.json instead …
…of running `dart test --version` We currently spawn `dart run test:test --version` for each package in the workspace to get the test capabilities during test discovery (to know if we can add profiles like Coverage to a given suite). This can be expensive (in terms of CPU and RAM) if the project is large. For example opening the Dart SDK root on my machine and then clicking the Test Explorer icon results in all RAM being consumed. We already filter out packages in the same Pub Workspace, but there are lots of non-Workspace packages in there. With this change, we just read the version from the `.dart_tool/package_graph.json` file instead which is significantly faster and uses little resources. This also resulted in quite a bit of async code becoming sync. Fixes Dart-Code#5936