commit | f12fc134ef34d3b845f8aefad361298134d4f224 | [log] [tgz] |
---|---|---|
author | Googler <arostovtsev@google.com> | Wed Mar 13 12:27:03 2024 -0700 |
committer | Copybara-Service <copybara-worker@google.com> | Wed Mar 13 12:28:56 2024 -0700 |
tree | cf57cd8430f490d0da44647d782af1bcdcb09e6a | |
parent | 668d27485938e4b4b012947f6a51b98fbfdff0b1 [diff] |
Ensure output root is an absolute path even if $HOME or $XDG_CACHE_HOME are relative The Bazel server pre-processes the output root via PathFragmentConverter, which absolutizes paths and expands leading "~" as the home directory. This can cause the server and the client to treat different directories as output root, leading to a server crash. Thus, the client must make the output root absolute. We already do so when the output root derives from $TEST_TMPDIR (without tilde expansion) in StartupOptions::StartupOptions. And we do so (with tilde expansion, for legacy reasons) when the output root derives from the --output_user_root startup flag passed to the client, see StartupOptions::ProcessArg. We must do the same when the output root derives from $HOME or $XDG_CACHE_HOME - without tilde expansion, since it's generally expected that tools do not perform tilde expansion on paths derived from env variables (and since tilde expansion on $HOME is meaningless and a recursive explosion). Fixes https://github.com/bazelbuild/bazel/issues/21660 PiperOrigin-RevId: 615506594 Change-Id: Ice67c8be43cef2812b6dce591bd65b9813e82f5c
{Fast, Correct} - Choose two
Build and test software of any size, quickly and reliably.
Speed up your builds and tests: Bazel rebuilds only what is necessary. With advanced local and distributed caching, optimized dependency analysis and parallel execution, you get fast and incremental builds.
One tool, multiple languages: Build and test Java, C++, Android, iOS, Go, and a wide variety of other language platforms. Bazel runs on Windows, macOS, and Linux.
Scalable: Bazel helps you scale your organization, codebase, and continuous integration solution. It handles codebases of any size, in multiple repositories or a huge monorepo.
Extensible to your needs: Easily add support for new languages and platforms with Bazel's familiar extension language. Share and re-use language rules written by the growing Bazel community.
Follow our tutorials:
To report a security issue, please email security@bazel.build with a description of the issue, the steps you took to create the issue, affected versions, and, if known, mitigations for the issue. Our vulnerability management team will respond within 3 working days of your email. If the issue is confirmed as a vulnerability, we will open a Security Advisory. This project follows a 90 day disclosure timeline.
See CONTRIBUTING.md