hedronvision / bazel-compile-commands-extractor

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

Provide more options for filtering targets #212

Open keith opened 2 weeks ago

keith commented 2 weeks ago

Currently there doesn't seem to be a good way to filter out some targets from the compile command generation. In one of our cases we build the same cpp file in N different targets, which all have different include paths, but we only do this in our release archives, and during local development there's a natural default target that has the "correct" arguments (as this is hidden behind macros). In this case it would be nice if I could affect the aquery a bit in order to filter out targets based on something, either names, or tags, or something similar. That way this tool would pick the right one always, currently it can pick the wrong one and then include paths are invalid for most developer workflows.

keith commented 2 weeks ago

Maybe a less complicated version of this would just be if the aquery took into account a custom tag value like no-compile-commands and just always excluded that from the set of targets. Then we could annotate our targets with that flag