Skip to content

[Bug]: gazelle_python_manifest fails with rules_shell not visible - dev_dependency stripped from BCR release #784

@joeyhkim

Description

@joeyhkim

What happened?

Summary

The gazelle_python_manifest rule fails when using the BCR version of aspect_rules_py because rules_shell is marked as a dev_dependency in MODULE.bazel. This causes it to be stripped from the BCR release, but gazelle_python_manifest depends on sh_binary from rules_shell.

Error

When running bazel run //:gazelle_python_manifest.update with the BCR version:

ERROR: no such package '@@rules_shell+//shell': The repository '@@rules_shell+' could not be resolved:
No repository visible as '@rules_shell' from main repository

Root Cause

In MODULE.bazel, rules_shell is declared as a dev dependency:

bazel_dep(name = "rules_shell", version = "0.4.1", dev_dependency = True)

However, uv/private/manifest/defs.bzl uses sh_binary from rules_shell:

load("@rules_shell//shell:sh_binary.bzl", "sh_binary")

When the module is published to BCR, dev dependencies are stripped, making rules_shell unavailable to consumers who want to use gazelle_python_manifest.

Version

Development (host) and target OS/architectures:

Output of bazel --version:
bazel 8.4.2

Version of the Aspect rules, or other relevant rules from your
WORKSPACE or MODULE.bazel file:
bazel_dep(name = "rules_python", version = "1.8.1")
bazel_dep(name = "aspect_rules_py", version = "1.8.4")

Language(s) and/or frameworks involved:
Pyton

How to reproduce

Any other information?

No response

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions