Results 32 comments of Boleyn Su

Sorry that I did not make it claer. The local path is within workspace, i.e. %workspace%/reg.

Friendly ping. The issue is not resolved yet in Bazel 7.0.1. To repro, can `bazel build --config=bzlmod --lockfile_mode=update` using https://github.com/BoleynSu-Org/monorepo/

This can be solved by defining two toolchain_type for the toolchain. `toolchain_type(name="tool")` and `toolchain_type(name="runtime")`. We already do this for Python and Java.

@EdSchouten there is no hack. Using transition for this is more hacky to me. Basically, ```py toolchain_type(name="tool") toolchain_type(name="runtime") runtime_rule = rule(binary = label(cfg = "target")) tool_rule = rule(binary = label(cfg...

The above is also what I proposed in https://github.com/aspect-build/bazel-lib/issues/747 which is to solve the exactly the same issue you want to solve in https://github.com/bazel-contrib/rules_oci/pull/590

For the runtime toolchain, the binary is only supposed to be used in the output and should not be used to run actions. Unless the output is used as exec...

@EdSchouten For example, ```python jq_binary = rule(use jq_runtime_toolchain's binary as output) jq_binary(name="jq") # if you build :jq, you will get a binary for your target platform genrule( # if you...

> The way toolchain() is called, this is basically saying: "Behold! Here is a copy of jq that can be executed on any platform, and is capable of targeting Linux."...

See https://github.com/aspect-build/bazel-lib/pull/875 for how it can be simplified. > You're basically suggesting that every "tool" toolchain should declare/register two toolchains, Not very toolchain, only those who want to be used...

> As described https://github.com/bazelbuild/bazel/issues/19645#issuecomment-2144311028 in this github comment thread, the toolchain author can't know if their toolchain is going to be used in a test/run (cfg=target), or used directly in...