bazelbuild / bazelbuild/bazel

bazel mod show_* commands only output as text

Open
#24,692 3 comments 1 reaction 0 assignees View on GitHub
area-Bzlmod P3 team-ExternalDeps type: bug
Dominant language
Java
Stars
25.8k
Forks
4.6k
Avg merge
2d 20h
Merged PRs (30d)
72

Description

### Description of the bug:

The `bazel mod show_extension/show_repo` commands support `--output json` and `--output graph` (or at least the commands accept the flag), but the output is always text

### Which category does this issue belong to?

CLI

### What's the simplest, easiest way to reproduce this bug? Please provide a minimal example if possible.

`bazel mod show_extension @aspect_rules_js//npm:extensions.bzl%npm --output json` (or any other activated extension)

### Which operating system are you running Bazel on?

Linux

### What is the output of `bazel info release`?

7.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` ?

_No response_

### If this is a regression, please try to identify the Bazel commit where the bug was introduced with bazelisk --bisect.

_No response_

### Have you found anything relevant by searching the web?

_No response_

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

_No response_

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the issue with bazel mod show_extension and bazel mod show_repo using --output json and --output graph. Trace the CLI entry points for these commands and compare their handling of the requested output mode. Done means both commands emit the selected JSON or graph format instead of text, with tests covering the formats.

Written by the indexing model from the issue text.

Assessment

Domain
build-system, cli
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.