Skip to content

uv sync --locked does not detect incorrect uv.lock #12164

@Nugine

Description

@Nugine

Summary

Discovered from a bug of dependabot:
dependabot/dependabot-core#10478 (comment)

To reproduce

  1. select any package in uv.lock
  2. change its version to any valid semver
    • edit the package.version field directly in uv.lock
  3. run uv sync --locked

The installed package is still the previous installed version. It mismatches with what the lock file specified.

There is no warning or error for this case. uv continues sliently.

Platform

Linux 6.8.0-55-generic x86_64 GNU/Linux

Version

uv 0.6.6

Python version

Python 3.13.2

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions