Allow dynamic log path location in .bazelrc
#22267
Labels
P3
We're not considering working on this, but happy to review a PR. (No assignee)
team-CLI
Console UI
team-Configurability
Issues for Configurability team
type: feature request
Description of the feature request:
Allow
.bazelrc
file to have a variable that points to the root of the project (for example:%workspace
). Unfortunately%workspace%
does not work when specifying the path to logs as it appends %workspace% as a string, not a variable.A currently work around is to edit
tools/bazel
, grab the current path to root of the project and echo the following to aBazel/tmp/local.bazelrc
fileThen, import
local.bazelrc
in the project's.bazelrc
usingtry-import
Which category does this issue belong to?
CLI, Configurability
What underlying problem are you trying to solve with this feature?
Currently, if we want to specify a location to the logs, we can add the following in the
.bazelrc
fileThis works fine if a Bazel command is executed from the root of the project but if we run a Bazel command from a subdirectory inside the project, Bazel attempts to search for the path in such manner:
pwd + Bazel/tmp/logs/execution_logs.json
This makes the path mention to dump the logs in the
.bazelrc
file as an invalid pathWhich operating system are you running Bazel on?
MacOS Sonoma 14.4.1
What is the output of
bazel info release
?INFO: Invocation ID: c18d31dc-3cbd-4cc0-864b-aff070099dee release 6.4.0
If
bazel info release
returnsdevelopment version
or(@non-git)
, tell us how you built Bazel.No response
What's the output of
git remote get-url origin; git rev-parse HEAD
?No response
Have you found anything relevant by searching the web?
No response
Any other information, logs, or outputs that you want to share?
No response
The text was updated successfully, but these errors were encountered: