-
Notifications
You must be signed in to change notification settings - Fork 668
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 add
adds a depencency even if there is a failure during installation
#6486
Labels
Comments
I think it probably makes sense to remove the dependency here. We already remove the dependency if resolution failed. |
charliermarsh
added
help wanted
Contribution especially encouraged
bug
Something isn't working
labels
Aug 23, 2024
charliermarsh
pushed a commit
that referenced
this issue
Aug 23, 2024
## Summary <!-- What's the purpose of the change? What does it do, and why? --> This is a attempt at fixing #6486. It reverts changes made to `pyproject.toml` when sync fails during `uv add`. This solution felt a little heavy handed and could probably be improved but it is what happens when locking fails during `uv add` so I thought it would be a good start. ## Test Plan <!-- How was it tested? --> I have added a test case for this to `tests/edit.rs`. It uses `pytorch==1.0.2` to achieve the desired failure.
Closed by #6526. Thanks for the contribution. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
When running
uv add
fails to install the package, it is still added to the dependency array ofpyproject.toml
causing future invocations ofuv add
to fail as well.Reproduction Steps
uv add pytorch
in a blank projectException: You tried to install "pytorch". The package named for PyTorch is "torch"
pyproject.toml
added it to the dependencies array despite this failure.uv add torch
as instructed, it will fail in the same way aspytorch
is now in the dependency array.The text was updated successfully, but these errors were encountered: