-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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
Add TRACKED_NO_CRATE_HASH and use it for --remap-path-prefix
#84233
Conversation
@jyn514: Can you add a test to |
This comment has been minimized.
This comment has been minimized.
Done, and I also tested that |
Hmm, the test in |
Actually I wonder if the issue is that tracked options make it all the way to .rlibs? I would expect them to only be stored in the incremental cache, not in any outputs. |
This comment has been minimized.
This comment has been minimized.
Hmm, it looks like this was intentionally changed in #48162 ? @michaelwoerister do you have suggestions for invalidating the cache when this changes without also changing the output .rlib? |
This is on my todo list. It does not look like a trivial problem. |
It looks like we can't make the option |
This is waiting on me to implement #83813 (comment). |
@michaelwoerister hmm, there's also a |
I tried this and it doesn't work because
Maybe I should add |
3bcfbe4
to
3249d2a
Compare
This comment has been minimized.
This comment has been minimized.
For reference, this is what I did when I tried to implement it: #83813 (comment) 39ebceb There probably is a better way though |
Hmm, why do you say that? What if you want to add a |
@bors rollup=never |
This makes the comments show up in the generated docs. - Fix markdown formatting
51b0cb2
to
5a692a7
Compare
@bors r=michaelwoerister (I just changed the formatting of some of the docs, nothing related to incremental itself) |
📌 Commit 5a692a7 has been approved by |
☀️ Test successful - checks-actions |
Implement DepTrackingHash for `Option` through blanket impls instead of macros This avoids having to add a new macro call for both the `Option` and the type itself. Noticed this while working on rust-lang#84233. r? `@Aaron1011`
tmp_buf = crate::filesearch::get_or_default_sysroot(); | ||
&tmp_buf | ||
} | ||
}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Computing the sysroot here is a problem as it means when the config
driver callback changes the sysroot, that does not properly get taken into account.
This PR moved real_rust_source_base_dir
from after the config
callback to before, which is not good. Config
should not contain "derived" values, only the input as provided by the user.
I'm trying to fix this in #122993 but I have no idea about all this "tracked" stuff, so I don't know if what I do makes any sense.
In #48162,
--remap-path-prefix
was changed to be untracked by incremental compilation so that.rlib
s built with and without it would be bitwise identical. Since--remap-path-prefix
is used for reproducible builds, it's important that it doesn't change the output rlib.Unfortunately, that broke incremental recompilation because we no longer rebuilt the rlib when
--remap-path-prefix
changed. To avoid that, but still make sure the output is bitwise identical, this PR adds a newTRACKED_NO_CRATE_HASH
mode for CLI options. This invalidates the incremental cache, without adding the option to the crate hash embedded in the rlib.TRACKED_NO_CRATE_HASH
and cbeuw'sSUBSTRUCT
ideanon_default_option
isn't the default, which found a couple bugs.real_rust_source_base_dir
fromSession
so it's only hashed onceI verified locally that this fixes #66955.
r? @Aaron1011 (feel free to reassign)