Support %bazel_workspace% interpolation in --repo_env#25608
Support %bazel_workspace% interpolation in --repo_env#25608fmeum wants to merge 1 commit intobazelbuild:masterfrom
%bazel_workspace% interpolation in --repo_env#25608Conversation
9e68934 to
b923c3e
Compare
Do we actually know any of such use case? |
No, but it doesn't seem unrealistic for some other tool to treat |
|
%FOO% is actually how you reference an env var on Windows, maybe this could be a problem? |
59bb1fb to
57695d1
Compare
|
Do we support this for |
|
We could, but I don't think that's a step in the right direction. If you have in-repo tools, IMO you should wrap them in targets and depend on those in your rules rather than non-hermetically adding them to PATH. I still haven't figured out the remaining CI issue. It seems to be related to MSYS/Windows path styles. |
ca82607 to
ba0d24e
Compare
ba0d24e to
a43adf8
Compare
4433b58 to
42e0618
Compare
`%bazel_workspace%` is used instead of the more conventional `%workspace%` to avoid changing the behavior of existing `--repo_env` usages in which `%workspace%` may already have a meaning. RELNOTES: In environment variable values set via `--repo_env`, the substring `%bazel_workspace%` is now replaced with the absolute path of the current Bazel workspace. This can, for example, be used to make tools checked into the repository available on the `PATH` for repository rules.
b118151 to
057ff26
Compare
|
@meteorcloudy Tests are passing now |
|
@bazel-io fork 9.0.0 |
`%bazel_workspace%` is used instead of the more conventional `%workspace%` to avoid changing the behavior of existing `--repo_env` usages in which `%workspace%` may already have a meaning. RELNOTES: In environment variable values set via `--repo_env`, the substring `%bazel_workspace%` is now replaced with the absolute path of the current Bazel workspace. This can, for example, be used to make tools checked into the repository available on the `PATH` for repository rules. Closes bazelbuild#25608. PiperOrigin-RevId: 828862407 Change-Id: I644fbb25d80c5353e522c7184d7c57b2ac8bf04f
…7562) `%bazel_workspace%` is used instead of the more conventional `%workspace%` to avoid changing the behavior of existing `--repo_env` usages in which `%workspace%` may already have a meaning. RELNOTES: In environment variable values set via `--repo_env`, the substring `%bazel_workspace%` is now replaced with the absolute path of the current Bazel workspace. This can, for example, be used to make tools checked into the repository available on the `PATH` for repository rules. Closes #25608. PiperOrigin-RevId: 828862407 Change-Id: I644fbb25d80c5353e522c7184d7c57b2ac8bf04f Commit 6dc16b9 Co-authored-by: Fabian Meumertzheim <[email protected]>
%bazel_workspace%is used instead of the more conventional%workspace%to avoid changing the behavior of existing--repo_envusages in which%workspace%may already have a meaning.RELNOTES: In environment variable values set via
--repo_env, the substring%bazel_workspace%is now replaced with the absolute path of the current Bazel workspace. This can, for example, be used to make tools checked into the repository available on thePATHfor repository rules.