Skip to content

Filtering against cargo tree under-includes dependencies, does not accurately reflect feature unification in a workspace #216

@Shnatsel

Description

@Shnatsel

Uncommenting this line in #210 causes the test to fail:

//test_dependency_unification_inner(true); // TODO: this fails!

This is using the fixture runtime_and_dev_dep_with_different_features which tests for over-zealous feature unification. If a package is used both as a dev-dependency and as a normal dependency, the features enabled on it when it is used as a dev-dependency do not impact the features enabled on it in the runtime dependency tree.

cargo metadata performs the erroneous over-zealous feature unification, which is why we have to filter it against the output of cargo tree --edges=normal,build to get rid of the extraneous dependencies.

It seems that either the SBOM emitted by Cargo or our handling of it reintroduce the problem.

cc @tofay

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions