-
Notifications
You must be signed in to change notification settings - Fork 4.4k
Closed
Labels
P2We'll consider working on this in future. (Assignee optional)We'll consider working on this in future. (Assignee optional)incompatible-changeIncompatible/breaking changeIncompatible/breaking changeteam-Configurabilityplatforms, toolchains, cquery, select(), config transitionsplatforms, toolchains, cquery, select(), config transitions
Description
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
- If you have a
$ bazel test //:mytest --run_under=//:runnercommand, add--incompatible_bazel_test_exec_run_under.
If this fails, that means //:runner configures itself with target config information. This might be:
- reads target platform properties from
--platforms - reads
--defineor--//fooflags that don't propagate from the target to exec config - has a
select()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 some data 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
Motivation: #22624
TODO List
- Implement the incompatible change at Bazel HEAD and guard it behind a flag.
- Test the incompatible change with downstream projects and inform broken projects.
- Flip the incompatible flag at Bazel HEAD.
- Delete the incompatible flag and the old behavior at Bazel HEAD.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
P2We'll consider working on this in future. (Assignee optional)We'll consider working on this in future. (Assignee optional)incompatible-changeIncompatible/breaking changeIncompatible/breaking changeteam-Configurabilityplatforms, toolchains, cquery, select(), config transitionsplatforms, toolchains, cquery, select(), config transitions