--incompatible_bazel_test_exec_run_under #23179
Labels
incompatible-change
Incompatible/breaking change
P2
We'll consider working on this in future. (Assignee optional)
team-Configurability
platforms, toolchains, cquery, select(), config transitions
Motivation
$ bazel test //:mytest --run_under=//:runner
will call//:runner
on an exec machine.Bazel currently configures it for the target platform, which is incorrect.
Description
With this flag,
//:runner
is configured for the exec platform, where it actually runs.Incompatible Flag
--incompatible_bazel_test_exec_run_under
Migration Guide
$ bazel test //:mytest --run_under=//:runner
command, add--incompatible_bazel_test_exec_run_under
.If this fails, that means
//:runner
configures itself with target config information. This might be:--platforms
--define
or--//foo
flags that don't propagate from the target to exec configselect()
on any of the above.Since
//:runner
is an execution tool, refactor it so it doesn't have target config dependencies. This may require moving target-configured deps (like somedata
binary) to//:mytest
and having the test reference them from there.In which Bazel LTS version will this incompatible change be enabled?
Bazel 8
Additional Context
Motivatin: #22624
TODO List
The text was updated successfully, but these errors were encountered: