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
feat: Take the whole rustc version into hash calculation #1553
feat: Take the whole rustc version into hash calculation #1553
Conversation
Signed-off-by: Xuanwo <github@xuanwo.io>
Codecov ReportBase: 30.91% // Head: 30.91% // Decreases project coverage by
Additional details and impacted files@@ Coverage Diff @@
## main #1553 +/- ##
==========================================
- Coverage 30.91% 30.91% -0.01%
==========================================
Files 48 48
Lines 16589 16598 +9
Branches 7896 7906 +10
==========================================
+ Hits 5129 5131 +2
+ Misses 6107 6106 -1
- Partials 5353 5361 +8
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report at Codecov. |
The rustc binary is hashed already, which by definition must change if the output of Could you elaborate on the precise case that would require the version to be hashed in addition? |
I must miss this part. Can you point out the detailed place which |
I was writing that from memory, since there were issues in the past when switching from nightly to stable or vice versa, I have yet to double check the code |
My current understanding is we just hashed the path to |
it is the path and it is coming from rustup, it should be something like |
I'm afraid that we just found [2023-01-11T08:34:03Z DEBUG sccache::compiler::compiler] Found rustc at path: "/home/xuanwo/.cargo/bin/rustc" This can be reproduced by change: - debug!("Found rustc");
+ debug!("Found rustc at path: {rustc_executable:?}"); |
I don't think that's guaranteed. It could well be ~/.cargo/bin/rustc. Also, in most cases it would be ~/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/bin/rustc. |
And yeah, when the path is ~/.cargo/bin/rustc, if you were hashing the binary, you'd end up hashing rustup's binary, which never changes. It's possible to unwrap and find the real binary, though... |
Signed-off-by: Xuanwo <github@xuanwo.io>
or /usr/bin/rustc ;) |
There is actually code to unwrap the rustup proxy already: sccache/src/compiler/compiler.rs Line 962 in 1a82863
|
Signed-off-by: Xuanwo <github@xuanwo.io>
This was wrong, I got confused and thought the sysroot would include rustc, but it apparently does not. Sorry for the red hering. |
Signed-off-by: Xuanwo github@xuanwo.io
Fix #1552
This is a use case that may break user's build after rust version bumped.