Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature request] Explicit dry-run cli option #6408

Closed
birdhackor opened this issue Aug 22, 2024 · 3 comments
Closed

[Feature request] Explicit dry-run cli option #6408

birdhackor opened this issue Aug 22, 2024 · 3 comments
Labels
enhancement New feature or improvement to existing functionality projects Related to project management capabilities

Comments

@birdhackor
Copy link

birdhackor commented Aug 22, 2024

If I want to know which packages versions will change when I do a upgradable relock, I might want to do the following command

$ uv lock -U --dry-run

Currently, there seems to be no direct instruction to achieve a similar effect. The following command will report an error and cannot achieve the effect I want.

$ uv lock -U --locked
Resolved 10 packages in 126ms
error: The lockfile at `uv.lock` needs to be updated, but `--locked` was provided. To update the lockfile, run `uv lock`.
@charliermarsh charliermarsh added the enhancement New feature or improvement to existing functionality label Aug 22, 2024
@charliermarsh
Copy link
Member

This makes sense to me.

@zanieb
Copy link
Member

zanieb commented Aug 22, 2024

Makes sense. There's also uv lock -U && git diff && git reset --hard, but we can do better.

@zanieb zanieb added the projects Related to project management capabilities label Aug 22, 2024
charliermarsh added a commit that referenced this issue Oct 24, 2024
This PR adds support for `uv lock --dry-run`, as described in issue
#6408.

One thing to note: this functionality, as implemented, isn't limited to
`-U` (if someone adds a dependency to the project's `pyproject.toml`,
the plan will include these changes).

---------

Co-authored-by: Charlie Marsh <[email protected]>
@charliermarsh
Copy link
Member

Closed by #7783.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or improvement to existing functionality projects Related to project management capabilities
Projects
None yet
Development

No branches or pull requests

3 participants