`poetry install` hangs when duplicate http git dependencies use both rev and tag
dustinlagoy opened this issue · comments
-
Poetry version: 1.3.2
-
Python version: 3.10.6
-
OS version and name: Ubuntu 22.04
-
pyproject.toml: see below
-
I am on the latest stable Poetry version, installed using a recommended method.
-
I have searched the issues of this repo and believe that this is not a duplicate.
-
I have consulted the FAQ and blog for any relevant entries or release notes.
-
If an exception occurs when executing a command, I executed it again in debug mode (
-vvv
option) and have included the output below.
Issue
I ran into an error trying to run poetry install
in an internal project. The issue seems to be related to a common dependency between a project and one of it's dependencies. For example if I have:
project_a
:
[tool.poetry.dependencies]
project_b = {git = "https://.../project_b", tag = "1.0"}
project_c = {git = "https://.../project_c", tag = "1.0"}
project_c
(at 1.0):
[tool.poetry.dependencies]
project_b = {git = "https://.../project_b", rev = "xyz1234"}
I can run poetry lock
in project_a
without issue but when I then run poetry install -vvv
it hangs with:
Unable to fetch from private repository 'https://.../project_c', falling back to system git
Cloning 'https://.../project_c' using system git client
However, if I then change the dependencies to:
project_a
:
[tool.poetry.dependencies]
project_b = {git = "https://.../project_b", tag = "1.0"}
project_c = {git = "https://.../project_c", tag = "1.1"}
project_c
(at 1.1):
[tool.poetry.dependencies]
project_b = {git = "https://.../project_b", tag = "1.0"}
lock and install work without issue. Note project_c
was bumped to 1.1 when changing this dependency but my guess is that the issue was resolved by using tags for project_b
in both places.
Also, in project_b
the tag 1.0 and rev xyz1234 point to the same commit.
I am happy to add more info if helpful, but maybe the solution is as simple as "don't mix tag and rev git dependencies". Also, this is basically solved already for me by just using tags everywhere but I thought it might be useful to document the issue :)
I think my issue is the same: https://github.com/y-yu/poetry-conflict-test (Proof of example) 🤔
The following 👇 dependencies setting causes poetry install
fails 😇
[tool.poetry.dependencies]
quri-parts-qulacs = { git = "https://github.com/QunaSys/quri-parts.git", rev = "3b05ea12dede01b9bea70b0fbecb246ca3167639", subdirectory = "packages/qulacs" }
quri-parts-qiskit = { git = "https://github.com/QunaSys/quri-parts.git", rev = "3b05ea12dede01b9bea70b0fbecb246ca3167639", subdirectory = "packages/qiskit" }