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 pip compile fails with conflicting urls (sha vs tag) across dependencies #2614

Closed
fraenkel opened this issue Mar 22, 2024 · 2 comments · Fixed by #2769
Closed

uv pip compile fails with conflicting urls (sha vs tag) across dependencies #2614

fraenkel opened this issue Mar 22, 2024 · 2 comments · Fixed by #2769
Assignees
Labels
bug Something isn't working

Comments

@fraenkel
Copy link

I am issuing the following pipenv requirements | uv pip compile --generate-hashes -o requirements.txt - which fails with:

error: There are conflicting URLs for package `common`:
- git+ssh://git@github.com/cerebrotech/platform-python-common.git@565787e8abc8a81b18ea49770f98df09453987e6
- git+ssh://git@github.com/cerebrotech/platform-python-common.git@v3.0.1

git shows the following for the v3.0.1 tag:
commit 565787e8abc8a81b18ea49770f98df09453987e6 (HEAD -> develop, tag: v3.0.1, origin/develop, origin/HEAD)

The current package has the following in its requirements.txt
common@ git+ssh://git@github.com/cerebrotech/platform-python-common.git@565787e8abc8a81b18ea49770f98df09453987e6

However there is a dependency on another package platform-python-catalog which has in its pyproject.toml,
"common @ git+ssh://git@github.com/cerebrotech/platform-python-common.git@v3.0.1"

According to the debug, the failure occurs when resolving
DEBUG Searching for a compatible version of catalog @ git+ssh://git@github.com/cerebrotech/platform-python-catalog.git@11866ba07919d174c77b8a161c0f10b0073003c8 (*)

@zanieb
Copy link
Member

zanieb commented Mar 22, 2024

Related #1903 / #2285

@zanieb zanieb added the bug Something isn't working label Mar 22, 2024
@charliermarsh
Copy link
Member

The common way to support this is to add git+ssh://git@github.com/cerebrotech/platform-python-common.git@v3.0.1 as a constraint. (I'm not certain whether we'll support it in general without the constraint.)

@charliermarsh charliermarsh self-assigned this Apr 2, 2024
charliermarsh added a commit that referenced this issue Apr 2, 2024
## Summary

This PR leverages our lookahead direct URL resolution to significantly
improve the range of Git URLs that we can accept (e.g., if a user
provides the same requirement, once as a direct dependency, and once as
a tag). We did some of this in #2285, but the solution here is more
general and works for arbitrary transitive URLs.

Closes #2614.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants