Skip to content

cquery doesn't include artificial toolchain deps in ruleInputs section, but does in configuredRuleInputs #19058

Closed as not planned
coderabbit-test/bazel
#22
@illicitonion

Description

@illicitonion

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 in deps queries. However, this flattening isn't performed for the rule_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 like bazel 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 in ruleInputs 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 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

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3We're not considering working on this, but happy to review a PR. (No assignee)staleIssues or PRs that are stale (no activity for 30 days)team-Configurabilityplatforms, toolchains, cquery, select(), config transitionstype: bug

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions