Skip to content

Commit

Permalink
Include go.env in //go runfiles (#3722)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
fmeum authored Oct 11, 2023
1 parent 19ad920 commit 4706a51
Showing 1 changed file with 14 additions and 5 deletions.
19 changes: 14 additions & 5 deletions go/private/BUILD.sdk.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,17 @@ filegroup(
srcs = glob([
"pkg/tool/**",
"bin/gofmt*",
]),
]) + [
":config",
],
)

filegroup(
name = "config",
srcs = glob(
["go.env*"],
allow_empty = True,
),
)

go_sdk(
Expand Down Expand Up @@ -82,10 +92,9 @@ filegroup(
"bin/go*",
"src/**",
"pkg/**",
]) + glob(
["go.env*"],
allow_empty = True,
),
]) + [
":config",
],
)

exports_files(
Expand Down

0 comments on commit 4706a51

Please sign in to comment.