Config transition turns label-type attributes into lists #15892
Labels
P3
We're not considering working on this, but happy to review a PR. (No assignee)
team-Configurability
Issues for Configurability team
type: documentation (cleanup)
Description of the bug:
Setting
cfg
with a transition inattr.Label
makesctx.attr.<attribute>
return a label list instead of a single label. See example below.It's quite possible that this is intended behavior. Certainly for a one-to-many transition it would need to have this effect. In that case this is really a documentation problem, because it certainly isn't obvious that changing the configuration should change the type of the attribute value (and in fact the docs for the
cfg
parameter make no mention of transitions, though it does link to the docs on configurations, which do, but still don't mention anything about the type change).What's the simplest, easiest way to reproduce this bug? Please provide a minimal example if possible.
WORKSPACE
:BUILD.bazel
:my_rule.bzl
:Which operating system are you running Bazel on?
linux
What is the output of
bazel info release
?release 5.2.0
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?
Open issue tracking documentation (and lack thereof) for transitions:
#8377
Any other information, logs, or outputs that you want to share?
No response
The text was updated successfully, but these errors were encountered: