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
sccache: error : Failed to create temp dir #837
Comments
I tried |
@GopherJ @vks do y'all happen to be using neovim/coc.nvim/coc-rust-analyzer? I ask because I've had this issue recently, and I did some digging. In my situation it happens to be because coc recently started passing down a neovim-specific $TMPDIR to rust-analyzer, so if sccache gets started via coc-rust-analyzer and persists past the neovim temp dir, future invocations against that sccache server will fail. I verified this by stopping sccache, opening up a source file in vim, and taking a look at the $TMPDIR for the sccache process that got started. (elided to remove some irrelevant details):
Note the The coc change is recent, so it doesn't line up quite with #428 but the root cause could be something similar. I tried adding So the restarting-sccache workaround works, but I'm not sure what a more lasting fix to this might be. If the $TMPDIR that sccache is passed gets deleted, I'm not sure what sccache ought to do. Potentially, I can follow up with the coc.nvim maintainer. |
@cthulhua Yes, I think this is it! |
Oh, that's interesting! Good catch! I wonder if the sccache server ought to be more judicious about choosing its temp dir? Honoring the environment variable is probably the right thing to do in the general case, but the way that sccache spawns a daemon by way of the compiler wrapper is a bit of an edge case. |
Yes I'm using coc.nvim + coc-rust-analyzer |
You should be able to do |
Awesome. I'm not sure what needs to happen per @luser's comment, but I'm in good shape now with this workaround. |
I'm glad there's a workaround and all, but it's definitely a little frustrating that this can be messed up system-wide if a vim session with Coc or anything else that uses the daemon can mess this up. Even if this is "fixed" on the Coc side, it's totally possible for something else to break it. sccache is a great piece of software, but this is frustrating nonetheless. |
Any news on this pls, it's really annoying:) |
I ran into this after |
Same issue here. I hope this will be fixed. |
@drahnr Gentoo is hitting this issue as described in the PR to update to
This happens when it wants to use the temp directory from the previous build instead of the current one. Is there anything that can be done to resolve this in sccache soon? |
The text was updated successfully, but these errors were encountered: