Skip to content

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

Closed

Description

@pdecat

Summary

When UV_FROZEN=1 is set (or frozen is set in workspace configuration), running uv lock emits a hint that doesn't work:

UV_FROZEN=1 uv lock
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
UV_FROZEN=1 uv lock --no-frozen
error: unexpected argument '--no-frozen' found

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

Usage: uv lock --check-exists

For more information, try '--help'.

That hint comes from https://github.com/astral-sh/uv/blob/0.11.9/crates/uv/src/commands/project/lock.rs#L233

Platform

Linux 7.0.0-14-generic x86_64

Version

uv 0.11.8 (x86_64-unknown-linux-musl)

Python version

Python 3.14.4

Activity

  1. nooscraft commented on May 5, 2026

    @nooscraft
    Contributor

    Yes, the suggestion is wrong. uv lock doesn't have a --no-frozen flag (unlike uv sync / uv run); on uv lock, --frozen is just an alias for --check-exists. Looks like the env/config branch of the warning in lock.rs was modelled on the other subcommands' flag inventory. Introduced in #17859.

    The ideal fix would be to drop --no-frozen from that message so it matches the --frozen CLI branch right above (use --check instead). While I was looking, the Configuration half of that branch isn't actually reachable today. There's no tool.uv.frozen field in GlobalOptions, and Flag::from_config("frozen") is never constructed anywhere in the tree (only offline is). The warning only ever fires on the UV_FROZEN path in practice; the workspace-config wording is plumbing without a source.

  2. added a commit that references this issue on May 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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