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

Move /tmp/zig-cache to bazel workspace #83

Open
motiejus opened this issue May 29, 2023 · 1 comment · May be fixed by #200
Open

Move /tmp/zig-cache to bazel workspace #83

motiejus opened this issue May 29, 2023 · 1 comment · May be fixed by #200
Labels
enhancement New feature or request

Comments

@motiejus
Copy link
Collaborator

Currently Zig cache is in /tmp/zig-cc. It could be moved to a Bazel workspace by creating a new Bazel repository, in a similar way how bazel-gazelle does things, as suggested by @linzhp:

https://github.com/bazelbuild/bazel-gazelle/blob/3a1235c298b7dc11fa7ba994db4f92587c1aca79/internal/go_repository.bzl#L126

Discussion in #zig on Bazel slack: https://bazelbuild.slack.com/archives/C04N6NE1GRM/p1685200818998739?thread_ts=1684869528.116339&cid=C04N6NE1GRM

@malt3
Copy link

malt3 commented Sep 19, 2023

This would also allow multiple users on the same machine to use hermetic_cc_toolchain. Currently, if I build as root once, the files in /tmp/zig-cc are owned by root and a regular user cannot build until I reboot.

ghost pushed a commit that referenced this issue Dec 13, 2023
- `.bazelrc`: `sandbox_add_mount_pair=/tmp` is now required everywhere.
- `.bazelrc` and `README`: remove deprecated/now-default flags.
- `README`: add links to #10 and #83.
- `README`: mention bzlmod.
- `examples/*/.bazelrc`: make them the same for a better recommendation.

The top-level project itself is not bzlmod yet, because that's
book-keeping (it can already be used with bzlmod, so this is purely
book-keeping). We can tackle this out of band with dependency updates.
ghost pushed a commit that referenced this issue Dec 13, 2023
- `.bazelrc`: `sandbox_add_mount_pair=/tmp` is now required everywhere.
- `.bazelrc` and `README`: remove deprecated/now-default flags.
- `README`: add links to #10 and #83.
- `README`: mention bzlmod.
- `examples/*/.bazelrc`: make them the same for a better recommendation.

The top-level project itself is not bzlmod yet, because that's
book-keeping (it can already be used with bzlmod, so this is purely
book-keeping). We can tackle this out of band with dependency updates.

Fixes #134
@motiejus motiejus pinned this issue Dec 13, 2023
@motiejus motiejus added the enhancement New feature or request label Dec 13, 2023
ghost pushed a commit that referenced this issue Dec 14, 2023
- `.bazelrc`: `sandbox_add_mount_pair=/tmp/zig-cache` (if you can) or
  `/tmp` (if not) is now required everywhere.
- `.bazelrc` and `README`: remove deprecated/now-default flags.
- `README`: add links to #10 and #83.
- `README`: mention bzlmod.
- `examples/*/.bazelrc`: make them the same for a better recommendation.

Fixes #134
ghost pushed a commit that referenced this issue Dec 14, 2023
- `.bazelrc`: `sandbox_add_mount_pair=/tmp/zig-cache` (if you can) or
  `/tmp` (if not) is now required everywhere.
- `.bazelrc` and `README`: remove deprecated/now-default flags.
- `README`: add links to #10 and #83.
- `README`: mention bzlmod.
- `examples/*/.bazelrc`: make them the same for a better recommendation.

Fixes #134
ghost pushed a commit that referenced this issue Dec 14, 2023
- `.bazelrc`: `sandbox_add_mount_pair=/tmp/zig-cache` (if you can) or
  `/tmp` (if not) is now required everywhere.
- `.bazelrc` and `README`: remove deprecated/now-default flags.
- `README`: add links to #10 and #83.
- `README`: mention bzlmod.
- `examples/*/.bazelrc`: make them the same for a better recommendation.

Fixes #134.
ghost pushed a commit that referenced this issue Dec 15, 2023
- `.bazelrc`: `sandbox_add_mount_pair=/tmp/zig-cache` (if you can) or
  `/tmp` (if not) is now required everywhere.
- `.bazelrc` and `README`: remove deprecated/now-default flags.
- `README`: add links to #10 and #83.
- `README`: mention bzlmod.
- `examples/*/.bazelrc`: make them the same for a better recommendation.

Fixes #134.
ghost pushed a commit that referenced this issue Dec 15, 2023
- `.bazelrc`: `sandbox_add_mount_pair=/tmp/zig-cache` (if you can) or
  `/tmp` (if not) is now required everywhere.
- `.bazelrc` and `README`: remove deprecated/now-default flags.
- `README`: add links to #10 and #83.
- `README`: mention bzlmod.
- `examples/*/.bazelrc`: make them the same for a better recommendation.

Fixes #134.
ghost pushed a commit that referenced this issue Dec 19, 2023
- `.bazelrc`: `sandbox_add_mount_pair=/tmp/zig-cache` (if you can) or
  `/tmp` (if not) is now required everywhere.
- `.bazelrc` and `README`: remove deprecated/now-default flags.
- `README`: add links to #10 and #83.
- `README`: mention bzlmod.
- `examples/*/.bazelrc`: make them the same for a better recommendation.

Fixes #134.
ghost pushed a commit that referenced this issue Dec 19, 2023
- `.bazelrc`: `sandbox_add_mount_pair=/tmp/zig-cache` (if you can) or
  `/tmp` (if not) is now required everywhere.
- `.bazelrc` and `README`: remove deprecated/now-default flags.
- `README`: add links to #10 and #83.
- `README`: mention bzlmod.
- `examples/*/.bazelrc`: make them the same for a better recommendation.

Fixes #134.
motiejus pushed a commit that referenced this issue Dec 19, 2023
- `.bazelrc`: `sandbox_add_mount_pair=/tmp/zig-cache` (if you can) or
  `/tmp` (if not) is now required everywhere.
- `.bazelrc` and `README`: remove deprecated/now-default flags.
- `README`: add links to #10 and #83.
- `README`: mention bzlmod.
- `examples/*/.bazelrc`: make them the same for a better recommendation.

Fixes #134.
@motiejus motiejus unpinned this issue Mar 19, 2024
@chrisirhc chrisirhc linked a pull request Nov 19, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants