bazel-contrib / bazel-contrib/rules_go

Broken link in repositories.bzl - causes spurious warning

Open
#3,784 0 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

rules_go v0.43.0
gazelle v0.34.0
Bazel v6.4.0

The issue was introduces around v0.43.0, though it may not be rules_go fault.

When building/running go program the following warning appears in the log:
> WARNING: Download from https://mirror.bazel.build/github.com/golang/sys/archive/refs/tags/v0.14.0.zip failed: class java.io.FileNotFoundException GET returned 404 Not Found

Upstream (that is GitHub) has that file, but mirror.bazel.build somehow forgot to fetch it.

When doing silent builds for testing this breaks things. Even with "--ui_event_filters=-info,-stdout,-stderr --noshow_progress" passed, the warning creeps into the output and breaks it.

I believe, the following location is responsible:
https://github.com/bazelbuild/rules_go/blob/d9fb4f9854458e3d2b254f6e037678e978313f3d/go/private/repositories.bzl#L110

Contributor guide

Open the contributing guide

Research direction

Inspect go/private/repositories.bzl around line 110 and reproduce the warning with rules_go v0.43.0, Gazelle v0.34.0, and Bazel v6.4.0. Trace the golang/sys v0.14.0 archive reference and verify that a silent build no longer emits the mirror.bazel.build 404 warning.

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
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.