Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?

bazel query cheatsheet

which packages depend on qtdb lib?

bazel query 'rdeps(..., //vistar/geo/qtdb:go_default_library)' --output package 

Test all libraries the depend upon //mylibrary

bazel test $(bazel query 'kind(test, rdeps(//..., //mylibrary))')

which packages does qtdb depend on?

bazel query 'deps(//vistar/geo/qtdb:go_default_library)' --output package

which rules are defined in package root?

bazel query 'kind(rule, //:*)' --output label_kind

get BUILD file output from a build artifact

bazel query --noimplicit_deps 'deps(trafficking/ui/selectors.jsar)' --output=build
bazel query --noimplicit_deps 'deps(@docker//:client)' --output=build
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment