Skip to content

Failure in proto_lang_toolchain with Bazel 7.2.0rc1 #22607

@fmeum

Description

@fmeum

Description of the bug:

Since d448e11 (which is in 7.2.0rc1 but not 7.1.2), toolchain resolution with --incompatible_enable_proto_toolchain_resolution fails with an error in proto builtins.

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.

$ git clone https://github.com/fmeum/with_cfg.bzl -b simplify-ci
$ cd with_cfg.bzl

$ USE_BAZEL_VERSION=e09b5369e4bca43eb7e007be6b7aea8713e88c33 bazel build //docs:all
...
INFO: Build completed successfully, 1 total action

$ USE_BAZEL_VERSION=d448e115eaa3acd12743c3077ab418f6eb2da3a0 bazel build //docs:all
Starting local Bazel server and connecting to it...
INFO: Invocation ID: 78f076ac-d6d4-4933-8221-82c982a82ce5
ERROR: /Users/fmeum/git/with_cfg.bzl/docs/BUILD.bazel:14:21: in proto_lang_toolchain rule //docs:protoc_java_toolchain:
Traceback (most recent call last):
	File "/virtual_builtins_bzl/common/proto/proto_lang_toolchain.bzl", line 36, column 67, in _rule_impl
Error: 'NoneType' value has no field or method 'proto'
ERROR: /Users/fmeum/git/with_cfg.bzl/docs/BUILD.bazel:14:21: Analysis of target '//docs:protoc_java_toolchain' failed
Target //docs:protoc_java_toolchain failed to build
Use --verbose_failures to see the command lines of failed build steps.
ERROR: Analysis of target '//docs:defs' failed; build aborted: Analysis failed
INFO: Elapsed time: 4.919s, Critical Path: 0.02s
INFO: 1 process: 1 internal.
ERROR: Build did NOT complete successfully

Which operating system are you running Bazel on?

Linux

What is the output of bazel info release?

No response

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 ?

No response

Is this a regression? If yes, please try to identify the Bazel commit where the bug was introduced.

Yes, as indicated in the reproducer

Have you found anything relevant by searching the web?

No response

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

No response

Metadata

Metadata

Assignees

Labels

P1I'll work on this now. (Assignee required)team-Configurabilityplatforms, toolchains, cquery, select(), config transitionsteam-ExternalDepsExternal dependency handling, remote repositiories, WORKSPACE file.type: bug

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions