experimental_action_listener config variable is set to "null" instead of "[]" in exec configuration #16911
Labels
team-Configurability
platforms, toolchains, cquery, select(), config transitions
type: bug
untriaged
Description of the bug:
In the configuration associated with
CoreOptions
there is a configuration valueexperimental_action_listener: []
associated with the (deprecated) command-line flag--experimental_action_listener
. We do not use this functionality, and have no desire to do so.Unfortunately, after any transition to
exec
configuration, this value appears to change from[]
tonull
, and there is no way to transition it back from Starlark code.The reason this is a problem is related to our desire to perform "unifying transitions" as discussed in #14023 and #14236. All of the other config set by "exec" can be controlled manually from a Starlark transition, but because this particular flag is "experimental" we can't reset it to
[]
, so we end up with two different configuration hashes for the same configuration, and Bazel ends up building those targets and everything they depend on twice without reason.This should be a small one-line fix, and is a blocker for many of the benefits of
--experimental_output_directory_naming_scheme=diff_against_baseline
, and possibly for moving to Bazel 6.x entirely, so it would be nice to get this fix backported as well.I believe the simplest fix is a one-line change here to construct an empty list, although more complicated solutions are possible: https://github.com/bazelbuild/bazel/blob/release-6.0.0rc4/src/main/java/com/google/devtools/build/lib/analysis/config/ExecutionTransitionFactory.java#L131-L132
What's the simplest, easiest way to reproduce this bug? Please provide a minimal example if possible.
bazel cquery "filter(rule1, deps(:all))"
This returns two different config hashes, use
diff
onbazel config
to show the issueNote that we're not concerned with any of the other changes in this list since they are all controllable by Starlark
Which operating system are you running Bazel on?
Ubuntu 18.04
What is the output of
bazel info release
?release 6.0.0rc4
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 master; 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?
Tagging @gregestren @sdtwigg and the Configurability team
The text was updated successfully, but these errors were encountered: