bazel-contrib / bazel-contrib/rules_go

Very slow when install go_sdk

Open
#3,221 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
Go
Stars
1.5k
Forks
760
Avg merge
1d 11h
Merged PRs (30d)
12

Description

### What version of rules_go are you using?

0.33.0

### What version of gazelle are you using?

### What version of Bazel are you using?

5.2.0

### Does this issue reproduce with the latest releases of all the above?

Not related

### What operating system and processor architecture are you using?

Linux

### Any other potentially useful information about your toolchain?

No

### What did you do?

grpc/grpc makes use of rules_go for grpc_extra_deps function. To accelerate downloading, I configure it to use an internal site as documented [go_download_sdk](https://github.com/bazelbuild/rules_go/blob/master/go/toolchains.rst#go_download_sdk)

```
go_download_sdk(
name = "go_sdk",
version = "1.18",
urls = [
"https://mirrors.aliyun.com/golang/{}",
],
)
go_rules_dependencies()
go_register_toolchains()
```

But it seems that the script takes **1 minute** before starting to download

### What did you expect to see?

Using internal go_sdk should be very fast

### What did you see instead?

It takes roughly 1 minute before actually downloading go_sdk

Fetching @go_sdk; Finding Go SHA-256 sums 53s

Contributor guide

Open the contributing guide

Research direction

Start with the go_download_sdk entry point and its documentation in go/toolchains.rst, then trace the source of the 53-second “Finding Go SHA-256 sums” phase. Reproduce the grpc/grpc configuration with Bazel 5.2.0 and rules_go 0.33.0; done means the configured mirror downloads without the unexplained delay.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
build-system
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.