-
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)team-Configurabilityplatforms, toolchains, cquery, select(), config transitionsplatforms, toolchains, cquery, select(), config transitionstype: bug
Description
Description of the bug:
I have code which runs a cquery to gets the executable of a FilesToRunProvider:
bazel cquery --output=starlark --starlark:expr="providers(target).get(\"FilesToRunProvider\").executable.path"
This doesn't work for alias targets which point to binary targets. It probably should.
What's the simplest, easiest way to reproduce this bug? Please provide a minimal example if possible.
BUILD file:
py_binary(
name = "bin",
srcs = ["bin.py"],
)
alias(
name = "alias",
actual = ":bin",
)Run: bazel cquery --output=starlark --starlark:expr="providers(target).get(\"FilesToRunProvider\").executable.path" :alias
expect to get an output path. Instead, get an error because providers(target).get("FilesToRunProvider") is None.
Which operating system are you running Bazel on?
No response
What is the output of bazel info release?
release 6.1.0
If bazel info release returns development 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?
No response
brentleyjones
Metadata
Metadata
Assignees
Labels
P2We'll consider working on this in future. (Assignee optional)We'll consider working on this in future. (Assignee optional)team-Configurabilityplatforms, toolchains, cquery, select(), config transitionsplatforms, toolchains, cquery, select(), config transitionstype: bug