Skip to content

The distributed compiler sources do not come with an up-to-date lockfile #116229

Open
@RalfJung

Description

@RalfJung

After installing the rustc-src component, trying to run cargo metadata on them will fail if the sources are installed in a read-only location (such as on Nix, or when cargo metadata is run in a sandbox). This could be avoided by either fixing cargo (rust-lang/cargo#10096), or by adjusting the rustc-src component to work around this behavior of cargo, by shipping an up-to-date lockfile.

Part of the problem seems to be that the cargo crates are not in a workspace any more when they are inside rustc-src. However, sadly, even if one puts a Cargo.toml (with all references to library/ and src/tools/ removed) into the right place, Cargo is still not happy with the lockfile -- it insists on removing everything unnecessary from this lockfile. So producing a lockfile that cargo is happy with could be rather tricky.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-reproducibilityArea: Reproducible / deterministic buildsC-bugCategory: This is a bug.T-bootstrapRelevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)T-releaseRelevant to the release subteam, which will review and decide on the PR/issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions