bazel-contrib / bazel-contrib/rules_go

rules_go + protobufs + experimental_sibling_repository_layout fails to build

Open
#3,947 3 comments 0 reactions 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.48. The issue also reproduces at commit 354a98f4acf2333b7603ede50dd5fbc20ae315b1.

### What version of gazelle are you using?

N/A

### What version of Bazel are you using?

7.1.2

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

Yes

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

Debian-based Linux variant, x86_64 architecture.

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

N/A

### What did you do?

See repro at https://github.com/ted-xie/rules_go_proto_bug. TL;DR building a go_proto_library rule that's part of an external dependency with `--experimental_sibling_repository_layout` fails. Failure message:

```
Could not find file in descriptor database: ../maybe_rules_go_proto_bug~/proto/foo.proto: No such file or directory
```

### What did you expect to see?

I expected the build to succeed.

### What did you see instead?

The build fails due to the go proto compiler not being able to find the proto definition.

/cc @ahumesky

Contributor guide

Open the contributing guide

Research direction

Start with the minimal reproduction at https://github.com/ted-xie/rules_go_proto_bug and run the affected go_proto_library build using Bazel 7.1.2 with --experimental_sibling_repository_layout. Trace why the Go proto compiler cannot resolve ../maybe_rules_go_proto_bug~/proto/foo.proto; done means the external dependency builds successfully and the proto definition is found.

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
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.