Re-organize build-dir by package + hash, rather than artifact type #15010
Labels
A-layout
Area: target output directory layout, naming, and organization
C-cleanup
Category: cleanup within the codebase
S-needs-design
Status: Needs someone to work further on the design for the feature or fix. NOT YET accepted.
note: I specify
build-dir
to clarify which half of #14125 I'm referring to.Currently,
build-dir
is laid out liketarget/
<target-platform>/
?<profile>/
incremental/
build/
<package>-<hash>/
build*script-*
deps/
<package>-<hash>*
Currently,
cargo clean -p <package>
will operate on everything for<package>
In the future, we could have
<package>-<hash>
(cargo ./target fills with outdated artifacts as toolchains are updated/changed #5026)<package>-<hash>
that are being built block (More granular locking in cargo_rustc #4282)<package>-<hash>
artifacts across all projects (Per-user compiled artifact cache #5931)These could be aided by re-arranging the
build-dir
to be organized around<package>-<hash>
, liketarget/
<target-platform>/
?<profile>/
incremental/
build/
<package>-<hash>/
build*script-*
*.d
Side effects
deps/
and rustc finds the files it needs. We'll instead need to point to each individual artifact rustc may need.Open questions
build-dir
isn't stable, enough tools rely on the layout that we'd want to setup a transition plan so they can have time to test against the new layout and work to support bothbuild/
as its all encompassingbuild/
anddeps/
content live in the same place?incremental/
?<profile>
at least?<hash>
is the-C extra-filename
hash and doesn't encompass all of fingerprinting, so we'd need to audit if there are cases that don't change the hash that we'd stil need per-profileThe text was updated successfully, but these errors were encountered: