bazel-contrib / bazel-contrib/rules_go

Confusing documentation on recommended race detector usage

Open
#2,403 1 comment 1 reaction 0 assignees View on GitHub
documentation go
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?

v0.22.1

### What did you do?

I'm just trying to understand the recommended usage for the race detector and `go_test`.

### What did you expect to see?

Consistent documentation and or an explanation behind the recommended usage.

### What did you see instead?

The "Using the race detector" subsection of `modes.rst` recommends the following in regards to using the race detector globally:

> but in general it is strongly recommended instead to turn it on for specific tests

https://github.com/bazelbuild/rules_go/blob/v0.22.1/go/modes.rst#using-the-race-detector

However the `core.rst` documentation for `go_test` race attribute has the following:

> In most cases, it's better to enable race detection globally with --features=race on the command line.

https://github.com/bazelbuild/rules_go/blob/v0.22.1/go/core.rst#go_test

So it would be nice to have an explanation for either or both recommendations.

Contributor guide

Open the contributing guide

Research direction

Compare the “Using the race detector” subsection in go/modes.rst with the go_test race attribute documentation in go/core.rst. Read both recommendations and determine what explanation or wording is needed to make them consistent. Done means the documentation clearly explains when to use global versus test-specific race detection.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
documentation
Issue type
Documentation
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.