Skip to content

Commit

Permalink
Revert "go_repository: fix missing default GOPROXY (bazel-contrib#1602)…
Browse files Browse the repository at this point in the history
…" (bazel-contrib#1609)

This reverts commit adce430.

We found an alternative fix to this to this issue in
bazel-contrib/rules_go#3666.
  • Loading branch information
sluongng authored and jeromep-stripe committed Mar 22, 2024
1 parent f59921a commit 37bd075
Showing 1 changed file with 0 additions and 7 deletions.
7 changes: 0 additions & 7 deletions internal/go_repository.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -115,9 +115,6 @@ Authorization: Bearer RANDOM-TOKEN
# We can't disable timeouts on Bazel, but we can set them to large values.
_GO_REPOSITORY_TIMEOUT = 86400

# Default value from `go env GOPROXY`
_GOPROXY_DEFAULT = "https://proxy.golang.org,direct"

def _go_repository_impl(ctx):
# TODO(#549): vcs repositories are not cached and still need to be fetched.
# Download the repository or module.
Expand Down Expand Up @@ -240,10 +237,6 @@ def _go_repository_impl(ctx):

env.update({k: ctx.os.environ[k] for k in env_keys if k in ctx.os.environ})

# Since Go 1.21.0, GOPROXY must be set to a non-empty value.
if "GOPROXY" not in env:
env["GOPROXY"] = _GOPROXY_DEFAULT

if fetch_repo_args:
# Disable sumdb in fetch_repo. In module mode, the sum is a mandatory
# attribute of go_repository, so we don't need to look it up.
Expand Down

0 comments on commit 37bd075

Please sign in to comment.