rerun-if-changed doesn't trigger if a symlink points to a different file with the same mtime #15134
Open
Description
Problem
Last week I ran into crashes working on the Python bcrypt project, which uses Rust via PyO3. Ultimately I tracked the crash down to the Rust build cache not being invalidated correctly while switching Python interpreters. See this PyO3 issue for more context.
Steps
Clone this repository and run the steps in the README.
The repository sets up symlinks in a manner analogous to the problematic symlinks that caused issues on the bcrypt CI. In the real-world case the two python
symlinks were pointing at interpreters with different filesystem paths but happened to have the same mtime
.
Possible Solution(s)
No response
Notes
No response
Version
cargo 1.84.1 (66221abde 2024-11-19)
release: 1.84.1
commit-hash: 66221abdeca2002d318fde6efff516aab091df0e
commit-date: 2024-11-19
host: aarch64-apple-darwin
libgit2: 1.8.1 (sys:0.19.0 vendored)
libcurl: 8.7.1 (sys:0.4.74+curl-8.9.0 system ssl:(SecureTransport) LibreSSL/3.3.6)
ssl: OpenSSL 1.1.1w 11 Sep 2023
os: Mac OS 15.2.0 [64-bit]