Skip to content

Fix circular dependencies in filtered package listings - #5540

Open
Aditya123130 wants to merge 1 commit into
platformio:developfrom
Aditya123130:fix/pkg-list-dependency-graph
Open

Aditya123130 wants to merge 1 commit into
platformio:developfrom
Aditya123130:fix/pkg-list-dependency-graph

Conversation

@Aditya123130

Copy link
Copy Markdown

A filtered pio pkg list can raise RecursionError when an installed package leads into a dependency cycle that does not contain the requested package. Replace recursive filter matching with a traversal that visits each reachable installed package once. The same traversal can support the proposed project dependency inventory in #4247.

The regression test uses local package manifests. It verifies that the filter skips a cycle without a match and still finds a target reachable on another branch. It fails on develop with RecursionError and passes with this patch. All 26 focused package tests and the lint checks for changed Python files passed.

Related to #4475.

Assisted by Codex.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant