Skip to content

Can we support inputs filter in bazel aquery? #93

Open
@xinzhengzhang

Description

@xinzhengzhang

Bazel's aquery functions can combine many interesting usage.
In my case, I am writing an extension integrating with compile_commands based on file granularity and I need a file filter from the root target.

I have done a commit xinzhengzhang@56e4147 since the target configuration is a dictionary now I have not consider the use case of multiple targets.
Back to the issue, do we need to support this feature? If there is any suggestion how to design the interface? I'd be happy to implement it.

refresh_compile_commands(
  name = "refresh_compile_commands",
  targets = {
    "//path:target": ""
  },
  # This string will vary depending on the file opened by the extension
  input_filter = "a/b/c/file.c",
  tags = ["manual"],
)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions