bazel-contrib / bazel-contrib/rules_go

setting GOEXPERIMENT env var is ignored

Open
#3,453 0 comments 1 reaction 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.38.1

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

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

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

### What operating system and processor architecture are you using?
linux/amd64 and darwin/arm64

### Any other potentially useful information about your toolchain?
n/a

### What did you do?
Setting GOEXPERIMENT environment variables weren't being respected by rules go. Dug into it, and GOEXPERIMENT environment value is not respected by rules_go, because it's directly resetting it via os.Setenv() in compilepkg.go.

### What did you expect to see?
GOEXPERIMENT env var getting respected.

### What did you see instead?
GOEXPERIMENT env var not getting respected.

Contributor guide

Open the contributing guide

Research direction

Start in compilepkg.go, where the issue reports that os.Setenv() resets GOEXPERIMENT. Reproduce the behavior with GOEXPERIMENT set on one of the listed platforms, then verify that the environment value is respected; done means rules_go no longer ignores the variable.

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
Clearly specified
Newbie friendliness
50/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.