Thanks to visit codestin.com
Credit goes to github.com

Skip to content

pubspec.lock is ignored when upgrading to flutter 3.7.0 #119091

@Jordan-Nelson

Description

@Jordan-Nelson

Steps to Reproduce

  1. Install flutter 3.3.10
  2. Create a project that has some dependencies which are pinned to a version that is not the latest. For example, if package foo has version 1.0.1 as the latest version, lock on 1.0.0.

pubspec.yaml

dependencies:
  flutter:
    sdk: flutter
  foo: ^1.0.0

pubspec.lock

# Generated by pub
# See https://dart.dev/tools/pub/glossary#lockfile
packages:
  foo:
    dependency: "direct main"
    description:
      name: foo
      url: "https://pub.dartlang.org"
    source: hosted
    version: "1.0.0"
  1. Run flutter pub get and notice that the package version is NOT upgraded since there is a lock file.
  2. Upgrade to flutter 3.7.0
  3. Run flutter pub get and notice that the package version IS upgraded because the lock file was totally regenerated and the old one was ignored.

Expected results:

pubspec.lock should always be honored.

Actual results:

pubspec.lock is ignored when upgrading to flutter 3.7.0

Metadata

Metadata

Assignees

Labels

P1High-priority issues at the top of the work listc: regressionIt was better in the past than it is nowdependency: dartDart team may need to help usfound in release: 3.7Found to occur in 3.7has reproducible stepsThe issue has been confirmed reproducible and is ready to work onr: fixedIssue is closed as already fixed in a newer versiontoolAffects the "flutter" command-line tool. See also t: labels.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions