Skip to content

fix(lock): warning suggests non-existent --no-frozen flag (#19290)#19294

Open
ChrisJr404 wants to merge 1 commit intoastral-sh:mainfrom
ChrisJr404:fix/lock-warning-no-frozen-19290
Open

fix(lock): warning suggests non-existent --no-frozen flag (#19290)#19294
ChrisJr404 wants to merge 1 commit intoastral-sh:mainfrom
ChrisJr404:fix/lock-warning-no-frozen-19290

Conversation

@ChrisJr404
Copy link
Copy Markdown

Summary

When uv lock is invoked with UV_FROZEN=1 (env) or frozen set via workspace configuration, the post-success warning suggested using --no-frozen, which does not exist as a CLI flag. Following that hint produces:

$ UV_FROZEN=1 uv lock --no-frozen
error: unexpected argument '--no-frozen' found

  tip: a similar argument exists: '--frozen'

Drop the bad suggestion and recommend --check only, matching the sibling warning emitted when --frozen is passed on the CLI (introduced in #17859).

Old vs new warning

Before:

warning: The lockfile at `uv.lock` was only checked for validity, not whether it is up-to-date, because `UV_FROZEN=1` was provided; use `--no-frozen` or `--check` instead

After:

warning: The lockfile at `uv.lock` was only checked for validity, not whether it is up-to-date, because `UV_FROZEN=1` was provided; use `--check` instead

--check is defined on LockArgs in crates/uv-cli/src/lib.rs (the public, non-hidden flag for "check if the lockfile is up-to-date") and works regardless of whether frozen was set via env, configuration, or the CLI.

Changes

  • crates/uv/src/commands/project/lock.rs: drop --no-frozen from the env/configuration warning text.
  • crates/uv/tests/it/lock.rs: update the lock_frozen_warning snapshot to match.

Test plan

  • cargo build -p uv
  • cargo fmt --check
  • cargo clippy -p uv --all-targets -- -D warnings
  • cargo test -p uv --test it lock::lock_frozen_warning

Closes #19290

When `uv lock` is invoked with `UV_FROZEN=1` or `frozen` set in
workspace configuration, the warning suggested using `--no-frozen`,
which is not a valid CLI flag. Drop the suggestion and recommend
`--check`, matching the existing CLI `--frozen` warning path.

Closes astral-sh#19290
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

uv lock warning suggests non-existent --no-frozen flag

1 participant