Repository navigation
Always run Flutter initialization (using flutter --help) to ensure it's up-to-date - #5982
Merged
Merged
Conversation
…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 #5971
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## master #5982 +/- ##
==========================================
+ Coverage 67.52% 67.55% +0.02%
==========================================
Files 169 170 +1
Lines 12962 12977 +15
Branches 2565 2565
==========================================
+ Hits 8752 8766 +14
Misses 3751 3751
- Partials 459 460 +1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
DanTup
marked this pull request as ready for review
March 12, 2026 12:53
Member
Author
|
@codex review /gemini review |
DanTup
force-pushed
the
always-initialize-flutter
branch
from
March 12, 2026 15:35
e4989ed to
d9e00c1
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
If the local Flutter SDK has recently been upgraded, the Dart SDK on-disk might be out of date and the first invocation of
fluttermay 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
fluttercommand (flutter --helpbecause it's faster than--versionwhich 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 #5971