Skip to content

Cargo detector needs to consider if dependencies are optional or not #1365

@jcfiorenzano

Description

@jcfiorenzano

Cargo dependencies can be flagged as optional. These are dependencies that will be included in the final artifact if certain features defined by it are enabled. See https://doc.rust-lang.org/cargo/reference/features.html#optional-dependencies. We should at least register this property as we do with the Maven detector and its scope property.

We could also evaluate the use of the cli tool cargo tree . We need to investigate if running cargo tree --edge all returns optional dependencies that are not active, if it doesn't then we could use to remove the dependencies from the component detection report.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions