[ Tool ] Ensure flutter.version.json is regenerated on upgrade#180857
Merged
auto-submit[bot] merged 2 commits intoJan 14, 2026
Conversation
The tool performs various checks to determine whether or not to regenerate version information as part of a `flutter upgrade` instead of just regenerating `flutter.version.json` as part of each `flutter upgrade`. This has lead to some situations where the actual framework version doesn't match that reported by the `flutter.version.json`. This change updates `flutter upgrade` to always regenerate `flutter.version.json` after checking out the new version of the framework to ensure that it contains the latest version information. Fixes flutter#178926
Contributor
There was a problem hiding this comment.
Code Review
This pull request addresses an issue where flutter.version.json was not consistently regenerated during a flutter upgrade, potentially causing version mismatches. The change ensures the version file is always updated after checking out a new framework version by introducing and calling a new updateVersionFile method. The implementation includes a clean refactoring in _FlutterVersionGit and adds a new test to verify the fix. The changes are logical and well-implemented. My feedback is focused on adding documentation for new public members to align with the repository's style guide.
patrickBillingsley
pushed a commit
to patrickBillingsley/flutter
that referenced
this pull request
Jan 14, 2026
…tter#180857) The tool performs various checks to determine whether or not to regenerate version information as part of a `flutter upgrade` instead of just regenerating `flutter.version.json` as part of each `flutter upgrade`. This has lead to some situations where the actual framework version doesn't match that reported by the `flutter.version.json`. This change updates `flutter upgrade` to always regenerate `flutter.version.json` after checking out the new version of the framework to ensure that it contains the latest version information. Fixes flutter#178926
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/packages
that referenced
this pull request
Jan 15, 2026
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/packages
that referenced
this pull request
Jan 15, 2026
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/packages
that referenced
this pull request
Jan 15, 2026
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/packages
that referenced
this pull request
Jan 15, 2026
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/packages
that referenced
this pull request
Jan 15, 2026
ikramhasan
pushed a commit
to ikramhasan/flutter
that referenced
this pull request
Jan 15, 2026
…tter#180857) The tool performs various checks to determine whether or not to regenerate version information as part of a `flutter upgrade` instead of just regenerating `flutter.version.json` as part of each `flutter upgrade`. This has lead to some situations where the actual framework version doesn't match that reported by the `flutter.version.json`. This change updates `flutter upgrade` to always regenerate `flutter.version.json` after checking out the new version of the framework to ensure that it contains the latest version information. Fixes flutter#178926
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/packages
that referenced
this pull request
Jan 16, 2026
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/packages
that referenced
this pull request
Jan 16, 2026
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/packages
that referenced
this pull request
Jan 16, 2026
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/packages
that referenced
this pull request
Jan 16, 2026
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/packages
that referenced
this pull request
Jan 16, 2026
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/packages
that referenced
this pull request
Jan 16, 2026
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/packages
that referenced
this pull request
Jan 16, 2026
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/packages
that referenced
this pull request
Jan 17, 2026
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/packages
that referenced
this pull request
Jan 17, 2026
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/packages
that referenced
this pull request
Jan 17, 2026
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/packages
that referenced
this pull request
Jan 18, 2026
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/packages
that referenced
this pull request
Jan 18, 2026
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/packages
that referenced
this pull request
Jan 19, 2026
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/packages
that referenced
this pull request
Jan 19, 2026
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/packages
that referenced
this pull request
Jan 19, 2026
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/packages
that referenced
this pull request
Jan 20, 2026
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/packages
that referenced
this pull request
Jan 20, 2026
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/packages
that referenced
this pull request
Jan 20, 2026
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/packages
that referenced
this pull request
Jan 20, 2026
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/packages
that referenced
this pull request
Jan 20, 2026
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/packages
that referenced
this pull request
Jan 21, 2026
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/packages
that referenced
this pull request
Jan 21, 2026
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/packages
that referenced
this pull request
Jan 21, 2026
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/packages
that referenced
this pull request
Jan 22, 2026
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/packages
that referenced
this pull request
Jan 22, 2026
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/packages
that referenced
this pull request
Jan 22, 2026
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/packages
that referenced
this pull request
Jan 23, 2026
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.
The tool performs various checks to determine whether or not to regenerate version information as part of a
flutter upgradeinstead of just regeneratingflutter.version.jsonas part of eachflutter upgrade. This has lead to some situations where the actual framework version doesn't match that reported by theflutter.version.json.This change updates
flutter upgradeto always regenerateflutter.version.jsonafter checking out the new version of the framework to ensure that it contains the latest version information.Fixes #178926