-
Notifications
You must be signed in to change notification settings - Fork 760
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
uv lock
should invalidate lockfile if registries change
#5920
Comments
I'm actually unsure about this. Like if you do:
And then |
Definitely! Seems weird to force everything to use another index URL after an |
The only quirk is that if you don’t specify any index URL, we treat it as PyPI, so the lock would be invalidated if you “stop” passing it on the command-line for any command. |
Actually, I think the type is rich enough that we can avoid enforcing this if no index URLs are provided (i.e., assume the lockfile is fine). It's a little strange because if we fail, we'll then resolve against PyPI. But probably fine in practice. |
## Summary Now, if you resolve against a registry, then swap it out for another, we won't reuse the lockfile. (If you don't provide any registry configuration, then we won't enforce this, so that `uv lock --index-url foo` and `uv lock` is stable.) Closes #5920.
If a lockfile lists a package from a registry that isn't part of the index URLs passed to
uv lock
, we should probably not reuse it.The text was updated successfully, but these errors were encountered: