You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
uv lock --check --refresh false positive in workspace with [tool.uv.conflicts]Β #18553
`uv lock --check --refresh` reports "lockfile needs to be updated" (exit 1) even when `uv lock --refresh` produces a byte-for-byte identical lockfile. This is a false positive β confirmed by running `git diff uv.lock` immediately after, which shows zero changes.
A workspace with 4 packages each declaring conflicting prod/non-prod extras (`psycopg2` vs `psycopg2-binary`) via `[tool.uv.conflicts]`.
git clone https://github.com/kingjin94/workspace-conflicts
cd workspace-conflicts
git checkout repro/uv-check-refresh-false-positive
bash repro-check-refresh.sh
Full output:
=== Step 1: uv lock --refresh (writes result) ===
Resolved 7 packages in 170ms
Exit code: 0
=== Step 2: git diff uv.lock (should be empty) ===
No changes β lockfile is up to date
=== Step 3: uv lock --check --refresh (should also pass, but fails) ===
Resolved 7 packages in 151ms
The lockfile at `uv.lock` needs to be updated, but `--check` was provided. To update the lockfile, run `uv lock`.
Exit code: 1
Steps 1 and 2 prove the lockfile is genuinely current. Step 3 is a false positive.
Notes
The workspace uses `[tool.uv.conflicts]` to declare prod/non-prod extras as incompatible. This generates conflict fork markers in the lockfile. The `--check` validation pass appears to apply different marker normalization than the write pass, causing a structural mismatch even when the lockfile content is semantically identical.
This is a distinct surviving variant after the fixes in:
Activity
readme: link filed upstream issue astral-sh/uv#18553
Fix `uv lock --check --refresh` false positive with conflict extras
Normalize persisted fork markers before lock equality checks (#18612)