You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When we have something like package(default_visibility=["//visibility:public"]) at the top of a build file, and the targets in the build file does not have visibility attribute defined, Bazel query result has visibility in all file targets but not rule targets.
This affects the availability to calculate target hash from query result like this, because we want the target hash to change when visibility of a target changes
What's the simplest, easiest way to reproduce this bug? Please provide a minimal example if possible.
Try additionally passing --xml:default_values. I did that on a simpler example and it worked for me.
This affects the availability to calculate target hash from query result like #7962 (comment), because we want the target hash to change when visibility of a target changes
Ack. I appreciate the context :)
You may be interested in --proto:include_synthetic_attribute_hash.
haxorz
changed the title
package default visibility does not appear in the query result of a rule target
package default visibility does not appear in the --output=xml query result of a rule target
Feb 6, 2023
Description of the bug:
When we have something like
package(default_visibility=["//visibility:public"])
at the top of a build file, and the targets in the build file does not havevisibility
attribute defined, Bazel query result has visibility in all file targets but not rule targets.This affects the availability to calculate target hash from query result like this, because we want the target hash to change when visibility of a target changes
What's the simplest, easiest way to reproduce this bug? Please provide a minimal example if possible.
bazel query --output=xml //foo:all-targets
:Which operating system are you running Bazel on?
macOS
What is the output of
bazel info release
?release 6.0.0-homebrew
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?
No response
The text was updated successfully, but these errors were encountered: