Skip to content

bazel: rename io_bazel_rules_go to rules_go - #46926

Draft
phlax with Copilot wants to merge 2 commits into
mainfrom
copilot/rename-io-bazel-rules-go
Draft

bazel: rename io_bazel_rules_go to rules_go#46926
phlax with Copilot wants to merge 2 commits into
mainfrom
copilot/rename-io-bazel-rules-go

Conversation

Copilot AI commented Aug 24, 2026

Copy link
Copy Markdown
Contributor

This updates Envoy’s last major pre-bzlmod repository rename from io_bazel_rules_go to rules_go, matching the BCR module name. The change also preserves WORKSPACE-era compatibility for transitive deps that still hardcode @io_bazel_rules_go.

  • Repository rename + metadata alignment

    • Renames the root external repo from io_bazel_rules_go to rules_go.
    • Updates Bazel metadata to use rules_go as the canonical key while retaining the legacy apparent name where dependency metadata expects it.
    • Drops the repo_name = "io_bazel_rules_go" override in api/MODULE.bazel so bzlmod uses rules_go directly.
  • Direct label migration

    • Rewrites in-repo loads and label references from @io_bazel_rules_go//... to @rules_go//....
    • Covers API build logic, injected BUILD content, dynamic module test data, and Go BUILD files under contrib/ and related test fixtures.
  • WORKSPACE-side compatibility shims

    • Keeps _go_deps() backward-compatible with both io_bazel_rules_go and rules_go in skip_targets.
    • Adds repo_mapping = {"@io_bazel_rules_go": "@rules_go"} to external repos known to consume rules_go transitively, including:
      • gazelle
      • rules_proto_grpc
      • googleapis
      • com_envoyproxy_protoc_gen_validate
      • com_github_chrusty_protoc_gen_jsonschema
      • CEL-related repos
      • Envoy go_repository(...) declarations in root and mobile dependency macros
  • Generated / injected repo fixes

    • Updates API-injected BUILD snippets to load from @rules_go.
    • Adds a small rules_go patch so WORKSPACE-generated toolchain/dependency repos emit @rules_go instead of @io_bazel_rules_go.
    • Adds a focused googleapis patch so its generated imports repo resolves Go rules through @rules_go as well.

Example of the label transition applied throughout the tree:

load("@rules_go//go:def.bzl", "go_library")
load("@rules_go//proto:def.bzl", "go_proto_library")

@repokitteh-read-only

Copy link
Copy Markdown

As a reminder, PRs marked as draft will not be automatically assigned reviewers,
or be handled by maintainer-oncall triage.

Please mark your PR as ready when you want it to be reviewed!

🐱

Caused by: #46926 was opened by Copilot.

see: more, trace.

Co-authored-by: phlax <454682+phlax@users.noreply.github.com>
Copilot AI changed the title [WIP] Rename io_bazel_rules_go to rules_go for consistency bazel: rename io_bazel_rules_go to rules_go Aug 24, 2026
Copilot AI requested a review from phlax August 24, 2026 21:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants