Skip to content

bzlmod has no way to show all repos #27224

@dws

Description

@dws

Description of the feature request:

Under WORKSPACE, we can

bazel query --output=build //external:all-targets

There is no equivalent to this under bzlmod. Under bzlmod we can

bazel mod show_repo <repo>

for a single repo. But there is no way to get show_repo to show all the repos.

The closest thing I have found under bzlmod is

bazel fetch --all --experimental_repository_resolved_file=<outputfile>

but (a) this is extremely slow (it can take an hour to run in my repo), and (b) it does not report all the repos. An example of the latter is that in a repo whose MODULE.bazel is just

bazel_dep(name = "curl", version = "8.11.0")

the output from bazel fetch --all --experimental_repository_resolved_file=resolved.xxx does not include anything about the curl repo.

Which category does this issue belong to?

External Dependency

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

I need a way to enumerate all the definitions of all the repos, so that I can obtain all their URLs, so that I can mirror those URLs locally.

Which operating system are you running Bazel on?

Ubuntu 24.04

What is the output of bazel info release?

release 8.4.1

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?

no

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

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2We'll consider working on this in future. (Assignee optional)team-ExternalDepsExternal dependency handling, remote repositiories, WORKSPACE file.type: feature request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions