Skip to content

Constant rebuilds with checksum-freshness when using bindgen #16253

@svix-jplatte

Description

@svix-jplatte

Problem

When using -Zchecksum-freshness in a project that uses the current version of bindgen, every cargo check or cargo build starts at clang-sys, always considering it in need of a rebuild. I could not reproduce the issue with just clang-sys as a dependency.

Steps

  1. Create a new Cargo package
  2. cargo add bindgen@0.72.1
  3. cargo c -Zchecksum-freshness
  4. cargo c -Zchecksum-freshness

Version

cargo 1.93.0-nightly (2d4fa1395 2025-11-12)
release: 1.93.0-nightly
commit-hash: 2d4fa139552ebdd5f091a1401ed03f7dc62cb43f
commit-date: 2025-11-12
host: x86_64-unknown-linux-gnu
libgit2: 1.9.1 (sys:0.20.2 vendored)
libcurl: 8.15.0-DEV (sys:0.4.83+curl-8.15.0 vendored ssl:OpenSSL/3.5.4)
ssl: OpenSSL 3.5.4 30 Sep 2025
os: Arch Linux [64-bit]

@rustbot label +Z-checksum-freshness +A-rebuild-detection

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-rebuild-detectionArea: rebuild detection and fingerprintingC-bugCategory: bugS-blocked-externalStatus: ❌ blocked on something out of the direct control of the Cargo project, e.g., upstream fixZ-checksum-freshnessNightly: rebuild detection on file checksum instead of mtime

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions