Skip to content

pub get updates pubspec.lock timestamp without package_config.json resulting in prompts to run pub get #4588

Closed
@DanTup

Description

@DanTup

I have some test failures in Dart-Code that are caused by unexpected prompts to run "pub get" when open test projects.

One of the tests we use to determine whether to prompt for running "dart pub get" is whether the pubspec.lock file is newer than the .dart_tool/package_config.json (this was noted here).

However there are cases where running dart pub get seems to touch the pubspec.lock file without touching the package_config.json which results in us showing this prompt on every load. For example:

Image

PS D:\Dev\Dart-Code\Dart-Code\src\test\test_projects\hello_world\example> dart --version
Dart SDK version: 3.8.0 (stable) (Wed May 14 09:07:14 2025 -0700) on "windows_x64"

Metadata

Metadata

Assignees

No one assigned

    Labels

    type-bugIncorrect behavior (everything from a crash to more subtle misbehavior)

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions