bazel-contrib / bazel-contrib/rules_go

go_binary creates wrong header for cgo_export

Open
#2,971 1 comment 1 reaction 0 assignees View on GitHub
cgo
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.28

### What version of gazelle are you using?

0.23

### What version of Bazel are you using?

4.1

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

Yes

### What operating system and processor architecture are you using?

Linux, amd64

### Any other potentially useful information about your toolchain?

### What did you do?

Trying to compile a cgo library with the associated header

### What did you expect to see?

The header file should be the one generated from the current package, named package.h

### What did you see instead?

The header file is the one generated from the lowest dependency of the package, incorrectly named package.h

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the cgo library build described in the issue on Linux amd64 with rules_go 0.28, Gazelle 0.23, and Bazel 4.1. Compare the generated cgo_export header with the current package and its lowest dependency; done means the current package's header is selected and named package.h.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.