Repository navigation
flutter master branch shows repeated local changes in pubspec.lock after every upgrade #178777
Copy link
Copy link
Closed
Labels
P2Important issues not at the top of the work listImportant issues not at the top of the work listfound in release: 3.39Found to occur in 3.39Found to occur in 3.39has reproducible stepsThe issue has been confirmed reproducible and is ready to work onThe issue has been confirmed reproducible and is ready to work onteam-toolOwned by Flutter Tool teamOwned by Flutter Tool teamtoolAffects the "flutter" command-line tool. See also t: labels.Affects the "flutter" command-line tool. See also t: labels.triaged-toolTriaged by Flutter Tool teamTriaged by Flutter Tool team
Description
Steps to reproduce
when upgrading my local flutter master checkout with flutter upgrade I repeatedly get the warning that my checkout has local changes that will be overwritten.
I have not modified the flutter SDK. after discarding changes, the upgrade works. however, immediately after the upgrade completes, the same change reappears in pubspec.lock, causing the same warning on the next upgrade.
- clone flutter master
- run
flutter upgrade - note the warning about local changes
- discard changes and run upgrade again
- after upgrade completes, check git status
- pubspec.lock shows modified SDK constraint again
Expected results
pubspec.lock should not appear modified locally after a clean upgrade unless the sdk team actually committed a change.
Actual results
pubspec.lock is modified locally on its own and blocks further upgrades.
- dart: ">=3.9.0 <4.0.0"
+ dart: ">=3.11.0-88.0.dev <4.0.0"
Code sample
Code sample
Not NeededScreenshots or Video
Logs
Logs
tirthpatel@Tirths-MacBook-Pro ~ % flutter_master upgrade
Your flutter checkout has local changes that would be erased by upgrading. If
you want to keep these changes, it is recommended that you stash them via "git
stash" or else commit the changes to a local branch. If it is okay to remove
local changes, then re-run this command with "--force".Flutter Doctor output
Doctor output
[tirthpatel@Tirths-MacBook-Pro ~ % flutter_master doctor -v
[!] Flutter (Channel master, 3.39.0-1.0.pre-195, on macOS 26.2 25C5037j darwin-arm64, locale en-IN) [914ms]
• Flutter version 3.39.0-1.0.pre-195 on channel master at /Users/tirthpatel/Development/flutter_master/flutter
! The flutter binary is not on your path. Consider adding /Users/tirthpatel/Development/flutter_master/flutter/bin to your path.
! The dart binary is not on your path. Consider adding /Users/tirthpatel/Development/flutter_master/flutter/bin to your path.
• Upstream repository https://github.com/flutter/flutter.git
• Framework revision be3e9af464 (2 hours ago), 2025-11-18 22:59:09 -0500
• Engine revision be3e9af464
• Dart version 3.11.0 (build 3.11.0-149.0.dev)
• DevTools version 2.52.0
• Feature flags: enable-web, enable-linux-desktop, enable-macos-desktop, enable-windows-desktop, enable-android, enable-ios, enable-custom-devices, cli-animations, enable-native-assets,
enable-swift-package-manager, omit-legacy-version-file, enable-lldb-debugging, enable-uiscene-migration
• If those were intentional, you can disregard the above warnings; however it is recommended to use "git" directly to perform update checks and upgrades.
[✓] Android toolchain - develop for Android devices (Android SDK version 36.0.0) [819ms]
• Android SDK at /Users/tirthpatel/Library/Android/sdk
• Emulator version 36.2.12.0 (build_id 14214601) (CL:N/A)
• Platform android-36, build-tools 36.0.0
• Java binary at: /Applications/Android Studio.app/Contents/jbr/Contents/Home/bin/java
This is the JDK bundled with the latest Android Studio installation on this machine.
To manually set the JDK path, use: `flutter config --jdk-dir="path/to/jdk"`.
• Java version OpenJDK Runtime Environment (build 21.0.8+-14196175-b1038.72)
• All Android licenses accepted.
[✓] Xcode - develop for iOS and macOS (Xcode 26.1.1) [440ms]
• Xcode at /Applications/Xcode.app/Contents/Developer
• Build 17B100
• CocoaPods version 1.16.2
[✓] Chrome - develop for the web [6ms]
• Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome
[✓] Connected device (2 available) [5.7s]
• macOS (desktop) • macos • darwin-arm64 • macOS 26.2 25C5037j darwin-arm64
• Chrome (web) • chrome • web-javascript • Google Chrome 142.0.7444.176
[✓] Network resources [1,014ms]
• All expected network resources are available.
! Doctor found issues in 1 category.Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
P2Important issues not at the top of the work listImportant issues not at the top of the work listfound in release: 3.39Found to occur in 3.39Found to occur in 3.39has reproducible stepsThe issue has been confirmed reproducible and is ready to work onThe issue has been confirmed reproducible and is ready to work onteam-toolOwned by Flutter Tool teamOwned by Flutter Tool teamtoolAffects the "flutter" command-line tool. See also t: labels.Affects the "flutter" command-line tool. See also t: labels.triaged-toolTriaged by Flutter Tool teamTriaged by Flutter Tool team

Activity
corepuncher commentedon Mar 3, 2026
I get same repeated messages using stable 3.41.2 as well, so have been using --force every time.
[Tool] Ignore pubspec.lock dirty checkout modifications on non-stable…
[Tool] Ignore pubspec.lock dirty checkout modifications on non-stable…
[Tool] Ignore pubspec.lock dirty checkout modifications on non-stable…
github-actions commentedon May 12, 2026
This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of
flutter doctor -vand a minimal reproduction of the issue.