Skip to content

Add a JSON dependency inventory for PlatformIO projects - #5541

Draft
Aditya123130 wants to merge 2 commits into
platformio:developfrom
Aditya123130:feat/pkg-list-project-json
Draft

Aditya123130 wants to merge 2 commits into
platformio:developfrom
Aditya123130:feat/pkg-list-project-json

Conversation

@Aditya123130

Copy link
Copy Markdown

Stacked on #5540. The inventory-only commit is c971080. This is a proposed foundation for #4247.

pio pkg list --json-output reports installed packages and declared dependency edges for each selected environment. An edge with a null target means the spec did not resolve in the local package stores. The inventory includes the declared platform, its required packages, and declared library dependencies. It uses local installation state without installing packages or running a build. Raw source URLs and paths are omitted from the JSON. This draft covers project mode and environment selection.

The scope is declared packages. Libraries inferred from source by the build and undeclared framework libraries are outside this first inventory. Feedback on that scope and on the output format would help before adding SPDX export.

Validation on Windows with Python 3.14

  • 50 focused package and project configuration tests passed. Fixtures cover separate environment versions, cycles, unresolved dependencies, optional tools, and omission of source URLs.
  • Invoked the CLI with a fresh project and parsed stdout as JSON.
  • Black, isort, Pylint, codespell, and git diff --check passed.

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