bazel-contrib / bazel-contrib/rules_go

Latest versions of repositories in rules_go/go/private/repositories.bzl do not exist in mirror.bazel.build

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

Description

### What version of rules_go are you using?
0.39.0

### What version of gazelle are you using?
0.29.0

### What version of Bazel are you using?
6.1

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

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

### Any other potentially useful information about your toolchain?
N/A

### What did you do?

Running `bazel build` for any target that depends on rules_go, I noticed that most of the repository dependencies in `rules_go/go/private/repositories.bzl` do not exist in mirror.bazel.build, which is the first option that http_archive attempts to download. The build are successful because the fallback url works.

A simple test: open the browser and try to download https://mirror.bazel.build/github.com/golang/protobuf/archive/refs/tags/v1.5.3.zip will result in 404 with a `NoSuchKey` error code.

### What did you expect to see?
All urls specified in http_archive in rules_go are valid (so that http download does not have to retry alternative urls by default to succeed)

### What did you see instead?
repository dependencies exists in github.com, but not in mirror.bazel.build (multiple http download attempt required)

Contributor guide

Open the contributing guide

Research direction

Start in rules_go/go/private/repositories.bzl and inspect the http_archive URLs, especially the golang/protobuf v1.5.3 mirror URL cited in the report. Check whether each mirror.bazel.build URL exists, then run a Bazel build using a target that depends on rules_go. Done means the listed mirror URLs resolve without requiring fallback downloads.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.