-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
cquery doesn't include artificial toolchain deps in ruleInputs section, but does in configuredRuleInputs #19058
Comments
/cc @gregestren |
Note: I think the core issue here is that To the extend I don't think https://docs.google.com/document/d/1x-RqFFEcGIzVgtYHIq6s6Qt4vYtJWz3nuHIuqeI89dU/edit#heading=h.5mcn15i0e1ch is 100% related - although it's definitely related in the sense that we should have a standardized way to handle and emit toolchain & aspect dependencies. And yes that doc does have a section for We have another feature request bug to embed configurations properly into the proto output. I'm not sure this is the exact same scope but maybe we can find how this might fit in as part of that. |
I don't know this code very well - how much hassle do you think it would be to copy over the flattened targets-reached-via-toolchains into |
I would imagine it's manageable. And a tight change like that to make it consistent with text output sounds reasonable to me (larger API design issues aside). I imagine the change would be in bazel/src/main/java/com/google/devtools/build/lib/query2/cquery/ProtoOutputFormatterCallback.java Line 60 in f309e0f
bazel/src/main/java/com/google/devtools/build/lib/query2/PostAnalysisQueryEnvironment.java Line 505 in f309e0f
I'd think that logic is already included in proto since bazel/src/main/java/com/google/devtools/build/lib/query2/PostAnalysisQueryEnvironment.java Line 465 in f309e0f
|
Thank you for contributing to the Bazel repository! This issue has been marked as stale since it has not had any activity in the last 1+ years. It will be closed in the next 90 days unless any other activity occurs. If you think this issue is still relevant and should stay open, please post any comment here and the issue will no longer be marked as stale. |
This issue has been automatically closed due to inactivity. If you're still interested in pursuing this, please post |
Description of the bug:
See https://github.com/illicitonion/repro-cquery-toolchains-in-ruleinputs
Related to https://docs.google.com/document/d/1x-RqFFEcGIzVgtYHIq6s6Qt4vYtJWz3nuHIuqeI89dU/edit
Currently
deps
cqueries artificially flattens toolchains into nodes for their dependencies to make toolchains appear indeps
queries. However, this flattening isn't performed for therule_inputs
field of the output.Interestingly, they do appear in the
configured_rule_inputs
field.Ideally we'd have a marker node for toolchains in
rule_inputs
, so we can chase edges of the graph from a big query likebazel cquery 'deps(//...)'
.What's the simplest, easiest way to reproduce this bug? Please provide a minimal example if possible.
Clone https://github.com/illicitonion/repro-cquery-toolchains-in-ruleinputs and run:
% bazel cquery --output=jsonproto '//dir:rule' 2>/dev/null
expect to see
//dir:my_toolchain
inruleInputs
but instead see nothing.Which operating system are you running Bazel on?
macOS
What is the output of
bazel info release
?release 6.3.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
Is this a regression? If yes, please try to identify the Bazel commit where the bug was introduced.
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: