-
Notifications
You must be signed in to change notification settings - Fork 709
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
Add support for --dry-run
mode in uv lock
#7783
Conversation
// If the user specified `--upgrade-package`, then at best we can prefer some of | ||
// the existing versions. | ||
return Ok(Self::Preferable(lock)); | ||
if !dry_run { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we don't do this check, when we use --dry-run
with -U
the caller (do_lock
) will indicate there was an update even if there wasn't one.
I'm not the happiest with this change as it pollutes the do_lock
and validate
APIs. That being said, I'm not sure of a better approach (doesn't make sense to include dry_run as a variant/member of one of the enums/structs passed in imo, they all seem to be used quite widely) — open to suggestions!
54d027e
to
6c71ce1
Compare
--dry-run
mode in uv lock
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'spyproject.toml
, the plan will include these changes).