D3 — a repo name CHOSEN on a SHARED extension must be namespaced
Dev-dep & toolchains · gates/d3_unnamespaced_extension_repo.rq ↗
Why this is an invariant#
From the rules_k8s post-mortem, verbatim: “A module extension’s repos are
shared across the whole module graph, so oci.pull(name = "distroless_static")
here collides with any consumer that pulls a base of that name”. Bazel’s
error is “A repo named distroless_static_linux_amd64 is already generated by
this module extension”. The shipped fix was to prefix with the module name.
Three distinctions carry the whole gate, and getting any of them wrong makes it useless:
- FOREIGN extension only. Apparent repo names are module-scoped, so two
unrelated modules both using
@cratesis not automatically a conflict — only a shared extension instance can collide. - CHOSEN names only.
rust_toolchainsis emitted by the rules_rust extension for everyone, so nobody is choosing it and there is nothing to collide. Flagging it would condemn the documented idiom used by 20+ modules. - NON-DEV usages only. A dev_dependency extension usage is dropped from
every graph but the module’s own, so its repos are never in a consumer’s
graph and cannot collide with anything. This mirrors D2, which has always
split
registersToolchainfromregistersToolchainDev— the projector emitsgate:extDevand this gate simply never read it, so 8 of the 38 findings were modules being told to namespace a repo nobody else can see.
Namespacing is checked against gate:namespacePrefix facts, so rules_jena
naming its Maven repo jena_maven passes.
Findings#
25 findings. Each row is a counterexample — the columns are the query's own, in the order it selects them.
| module | repo | extension |
|---|---|---|
botnoc | crates | @rules_rust//crate_universe:extension.bzl |
fastverk-app | crates | @rules_rust//crate_universe:extension.bzl |
forge | crates | @rules_rust//crate_universe:extension.bzl |
forge | distroless_cc | @rules_oci//oci:extensions.bzl |
fvkit | crates | @rules_rust//crate_universe:extension.bzl |
meridian_chat | npm | @aspect_rules_js//npm:extensions.bzl |
meridian_tui | crates | @rules_rust//crate_universe:extensions.bzl |
meridian_uiview_core | crates | @rules_rust//crate_universe:extensions.bzl |
meridian_web | npm | @aspect_rules_js//npm:extensions.bzl |
rules_agentic_ide | crates | @rules_rust//crate_universe:extension.bzl |
rules_cloudformation | cfn_assembler_maven | @rules_jvm_external//:extensions.bzl |
rules_docker_compose | compose_crates | @rules_rust//crate_universe:extension.bzl |
rules_huggingface | hf_crates | @rules_rust//crate_universe:extension.bzl |
rules_jsonschema | crates | @rules_rust//crate_universe:extension.bzl |
rules_lora | crates | @rules_rust//crate_universe:extension.bzl |
rules_runpod | crates | @rules_rust//crate_universe:extension.bzl |
rules_schema_org | dcterms_ttl | @rules_rdf//rdf:extensions.bzl |
rules_schema_org | schemaorg_ttl | @rules_rdf//rdf:extensions.bzl |
rules_schema_org | skos_rdf | @rules_rdf//rdf:extensions.bzl |
rules_spec | maven | @rules_jvm_external//:extensions.bzl |
tracker | crates | @rules_rust//crate_universe:extension.bzl |
tracker | distroless_cc | @rules_oci//oci:extensions.bzl |
vpn | crates | @rules_rust//crate_universe:extension.bzl |
vpn | distroless_java | @rules_oci//oci:extensions.bzl |
wave | crates | @rules_rust//crate_universe:extension.bzl |