Skip to content

Rebuild triggered after touching a (git submodule) file under the registry/src directory  #10223

Closed as not planned
@Ben-PH

Description

@Ben-PH

Problem

Initial presentation of bug

In our CI pipeline, one of our dependencies (specifically rocksdb) will run a rebuild, despite being cached.

Steps

I am using rocksdb as a representative

  1. Make minimalist hello, world! executable
  2. Add rocksdb = "0.17.0" as a dependency.
  3. install clang or llvm as per the crate requirements
  4. cargo build
    5.a. rm -rf ~/.cargo/registry/src
    5.b. (alternate rebuild trigger) touch /path/to/registry/src/directory/librocksdb-sys-6.20.3/rocksdb
  5. run cargo build and observe the rebuild being triggered.

To validate this is unique, I followed the steps with other executables using the rm option, without any issues.

Possible Solution(s)

Notes

The re-build appears to be triggered by this line of code

The CI setup is following the advice outlined here

Version

cargo 1.56.0 (4ed5d137b 2021-10-04)
release: 1.56.0
commit-hash: 4ed5d137baff5eccf1bae5a7b2ae4b57efad4a7d
commit-date: 2021-10-04

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-rebuild-detectionArea: rebuild detection and fingerprintingC-bugCategory: bug

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions