Skip to content

Honor exact Bazel filters without workspace-wide target discovery#1085

Open
meyers-oai wants to merge 1 commit intoperipheryapp:masterfrom
meyers-oai:bazel-filter-scope-query
Open

Honor exact Bazel filters without workspace-wide target discovery#1085
meyers-oai wants to merge 1 commit intoperipheryapp:masterfrom
meyers-oai:bazel-filter-scope-query

Conversation

@meyers-oai
Copy link

In Bazel mode, Periphery currently runs a broad target discovery query before applying --bazel-filter. That means even an exact label filter like //:app$ still requires the workspace to be bazel query //... clean. This breaks down in larger monorepos where a specific target is buildable, but unrelated packages fail to load during broad queries. For exact single-target label filters, Periphery does not need that discovery step.

This PR updates Periphery so that when --bazel-filter is an exact single-target label, it skips the broad discovery query and uses that label directly. More complex filters continue to behave as before.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant