Skip to content

Conversation

@laurentlb
Copy link

When two people build code on the same machine, there can be a collision. The second person may not be able to write to zig-cache if it was created by someone else. When it happens, the error message is quite confusing (see _compile_failed variable).

With this commit, each user should get a different directory by default. It's still possible to change the default using HERMETIC_CC_TOOLCHAIN_CACHE_PREFIX.

When two people build code on the same machine, there can be a collision. The second person may not be able to write to zig-cache if it was created by someone else. When it happens, the error message is quite confusing (see `_compile_failed` variable).

With this commit, each user should get a different directory by default. It's still possible to change the default using HERMETIC_CC_TOOLCHAIN_CACHE_PREFIX.

Signed-off-by: Laurent Le Brun <[email protected]>
@CLAassistant
Copy link

CLAassistant commented Jun 24, 2024

CLA assistant check
All committers have signed the CLA.

@laurentlb
Copy link
Author

It looks like this will conflict with #183. We can close this PR if the other one gets merged.

@linzhp
Copy link
Contributor

linzhp commented Jul 7, 2024

yeah, and quoting a discussion with @sluongng:

The concern of setting UID or USER into the path is that it would be stamped into the wrapper binary as a constant.
And as it's being part of the toolchain, it will invalidate remote cache between different users.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants