Skip to content

cargo metadata --no-deps includes all packages in the workspace #7893

Closed
@sfackler

Description

@sfackler

Problem

The --no-deps flag of cargo-metadata is documented as such

        --no-deps                     Output information only about the root package and don't fetch dependencies

From that, I would expect that the output would only include a single package. However, when run in a workspace, information about all packages in the workspace is output.

Steps

  1. Find a workspace with multiple packages.
  2. Run cargo metadata --no-deps --format-version 1
  3. Observe multiple packages in output

Notes

Output of cargo version: cargo 1.41.0 (626f0f40e 2019-12-03)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions