bazel-contrib / bazel-contrib/rules_go
go_library fails to build with `no-remote-exec` tag and `--experimental_allow_tags_propagation`
- 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?
v0.26.0
### What version of gazelle are you using?
v0.23.0
### What version of Bazel are you using?
4.0.0
### 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?
Using BuildBarn remote execution. The same `bazelrc` as [here](https://github.com/buildbarn/bb-deployments/blob/da2d518b0ab83b8c3c407d2e21f80e4d19e4db38/bazelrc).
### What did you do?
Given a `go_library` which depends on any `cc_library`, the build will succeed under normal conditions.
Adding a no remote execution tag to the `go_library` also works.
```py3
tags = ["no-remote-exec"]
```
However when using [experimental_allow_tags_propagation](https://docs.bazel.build/versions/master/command-line-reference.html#flag--experimental_allow_tags_propagation), it breaks.
### What did you expect to see?
A successful build.
### What did you see instead?
```sh
INFO: Found 1 test target...
ERROR: /work/test/integration/BUILD.bazel:3:8: GoLink test/integration/integration_test_/integration_test failed: (Exit 1): builder failed: error executing command bazel-out/host/bin/external/go_sdk/builder '-param=bazel-out/k8-fastbuild/bin/test/integration/integration_test_/integration_test-0.params' -- -extld /usr/local/bin/clang -s -w -X ... (remaining 4 argument(s) skipped)
external/go_sdk/pkg/tool/linux_amd64/link: running /usr/local/bin/clang failed: fork/exec /usr/local/bin/clang: no such file or directory
link: error running subcommand external/go_sdk/pkg/tool/linux_amd64/link: exit status 2
Target //test/integration:integration_test failed to build
Use --verbose_failures to see the command lines of failed build steps.
INFO: Elapsed time: 115.873s, Critical Path: 2.65s
INFO: 6 processes: 2 internal, 4 local.
FAILED: Build did NOT complete successfully
//test/integration:integration_test FAILED TO BUILD
FAILED: Build did NOT complete successfully
```
Contributor guide
Research direction
Start by reproducing the failure in test/integration/BUILD.bazel:3:8 with rules_go v0.26.0, Gazelle v0.23.0, Bazel 4.0.0, the linked BuildBarn bazelrc, and --experimental_allow_tags_propagation. Compare builds with and without the no-remote-exec tag and inspect how the go_library dependency on cc_library is handled. Done means the integration target builds successfully with the tag and flag enabled.
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