@fasterthanlimeamos as a followup, things that are complicated
- lockable units aren't atomic but mixed together with other units across a couple of folders. `-Zbuild-dir-new-layout` exists for changing this but will be a big transition because parts of the ecosystem depend on the layout. `build-dir` itself was a first step to help identify these cases.
- file handle limits makes grabbing locks per unit to be annoying
- with build pipelining (once rmeta is generated, dependents can build in parallel to rlib generation), locking for a build unit isn't just "read XOR write" because we need to do both
- some build units may get mutated by different builds so it can be tricky to track when we can concurrently read or not

We've been discovering and working through these issues in another PR that does change `build-dir` layout, see github.com/rust-lang/cargo/pul

0

If you have a fediverse account, you can quote this note from your own instance. Search https://hachyderm.io/users/epage/statuses/115571944982517563 on your instance and quote it. (Note that quoting is not supported in Mastodon.)