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
When running a command through uv run, sometimes the uv.lock file gets changed. This is a bit annoying when the uv.lock file is in a git repository, as it introduces unrelated changes to the lock file to merge requests or commits (or you have to undo the change or explicitly not commit it...).
I know about the --frozen argument, which helps (although it might do with a shortcut argument).
However doesn't it make more sense for uv run not to modify any files unless explicitly allowed, instead of the other way around? For example to instruct uv to change dependencies in the lockfile, you need to explicitly tell uv to do so. But uv run just changes files as a side-effect of whatever command you actually want to run.
The changes done by uv run also always seem quite insignificant, and do not seem to change how the lockfile seems to be interpreted.
As an example, when I run uv run in my ansible playbooks repository it now changes the uv.lock file with the following diff:
When running a command through
uv run
, sometimes theuv.lock
file gets changed. This is a bit annoying when theuv.lock
file is in a git repository, as it introduces unrelated changes to the lock file to merge requests or commits (or you have to undo the change or explicitly not commit it...).I know about the
--frozen
argument, which helps (although it might do with a shortcut argument).However doesn't it make more sense for
uv run
not to modify any files unless explicitly allowed, instead of the other way around? For example to instructuv
to change dependencies in the lockfile, you need to explicitly telluv
to do so. Butuv run
just changes files as a side-effect of whatever command you actually want to run.The changes done by
uv run
also always seem quite insignificant, and do not seem to change how the lockfile seems to be interpreted.As an example, when I run
uv run
in my ansible playbooks repository it now changes theuv.lock
file with the following diff:So now every time I run a playbook, the
uv.lock
changes and my repository is dirty.The text was updated successfully, but these errors were encountered: