Skip to content

pio pkg uninstall and pio pkg list fail when there are circular dependencies in library.json manifests #4475

Closed
@dm9de

Description

@dm9de

What kind of issue is this?

  • Question.
    This issue tracker is not the place for questions. If you want to ask how to do something,
    or to understand why something isn't working the way you expect it to,
    use Community Forums or Premium Support

  • PlatformIO IDE.
    All issues related to PlatformIO IDE should be reported to appropriate repository:
    PlatformIO IDE for Atom or
    PlatformIO IDE for VSCode

  • Development Platform or Board.
    All issues (building, uploading, adding new boards, etc.) related to PlatformIO development platforms
    should be reported to appropriate repository related to your hardware
    https://github.com/topics/platformio-platform

  • Feature Request.
    Start by telling us what problem you’re trying to solve. Often a solution
    already exists! Don’t send pull requests to implement new features without first getting our
    support. Sometimes we leave features out on purpose to keep the project small.

  • PlatformIO Core.
    If you’ve found a bug, please provide an information below.

You can erase any parts of this template not applicable to your Issue.


Configuration

Operating system:

OSX 12.4

PlatformIO Version (platformio --version):

6.1.6a4 (though also applies to 6.1.3)

Description of problem

When two libraries both list each other as dependencies in their library.json manifests, pio pkg list and pio pkg uninstall both throw RecursionError: maximum recursion depth exceeded while calling a Python object errors.

Steps to Reproduce

  1. Create a new project with the following platformio.ini file:
[env:esp32dev]
platform = espressif32
board = esp32dev
framework = arduino
lib_compat_mode = strict
lib_ldf_mode = chain+
lib_deps = khoih-prog/WiFiMulti_Generic@1.2.2

(The key detail here being that the libraries WiFiMulti_Generic and WiFiNINA_Generic both list each other as dependencies in their library.json manifests)

  1. Install the dependencies with pio pkg install
  2. Cause the error via pio pkg list or pio pkg uninstall -l WiFiMulti_Generic

Actual Results

Both commands eventually fail, throwing a RecursionError: maximum recursion depth exceeded while calling a Python object exception.

Expected Results

Ideally, the libraries should be removed / listed as expected.

If problems with PlatformIO Build System:

The content of platformio.ini:

[env:esp32dev]
platform = espressif32
board = esp32dev
framework = arduino
lib_compat_mode = strict
lib_ldf_mode = chain+
lib_deps = khoih-prog/WiFiMulti_Generic@1.2.2

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions