Conversation
clcache defaults its cache directory to %USERPROFILE%\clcache, which triggers a long-standing upstream bug where the atomic rename of stats.txt fails with "[WinError 5] Access is denied". Set CLCACHE_DIR to a path outside the profile, which is the workaround confirmed in the upstream issue. Refs: nodejs#4471 Refs: frerich/clcache#342 Assisted-by: Claude Code Signed-off-by: Yasunobu <[email protected]>
This was referenced Sep 16, 2026
StefanStojanovic
approved these changes
Sep 17, 2026
StefanStojanovic
left a comment
Contributor
There was a problem hiding this comment.
Approving this so it can be landed and tested in the CI. If it fails, we'll set DISABLE_CLCACHE to disable clcache completely.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #4471
compile.cmdsetsCLCACHE_BASEDIRbut notCLCACHE_DIR, so clcache stores its cache in%USERPROFILE%\clcache. That is the configuration reported in frerich/clcache#342 to fail with:and setting
CLCACHE_DIRto a path outside the profile is the workaround confirmed by several people in that thread. Upstream is archived, so this has to be handled on our side.Notes:
C:\clcache_dirjust matches the value used upstream. Happy to rename it; it is a little close toC:\clcache, which holds the installation.