Skip to content

Nanosecond-granularity modification times cause spurious rebuilds #2874

@shepmaster

Description

@shepmaster

I have a large Cargo.toml that I'm placing in a Docker container and prebuilding all the dependencies. However, at runtime there's still one crate that is rebuilt: tempfile v2.1.4. Turning on logging shows:

INFO:cargo::ops::cargo_rustc::fingerprint: fingerprint error for tempfile v2.1.4: mtime based comopnents have changed: Some(FileTime { seconds: 1468471990, nanos: 0 }) != Some(FileTime { seconds: 1468471990, nanos: 914840077 }), paths are "/playground/target/debug/build/tempfile-1b82f6307d61d5f0/output" and "/playground/target/debug/build/tempfile-1b82f6307d61d5f0/output"

More specifically:

Some(FileTime { seconds: 1468471990, nanos: 0 })
Some(FileTime { seconds: 1468471990, nanos: 914840077 })

A complete log

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions