Skip to content

Optionally generate "dep-info for external build system integration" for test and example binaries #14050

Open
@gsrushton

Description

@gsrushton

Problem

Currently only artefacts destined for uplift to the top-level target directory have extended dep-info generated for them.

In order for external build tools to be able to trivially ascertain whether it's necessary to invoke cargo to rebuild (and potentially re-run) test and example executables it would be ideal if cargo could, optionally, generate the extended dep-info for them as well.

Proposed Solution

Generate extended dep-info for test and binary executables.

  • Generation enabled by environment variable
  • Generate a new file alongside the binary and rustc dep-info in the target/.../deps folder, perhaps named something of the form <artefact-name>-<hash>-extended.d.

Notes

I'm happy to do the work once the proposal is accepted and an implementation agreed.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-build-systemArea: build system integrationA-dep-infoArea: dep-info, .d filesA-layoutArea: target output directory layout, naming, and organizationC-feature-requestCategory: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted`S-needs-infoStatus: Needs more info, such as a reproduction or more background for a feature request.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions