-
Notifications
You must be signed in to change notification settings - Fork 4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bazel cannot query //tools #3122
Comments
I think that
|
Is that a bug? |
I think so yea, the docs don't mention anything about stripping workspace names. https://bazel.build/versions/master/docs/query.html#output-package |
FWIW, this is not specific to the @bazel_tools repository. The relevant code is bazel/src/main/java/com/google/devtools/build/lib/query2/output/OutputFormatter.java Line 334 in 8e04230
I think a diff like this would do what you would expect
@kchodorow or @haxorz , do you think this is reasonable? It would break backwards compatibility if someone was depending on this. |
I think you're right and that patch looks correct. |
Subinclude targets' packages are the package containing the load statement. Subinclude targets' labels are the bzl files they refer to. The latter has the appropriate package to display for --output=package. Fixes #3122. PiperOrigin-RevId: 159750840
Description of the problem / feature request / question:
There are a few "virtual" (don't know a better word) packages like
//tools/cpp
, which one can can retrieve withbuildfiles(deps(...)) --output package
. Trying to then query these withkind("source file", deps(//tools/cpp, 1))
does not work however. IMO either they should be totally ignored or work like any other package everywhere.If possible, provide a minimal example to reproduce the problem:
Environment info
bazel info release
): 0.5.0The text was updated successfully, but these errors were encountered: