From 6637ea8eaf275a9a1192a765bfa5f87b8b1dc852 Mon Sep 17 00:00:00 2001 From: Tyler French <66684063+tyler-french@users.noreply.github.com> Date: Mon, 1 May 2023 04:37:56 -0400 Subject: [PATCH] remove circular override hack (#1515) --- MODULE.bazel | 2 +- internal/bzlmod/go_deps.bzl | 5 +---- tests/bcr/MODULE.bazel | 2 +- 3 files changed, 3 insertions(+), 6 deletions(-) diff --git a/MODULE.bazel b/MODULE.bazel index 6ef8ac37d..51b41f0cc 100644 --- a/MODULE.bazel +++ b/MODULE.bazel @@ -6,7 +6,7 @@ module( bazel_dep(name = "bazel_skylib", version = "1.3.0") bazel_dep(name = "protobuf", version = "3.19.6", repo_name = "com_google_protobuf") -bazel_dep(name = "rules_go", version = "0.38.1", repo_name = "io_bazel_rules_go") +bazel_dep(name = "rules_go", version = "0.39.1", repo_name = "io_bazel_rules_go") bazel_dep(name = "rules_proto", version = "4.0.0") go_sdk = use_extension("@io_bazel_rules_go//go:extensions.bzl", "go_sdk") diff --git a/internal/bzlmod/go_deps.bzl b/internal/bzlmod/go_deps.bzl index f26ac010d..b17e86669 100644 --- a/internal/bzlmod/go_deps.bzl +++ b/internal/bzlmod/go_deps.bzl @@ -56,10 +56,7 @@ def _report_forbidden_override(module, tag_class, attribute = None): return message + _DIRECTIVES_CALL_TO_ACTION def _fail_on_non_root_overrides(module, tag_class, attribute = None): - # TODO: Gazelle and the "rules_go" module depend on each other circularly. - # Tolerate overrides in the latter module until we can update it to no - # longer need them. - if module.is_root or module.name == "rules_go": + if module.is_root: return tags = getattr(module.tags, tag_class) diff --git a/tests/bcr/MODULE.bazel b/tests/bcr/MODULE.bazel index 71f5bd00b..fe0d242c5 100644 --- a/tests/bcr/MODULE.bazel +++ b/tests/bcr/MODULE.bazel @@ -8,7 +8,7 @@ local_path_override( path = "../..", ) -bazel_dep(name = "rules_go", version = "0.38.1") +bazel_dep(name = "rules_go", version = "0.39.1") go_deps = use_extension("@gazelle//:extensions.bzl", "go_deps")