Skip to content

Allow querying for all generated repositories of a given module extension #25599

@adincebic

Description

@adincebic

Description of the feature request:

i want to query for all generated repositories of a given module extension.

Background

Recently I was building a tool which discovers unused swift_library deps and removes them. It also replaces transitive swift_library deps with direct references. To be able to find all available Swift modules, I need to be able to query generated repos.

  1. For a Swift moduleFoo within my repo I ran bazel query 'attr(module_name, "^Foo$", kind("swift_library", //...))' and got target labels that match given criteria.
  2. For a third-party swift module RxSwift I ran bazel query 'attr(module_name, "^RxSwift$", kind("swift_library", //...))' and got no matches as it was made available by rules_swift_package_manager as a generated repo.

It would be useful to be able to query generated repos using bazel query

Which category does this issue belong to?

Core

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

No response

Which operating system are you running Bazel on?

macOS

What is the output of bazel info release?

release 7.5.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 ?


Have you found anything relevant by searching the web?

I asked around on Bazel Slack and was made aware that this is not possible right now.

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

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    P4This is either out of scope or we don't have bandwidth to review a PR. (No assignee)team-OSSIssues for the Bazel OSS team: installation, release processBazel packaging, websitetype: feature request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions