From a198e008caef9582e229a98ee977ab5ca30d73aa Mon Sep 17 00:00:00 2001 From: Morten Mjelva Date: Sun, 19 May 2024 10:39:56 +0200 Subject: [PATCH] Do not load go_dependencies() in bzlmod extension (#221) * Debug issue with importing from monorepo * Do not load legacy go deps in extensions.bzl * Run bazel mod tidy --- MODULE.bazel | 4 +--- snapshots/extensions.bzl | 3 --- 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/MODULE.bazel b/MODULE.bazel index c62adb8e..dda34ed6 100644 --- a/MODULE.bazel +++ b/MODULE.bazel @@ -9,7 +9,6 @@ bazel_dep(name = "rules_go", version = "0.47.1", repo_name = "io_bazel_rules_go" go_deps = use_extension("@bazel_gazelle//:extensions.bzl", "go_deps") go_deps.from_file(go_mod = "//:go.mod") - use_repo( go_deps, "com_github_olekukonko_tablewriter", @@ -21,9 +20,8 @@ use_repo( "org_golang_google_grpc", ) -snapshots = use_extension("@com_cognitedata_bazel_snapshots//snapshots:extensions.bzl", "snapshots") +snapshots = use_extension("//snapshots:extensions.bzl", "snapshots") snapshots.toolchains(from_source = True) - use_repo( snapshots, "snapshots_snaptool_toolchains", diff --git a/snapshots/extensions.bzl b/snapshots/extensions.bzl index 9b798ecb..2b4dbbc7 100644 --- a/snapshots/extensions.bzl +++ b/snapshots/extensions.bzl @@ -1,4 +1,3 @@ -load("@com_cognitedata_bazel_snapshots//snapshots:dependencies.bzl", "go_dependencies") load("@com_cognitedata_bazel_snapshots//snapshots:repositories.bzl", "snapshots_register_toolchains") toolchains = tag_class(attrs = { @@ -17,8 +16,6 @@ toolchains = tag_class(attrs = { # buildifier: disable=unused-variable def _snapshots_extension(module_ctx): - go_dependencies() - registrations = {} for mod in module_ctx.modules: for toolchains in mod.tags.toolchains: