bazelbuild / bazelbuild/bazel

Unable to use proto's rules provided by @bazel_tools in Bazel 9

Open
#27,639 4 comments 0 reactions 0 assignees View on GitHub
P3 team-ExternalDeps type: bug
Dominant language
Java
Stars
25.8k
Forks
4.6k
Avg merge
2d 20h
Merged PRs (30d)
72

Description

### Description of the bug:

In Bazel `9.0.0` (rc1, rc2), the build of all `proto_library` rules of the package `@bazel_tools//src/main/protobuf` fails because the repository `@com_github_grpc_grpc` is not visible/defined.

No problem in Bazel `8.4` and `7.7`.

### Which category does this issue belong to?

External Dependency

### What's the simplest, easiest way to reproduce this bug? Please provide a minimal example if possible.

``` shell
$ USE_BAZEL_VERSION=9.0.0rc2 bazel build @bazel_tools//src/main/protobuf:action_cache_proto
...
ERROR: Skipping '@bazel_tools//src/main/protobuf:action_cache_proto': error loading package '@@bazel_tools//src/main/protobuf': Unable to find package for @@[unknown repo 'com_github_grpc_grpc' requested from @@bazel_tools]//bazel:cc_grpc_library.bzl: The repository '@@[unknown repo 'com_github_grpc_grpc' requested from @@bazel_tools]' could not be resolved: No repository visible as '@com_github_grpc_grpc' from repository '@@bazel_tools'.
```

### Which operating system are you running Bazel on?

linux/amd64

### What is the output of `bazel info release`?

release 9.0.0rc2

### If `bazel info release` returns `development version` or `(@non-git)`, tell us how you built Bazel.

`N/A`

### What's the output of `git remote get-url origin; git rev-parse HEAD` ?

`N/A`

### If this is a regression, please try to identify the Bazel commit where the bug was introduced with bazelisk --bisect.

_No response_

### Have you found anything relevant by searching the web?

No.

### Any other information, logs, or outputs that you want to share?

No.

Contributor guide

Open the contributing guide

Research direction

Reproduce the failure with `USE_BAZEL_VERSION=9.0.0rc2 bazel build @bazel_tools//src/main/protobuf:action_cache_proto`. Start at `@bazel_tools//src/main/protobuf` and `bazel:cc_grpc_library.bzl`, then trace why `@com_github_grpc_grpc` is unavailable. Done means the proto_library targets build successfully under Bazel 9.

Written by the indexing model from the issue text.

Assessment

Domain
build-system
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.