Skip to content

Show more details on "Dirty ...: dependency info changed" #13859

@RalfJung

Description

@RalfJung

Problem

Debugging unexpected rebuilds got a lot nicer with cargo build -v showing a reason for "Dirty" crates. However, sometimes one gets

       Dirty miri v0.1.0 (D:\a\miri\miri): dependency info changed

which is not really actionable, given that nothing about the crate itself (Cargo.toml / Cargo.lock) changed.

Proposed Solution

Would be great to get some more details about what changed here. For this specific case, the cargo::core::compiler::fingerprint log shows

2024-05-04T06:41:27.4318113Z    0.102008300s  INFO prepare_target{force=false package_id=miri v0.1.0 (D:\a\miri\miri) target="miri"}: cargo::core::compiler::fingerprint: fingerprint dirty for miri v0.1.0 (D:\a\miri\miri)/Build/TargetInner { name: "miri", tested: false, doc: true, ..: with_path("D:\\a\\miri\\miri\\src\\bin\\miri.rs", Edition2021) }
2024-05-04T06:41:27.4320415Z    0.102041200s  INFO prepare_target{force=false package_id=miri v0.1.0 (D:\a\miri\miri) target="miri"}: cargo::core::compiler::fingerprint:     dirty: UnitDependencyInfoChanged { old_name: "ctrlc", old_fingerprint: 6202229392602597251, new_name: "ctrlc", new_fingerprint: 4374262352119191711 }

So apparently the ctrlc crate changed somehow. I don't know what this means, but maybe it would make sense to mention ctrlc in the cargo build -v output. Maybe it could even explain what changed about ctrlc -- I have no idea what flows into this fingerprint that apparently changed.

Notes

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-rebuild-detectionArea: rebuild detection and fingerprintingC-feature-requestCategory: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted`S-propose-closeStatus: A team member has nominated this for closing, pending further input from the team

    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