Skip to content

uv lock should work even if UV_FROZEN is set #12783

@jacob-bush-shopify

Description

@jacob-bush-shopify

Summary

Currently, if UV_FROZEN=true is set in your environment uv lock succeeds and prints no output.

I would expect one of:

  • uv lock to update the uv.lock file because that is what the command does.
  • uv lock to print a warning that UV_FROZEN=true so that I know why it did not update the uv.lock file.

Example

If UV_FROZEN=true the command succeeds and prints no output:

❯ uv lock
❯ echo $?
0

This can be worked around by explicitly disabling the environment variable

❯ UV_FROZEN=false uv lock
Resolved 259 packages in 2.26s
warning: The package `typer==0.15.2` does not have an extra named `all`
warning: `aiohttp==3.11.14` is yanked (reason: "Regression: https://github.com/aio-libs/aiohttp/issues/10617")
Updated <INTERNAL_PACKAGE> v3.4.0 -> v3.5.0rc2

I would prefer uv lock to ignore the UV_FROZEN configuration because I am explicitly updating the lock file (rather than uv sync or uv run which implicitly update the lock file).

If this is not possible I would love a warning instead of no output

❯ uv lock
warning: The `uv.lock` file was not updated because `UV_FROZEN=true`.

I would not necessarily expect or want this warning on uv sync or uv run (though I would leave that decision up to the developers/maintainers).

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or improvement to existing functionality

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions