-
Notifications
You must be signed in to change notification settings - Fork 576
Fall back to direct cache write if tempfile creation on the same fs fails #2369
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
base: main
Are you sure you want to change the base?
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #2369 +/- ##
==========================================
+ Coverage 67.06% 67.23% +0.17%
==========================================
Files 64 64
Lines 34718 34783 +65
==========================================
+ Hits 23285 23388 +103
+ Misses 11433 11395 -38 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
would it be possible to add a test to make sure we don't regress in the future? |
@sylvestre |
Rebased on I am not entirely sure if the use of |
could you please add high level tests in https://github.com/mozilla/sccache/blob/main/tests/system.rs too ? thanks like Line 1825 in 7025295
|
@sylvestre Sorry for the delayed response. I am planning to test this by adding two functions that are similar to One of them should test
|
On a second thought, I have a question: I think I named the PR a bit too narrow. Maybe like
I was think of reframing the PR this way, because this way, we don't have to hardcode
|
@@ -207,22 +208,41 @@ impl CacheRead { | |||
optional, | |||
} in objects | |||
{ | |||
if path == Path::new("/dev/null") { |
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.
It should be NUL
for Windows with MSVC, isn't it?
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.
Sorry I do not have a MSVC environment to test this so I wasn't sure.
For gcc
, it seems to be complicated by gcc
appending .exe
automatically:
-o NUL
: it gives meNUL.exe
-o NUL.
:ld.exe: cannot open output file NUL.: Invalid argument
-Wl,-o,NUL
:ld.exe: final link failed: file truncated
-c -o NUL
: nothing (good)-c -o NUL.o
:NUL.o
(as expected)
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.
Looks like we should support -c -o NUL
as a base one, isn't it?
P.S. I don't think we really support -o NUL
variant with the compiling & linking together: @Xuanwo , do we?
Signed-off-by: Zhang Maiyun <[email protected]>
Fixes mozilla#2288 Signed-off-by: Zhang Maiyun <[email protected]>
Co-authored-by: Alex Overchenko <[email protected]>
Please see #2288 for the discussion.