Skip to content
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

Append username to the default tmp directory #187

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

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 <laurentlb@gmail.com>
@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