Skip to content

Update dependencies tree to support Pub workspaces #5260

@DanTup

Description

@DanTup

pub deps --json will work slightly different with the Pub Workspaces feature, so we need to change how we parse the JSON slightly (see dart-lang/pub#4330).

Currently we use kind field on a package to know if it is a direct/dev/transitive dependency, but that data will no longer be accurate because the solve is for all packages in the Pub Workspace and not the one where we executed pub get. Instead, we should look at the dependencies list for the package (and a new dev_dependencies that may be added as the solution to dart-lang/pub#4330).

For an initial fix, we could continue to execute pub deps in each package and just ensure we filter the results correctly - but as a further optimisation we should run only in workspace roots or non-workspace packages, and produce multiple package nodes at the root of the tree from a single pub deps --json result.

Metadata

Metadata

Assignees

No one assigned

    Labels

    in viewsRelates to custom views, like the Test tree or Dependencies treeis enhancement

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions