-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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 default output root on macOS to $HOME/Library/Caches
#25262
base: master
Are you sure you want to change the base?
Move default output root on macOS to $HOME/Library/Caches
#25262
Conversation
This is an incompatible change, but arguably one that doesn't need to be gated by a flag. We do need to make sure that
An additional question is what to do about the documentation at https://bazel.build/remote/output-directories - I assume many bazel 8 users will check that page (even though it's for bazel-at-head). So maybe we need phrasing along the lines of "this is how things work in bazel 9, and that is how they used to work in bazel 8 and earlier". |
This comment was marked as resolved.
This comment was marked as resolved.
Did some code searching. Needs to be fixed:
Already fixed:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please also update output-directories.md
.
I'd suggest something like the following wording:
- The outputRoot directory defaults to
~/.cache/bazel
on Linux,
~/Library/Caches/bazel
on macOS (when using Bazel 9 and newer), and on Windows it defaults to%HOME%
if
set, else%USERPROFILE%
if set, else the result of calling
SHGetKnownFolderPath()
with theFOLDERID_Profile
flag set. If the
environment variable$XDG_CACHE_HOME
is set on either Linux or
macOS, the value${XDG_CACHE_HOME}/bazel
will override the default.
If the environment variable$TEST_TMPDIR
is set, as in a test of Bazel
itself, then that value overrides any defaults.- Note that Bazel 8.x and earlier on macOS used
/private/var/tmp
as outputRoot, and ignored$XDG_CACHE_HOME
.
- Note that Bazel 8.x and earlier on macOS used
Thanks for the feedback @tetromino! I've addressed it in the latest commit. I'm happy to continue working with you to iterate on this as needed. I don't know if I'm the best person to work on those other identified points, since some of them are internal to Google and others seem to require some inter-repo coordination, but let me know what you want from me! |
Fixes #25260
Implements the request made here and moves the default output root on macOS from
/private/var/tmp
to$HOME/Library/Caches
. May constitute an incompatible change, though on a cursory glance I didn't see any precedent for incompatible startup options in source.