Skip to content

proc-macro dependencies are recorded as runtime deps, not build deps #214

Closed
@Shnatsel

Description

@Shnatsel

This can be reproduced by building cargo-auditable itself using cargo auditable build, and then extracting the audit data. The proc-macro2 dependency will be recorded as a runtime dependency, not a build dependency.

This happens because cargo metadata that we rely on to retrieve information about the build reports these dependencies as runtime rather than build-time.

There is nothing we can do about this on stable short of parsing the output of cargo tree, and I'm not sure I'm willing to go to such lengths.

On nightly, -Z sbom accurately reports proc macros and we don't run into that issue at all.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingfixed by upstreamingWill no longer be a problem if `auditable` is upstreamed into Cargo

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions