From 7937ab5d0d9512f94958a6d39798503d59ff475f Mon Sep 17 00:00:00 2001 From: Fabian Meumertzheim Date: Wed, 8 Jun 2022 08:34:34 +0200 Subject: [PATCH] Replace Label(...).workspace_name with explicit repo name With the repository mappings used by bzlmod, the Label(...).workspace_name construct always returns the canonical, post-repo mapping repo name, which can't be used to construct a valid label. Until https://github.com/bazelbuild/bazel/issues/15593 has been fixed, we have to hardcode the non-canonical repo name here. --- go/private/sdk.bzl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/go/private/sdk.bzl b/go/private/sdk.bzl index 4189d81989..a1e62fa64c 100644 --- a/go/private/sdk.bzl +++ b/go/private/sdk.bzl @@ -233,7 +233,7 @@ def _sdk_build_file(ctx, platform): "{goos}": goos, "{goarch}": goarch, "{exe}": ".exe" if goos == "windows" else "", - "{rules_go_repo_name}": Label("//go/private:BUILD.sdk.bazel").workspace_name, + "{rules_go_repo_name}": "io_bazel_rules_go", }, )