Skip to content

Infinite loop when adding a lib used by a dependency from git #7760

Description

@PakitoSec

Hi,

  • Poetry version: 1.4.1
  • Python version: 3.10.4
  • OS version and name: macOS 13.2.1

Issue

Infinite loop when I try to add LibUtil to MainPackage:

  • MainPackage depends on LibA (Lib A is already added via poetry). LibA depends on LibUtil.
  • I want to add LibUtil as a direct dependency of MainPackage.
  • I get an infinite loop with conflict while adding LibUtil to MainPackage.

Command:

poetry -vvv add git+https://github.com/XXX/LibUtil#master

Output:

   1: conflict: LibA (1.2) depends on LibUtil (0.3.0)
   1: ! LibA (1.2) @ git+https://github.com/XXX/LibA@master is partially satisfied by not LibA (1.2) @ git+https://github.com/XXX/LibA@master
   1: ! which is caused by "LibA (1.2) @ git+https://github.com/XXX/LibA@master depends on LibUtil (0.3.0) @ git+https://github.com/XXX/LibUtil@master"
   1: ! thus: LibA (1.2) @ git+https://github.com/XXX/LibA@master requires LibUtil (0.3.0) @ git+https://github.com/XXX/LibUtil@master
   1: ! LibA (1.2) @ git+https://github.com/XXX/LibA@master is partially satisfied by not LibA (1.2) @ git+https://github.com/XXX/LibA@master
   1: ! which is caused by "LibA (1.2) @ git+https://github.com/XXX/LibA@master depends on LibUtil (0.3.0) @ git+https://github.com/XXX/LibUtil@master"
   1: ! thus: LibA (1.2) @ git+https://github.com/XXX/LibA@master requires LibUtil (0.3.0) @ git+https://github.com/XXX/LibUtil@master
   1: ! LibA (1.2) @ git+https://github.com/XXX/LibA@master is partially satisfied by not LibA (1.2) @ git+https://github.com/XXX/LibA@master
   1: ! which is caused by "LibA (1.2) @ git+https://github.com/XXX/LibA@master depends on LibUtil (0.3.0) @ git+https://github.com/XXX/LibUtil@master"
   1: ! thus: LibA (1.2) @ git+https://github.com/XXX/LibA@master requires LibUtil (0.3.0) @ git+https://github.com/XXX/LibUtil@master
....

How can i solve this problem please ?

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind/bugSomething isn't working as expectedstatus/duplicateDuplicate issues

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions