-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Description
Cargo 1.91.0 (in #15935) switched from implementing its own build directory locking code to the recent File::lock family of functions in the standard library. It did so while maintaining the code (#4116) that ignores file locking if the API returns "unsupported".
Unfortunately the standard library's implementation of locking was not fully equivalent to Cargo's. Cargo used flock on every platform except for Solaris (which used a custom implementation), while the standard library uses flock on a set of allowlisted targets, the same custom implementation in Solaris, and returns "unsupported" for other platforms.
Turns out that due to an oversight illumos was not included in the allowlist of platforms supporting flock. This means build directory locking is ignored by Cargo 1.91.0 on illumos even if the underlying filesystem supports it.
The standard library missing illumos is tracked in rust-lang/rust#146312, and a fix adding illumos to the standard library's allowlist is in rust-lang/rust#148322.