-
Notifications
You must be signed in to change notification settings - Fork 2.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Re-organize build-dir by package + hash, rather than artifact type #15010
Comments
I am assuming that final binary would still be located at
I think we should check how many of the most popular tools rely on the layout. Depending the impact we can adjust how aggressive we want to be with the migration. Regarding strategies, I have 2 ideas.
I do not have a strong opinion on this. I was thinking perhaps |
This does not touch final artifacts. I'd recommend reading up on the following note
I know there is at least There might be some other tools that do weirder stuff, like inspecting debug files or rlibs.
Writing to both or symlinks won't work for the above two tools. A common approach we take is to have a feature be opt-in and then transition it to opt-out. A question in this is if we'd want to still support the old layout, for which we'd do this through a config, or if we'll only support the new layout, for which we use an env variable and after a sufficient time we remove the opt-out. |
Okay, I finally had some time to read up on #14125 some other related threads. Would it would be better to focus on making progress on separating I am leaning towards doing this re-organization after separating the build/artifact dirs. |
I've wondered about doing the build-dir change first, like you said. It would make the scope of the change clear and it would help to communicate out what has compatibility guarantees. |
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: