[7.4.0] programmatic error in the cc_shared_library rule
- Dominant language
- Java
- Stars
- 25.8k
- Forks
- 4.6k
- Avg merge
- 2d 20h
- Merged PRs (30d)
- 72
Description
### Description of the bug:
rules_rust CI picks up latest Bazel releases. Since 7.4.0 was released, our CI has been failing with:
```
(18:32:25) ERROR: /Users/buildkite/builds/bk-macos-pln3-ds9s/bazel/rules-rust-rustlang/test/cc_shared_library/BUILD.bazel:19:18: in cc_shared_library rule //test/cc_shared_library:shared:
--
| Traceback (most recent call last):
| File "/virtual_builtins_bzl/common/cc/cc_shared_library.bzl", line 670, column 114, in _cc_shared_library_impl
| File "/virtual_builtins_bzl/common/cc/cc_shared_library.bzl", line 530, column 44, in _filter_inputs
| File "/virtual_builtins_bzl/common/cc/cc_shared_library.bzl", line 79, column 28, in _sort_linker_inputs
| File "/virtual_builtins_bzl/common/cc/cc_shared_library.bzl", line 55, column 9, in _programmatic_error
| Error in fail: Your build has triggered a programmatic error in the cc_shared_library rule. Please file an issue in https://github.com/bazelbuild/bazel : @//test/cc_shared_library:c_lib,@//test/cc_shared_library:rust_lib vs 3
```
See https://buildkite.com/bazel/rules-rust-rustlang/builds/12498#0192ba36-aa5a-49d7-af36-0c85e2c50257 for an example.
Repro by cloning https://github.com/bazelbuild/rules_rust at 113439296e4c264aa4ac7fe49f35eb52f0c95dcb and running: `USE_BAZEL_VERSION=7.4.0 bazel test test/cc_shared_library/...`
7.3.2 passes cleanly.
### Which category does this issue belong to?
C++ Rules
### What's the simplest, easiest way to reproduce this bug? Please provide a minimal example if possible.
Clone https://github.com/bazelbuild/rules_rust at 113439296e4c264aa4ac7fe49f35eb52f0c95dcb and run: `USE_BAZEL_VERSION=7.4.0 bazel test test/cc_shared_library/...`
### Which operating system are you running Bazel on?
Any
### What is the output of `bazel info release`?
release 7.4.0
### If `bazel info release` returns `development version` or `(@non-git)`, tell us how you built Bazel.
_No response_
### What's the output of `git remote get-url origin; git rev-parse HEAD` ?
```text
origin git@github.com:bazelbuild/rules_rust.git (fetch)
origin git@github.com:bazelbuild/rules_rust.git (push)
113439296e4c264aa4ac7fe49f35eb52f0c95dcb
```
### If this is a regression, please try to identify the Bazel commit where the bug was introduced with bazelisk --bisect.
c1183081083d01cbd088c9fa352812a5f5d4408d
### Have you found anything relevant by searching the web?
_No response_
### Any other information, logs, or outputs that you want to share?
cc @fmeum
Contributor guide
Assessment
This issue has not been assessed yet.