hedronvision / bazel-compile-commands-extractor

Goal: Enable awesome tooling for Bazel users of the C language family.
Other
697 stars 115 forks source link

Unable to specify a `target_pattern_file` #207

Open FBorowiec opened 3 months ago

FBorowiec commented 3 months ago

Hi! First of all let me tell you your tool is very useful and I've been relying on it for all my c++ Bazel projects! :)

As far as I understood the refresh_bazel_commands requires a target list otherwise it will default to all the targets in the main workspace: hedronvision/bazel-compile-commands-extractor/refresh_compile_commands.bzl#L70

I would like to use the target_pattern_file with the list of targets I want to build bazel.build/reference/command-line-reference#flag--target_pattern_file

As per the docu: If set, build will read patterns from the file named here, rather than on the command line. It is an error to specify a file here as well as command-line patterns.

Currently I load all my targets into a separate .bzl file that contains a dict of the same targets as my target file (with the proper configs)

Is there a way of doing that?