Uh oh!
There was an error while loading. Please reload this page.
Add TRACKED_NO_CRATE_HASH and use it for --remap-path-prefix - #84233
Conversation
Aaron1011
commented
Apr 15, 2021
@jyn514: Can you add a test to |
This comment has been minimized.
This comment has been minimized.
jyn514
commented
Apr 16, 2021
Done, and I also tested that |
jyn514
commented
Apr 16, 2021
Hmm, the test in |
jyn514
commented
Apr 16, 2021
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.
jyn514
commented
Apr 16, 2021
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? |
michaelwoerister
commented
Apr 21, 2021
This is on my todo list. It does not look like a trivial problem. |
It looks like we can't make the option |
jyn514
commented
Apr 26, 2021
This is waiting on me to implement #83813 (comment). |
jyn514
commented
Apr 26, 2021
@michaelwoerister hmm, there's also a |
jyn514
commented
Apr 26, 2021
I tried this and it doesn't work because Maybe I should add |
This comment has been minimized.
This comment has been minimized.
cbeuw
commented
Apr 26, 2021
For reference, this is what I did when I tried to implement it: #83813 (comment)39ebceb There probably is a better way though |
jyn514
commented
Apr 26, 2021
Hmm, why do you say that? What if you want to add a |
michaelwoerister
commented
Apr 29, 2021
@bors rollup=never |
This makes the comments show up in the generated docs. - Fix markdown formatting
jyn514
commented
Apr 29, 2021
@bors r=michaelwoerister (I just changed the formatting of some of the docs, nothing related to incremental itself) |
bors
commented
Apr 29, 2021
📌 Commit 5a692a7 has been approved by |
bors
commented
Apr 29, 2021
bors
commented
Apr 29, 2021
☀️ 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.
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-prefixwas changed to be untracked by incremental compilation so that.rlibs built with and without it would be bitwise identical. Since--remap-path-prefixis 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-prefixchanged. To avoid that, but still make sure the output is bitwise identical, this PR adds a newTRACKED_NO_CRATE_HASHmode for CLI options. This invalidates the incremental cache, without adding the option to the crate hash embedded in the rlib.TRACKED_NO_CRATE_HASHand cbeuw'sSUBSTRUCTideanon_default_optionisn't the default, which found a couple bugs.real_rust_source_base_dirfromSessionso it's only hashed onceI verified locally that this fixes#66955.
r? @Aaron1011 (feel free to reassign)