bazel-contrib / bazel-contrib/rules_go

bazel coverage //... --features=race not respecting race="off" test targets

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

Description

As the title describes, bazel seems to be executing all `go_tests` with race detection ON if `--features=race` whether or not the target has `race = "off"`.

This is a different behavior from `bazel test //... --features=race` since this respects the `race = "off"` attribute on the `go_test`.

Contributor guide

Open the contributing guide

Research direction

Run `bazel coverage //... --features=race` and compare it with `bazel test //... --features=race`, focusing on go_test targets with `race = "off"`. Done means coverage respects that attribute in the same way as the test command and does not enable race detection for those targets.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
build-system, testing
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 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.