From 4706a513acc1f6e5125b476936060ff71bfb8723 Mon Sep 17 00:00:00 2001 From: Fabian Meumertzheim Date: Wed, 11 Oct 2023 20:28:24 +0200 Subject: [PATCH] Include `go.env` in `//go` runfiles (#3722) Speculative fix for user reports of this error message showing up when using `//go`, which indicates that `go.env` is missing: ``` GOPROXY list is not the empty string, but contains no entries ``` Adding `go.env` to the `tools` files of the SDK rather than creating a new field on `GoSDK` for it may end up fixing latent bugs. --- go/private/BUILD.sdk.bazel | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/go/private/BUILD.sdk.bazel b/go/private/BUILD.sdk.bazel index 103bc44952..325ae4046c 100644 --- a/go/private/BUILD.sdk.bazel +++ b/go/private/BUILD.sdk.bazel @@ -31,7 +31,17 @@ filegroup( srcs = glob([ "pkg/tool/**", "bin/gofmt*", - ]), + ]) + [ + ":config", + ], +) + +filegroup( + name = "config", + srcs = glob( + ["go.env*"], + allow_empty = True, + ), ) go_sdk( @@ -82,10 +92,9 @@ filegroup( "bin/go*", "src/**", "pkg/**", - ]) + glob( - ["go.env*"], - allow_empty = True, - ), + ]) + [ + ":config", + ], ) exports_files(