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

uv add https://.../foo.git throws a confusing error #5858

Closed
charliermarsh opened this issue Aug 7, 2024 · 4 comments · Fixed by #5888
Closed

uv add https://.../foo.git throws a confusing error #5858

charliermarsh opened this issue Aug 7, 2024 · 4 comments · Fixed by #5888
Assignees
Labels
error messages Messaging when something goes wrong help wanted Contribution especially encouraged preview Experimental behavior

Comments

@charliermarsh
Copy link
Member

We interpret it as a direct URL (e.g., a path to a wheel), and then .git doesn't match .whl or .tar.gz etc.

❯ uv add https://github.com/ElmerCSC/elmer_circuitbuilder.git
warning: `uv add` is experimental and may change without warning
Using Python 3.12.4
Creating virtualenv at: .venv
error: Failed to extract archive
  Caused by: Unsupported archive type: elmer_circuitbuilder.git
@charliermarsh charliermarsh added the error messages Messaging when something goes wrong label Aug 7, 2024
@charliermarsh
Copy link
Member Author

Arguably this should "just work"?

@charliermarsh
Copy link
Member Author

(Instead, you need to do, e.g., add git+https://github.com/ElmerCSC/elmer_circuitbuilder.git.)

@zanieb
Copy link
Member

zanieb commented Aug 7, 2024

Yeah the git+ seems overkill to require, let's special case .git.

@charliermarsh charliermarsh added help wanted Contribution especially encouraged preview Experimental behavior labels Aug 7, 2024
@charliermarsh
Copy link
Member Author

(I also want to improve that error message to list the supported extensions, it would be much clearer.)

@charliermarsh charliermarsh self-assigned this Aug 7, 2024
zanieb pushed a commit that referenced this issue Aug 9, 2024
This PR adds a `DistExtension` field to some of our distribution types,
which requires that we validate that the file type is known and
supported when parsing (rather than when attempting to unzip). It
removes a bunch of extension parsing from the code too, in favor of
doing it once upfront.

Closes #5858.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
error messages Messaging when something goes wrong help wanted Contribution especially encouraged preview Experimental behavior
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants