bazel icon indicating copy to clipboard operation
bazel copied to clipboard

Can we make aquery support --target_pattern_file parameters?

Open st0rm23 opened this issue 1 year ago • 1 comments

Description of the feature request:

Currently, we are not able to execute bazel aquery with --target_pattern_file options. It is not very convenience when we have large number of target to query.

The current execution result is empty

bazel aquery --target_pattern_file=/tmp/targets
Loading:

Which category does this issue belong to?

No response

What underlying problem are you trying to solve with this feature?

we hope aquery can query a list of targets

Which operating system are you running Bazel on?

Ubuntu 20.04

What is the output of bazel info release?

6.4.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 HEAD ?

No response

Have you found anything relevant by searching the web?

no

Any other information, logs, or outputs that you want to share?

No response

st0rm23 avatar Apr 19 '24 08:04 st0rm23

I found a workaround. use --query_file option to construct something like deps(//target_a + //target_b + ...)

But it is not very easy to use, query_file does not support multiple lines and does not support - (exclude) operator

st0rm23 avatar Apr 19 '24 09:04 st0rm23

Thanks for filing the feature request. Realistically speaking we're not planning to support this, since it does not fit very nicely with our existing query/filter syntax.

joeleba avatar May 28 '24 08:05 joeleba