bazel-contrib / bazel-contrib/rules_go

go_library to have a pure attribute

Open
#4,692 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

When a library depends on another library that requires CGO, there is no way for that library to be declared as "pure=off"

The only alternative are to define our own rule with a transition or to mark that go_library as manual to not be trapped by wildcards.

Our bazelrc defaults to pure=on which applies this to every target and we need to declare pure=off on the go_binary but it would be better if the pure=off was set on the go_library that needs to be impure directly

Contributor guide

Open the contributing guide

Research direction

Start at the go_library rule entry point and review how pure is currently handled, using the bazelrc default described in the issue as context. Determine how an impure dependency should be declared directly on a go_library, then verify that the setting is respected when the target is selected through wildcards and built through a dependent go_binary.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
build-system
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
52/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.