Skip to content
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

Add --output=files mode to cquery #15955

Closed
wants to merge 1 commit into from

Commits on Jul 22, 2022

  1. Add --output=files mode to cquery

    With the new output mode `--output=files`, cquery lists all files advertised by the matched targets in the currently requested output groups.
    
    This new mode has the following advantages over `--output=starlark` combined with an appropriate handcrafted `--starlark:expr`:
    * provides a canonical answer to the very common "Where are my build outputs?" question
    * is more friendly to new users as it doesn't require knowing about providers and non-BUILD dialect Starlark
    * takes the value of `--output_groups` into account
    * stays as close to the logic for build summaries printed by `bazel build` as possible
    
    Fixes bazelbuild#8739
    
    RELNOTES: `cquery`'s new output mode [`--output=files`](https://bazel.build/docs/cquery#files-output) lists the output files of the targets matching the query. It takes the current value of `--output_groups` into account.
    
    Closes bazelbuild#15552.
    
    PiperOrigin-RevId: 462630629
    Change-Id: Ic648f22aa160ee57b476180561b444f08799ebb6
    fmeum authored and ckolli5 committed Jul 22, 2022
    Configuration menu
    Copy the full SHA
    2754b02 View commit details
    Browse the repository at this point in the history