Skip to content

[Bug]: Cannot perform a Bazel CQuery after setup #104

@vibbix

Description

@vibbix

Version

v0.5.0 - latest at the time of this writing on bazel 8.4.2

when running a query like bazel cquery 'somepath("//...", "@com_google_protobuf//:all")' - I am getting this error now after installing toolchains:

common --per_file_copt=external/.*protobuf.*@--PROTOBUF_WAS_NOT_SUPPOSED_TO_BE_BUILT
common --host_per_file_copt=external/.*protobuf.*@--PROTOBUF_WAS_NOT_SUPPOSED_TO_BE_BUILT
common --per_file_copt=external/.*grpc.*@--GRPC_WAS_NOT_SUPPOSED_TO_BE_BUILT
common --host_per_file_copt=external/.*grpc.*@--GRPC_WAS_NOT_SUPPOSED_TO_BE_BUILT
common --incompatible_enable_proto_toolchain_resolution
ERROR: /private/.../external/toolchains_protoc++protoc+toolchains_protoc_hub.osx_aarch_64/BUILD.bazel:25:14: in proto_library rule @@toolchains_protoc++protoc+toolchains_protoc_hub.osx_aarch_64//:compiler/plugin_proto:
Traceback (most recent call last):
	File "/private/.../external/protobuf+/bazel/private/bazel_proto_library_rule.bzl", line 80, column 27, in _proto_library_impl
		proto_info = ProtoInfo(
	File "/private/.../external/protobuf+/bazel/private/proto_info.bzl", line 138, column 24, in ProtoInfo
		ProtoInfo, _ = provider(
	File "/private/.../external/protobuf+/bazel/private/proto_info.bzl", line 73, column 17, in _create_proto_info
		fail("proto_path needs to be formed like '_virtual_imports/target_name'")
Error in fail: proto_path needs to be formed like '_virtual_imports/target_name'
ERROR: /private/.../external/toolchains_protoc++protoc+toolchains_protoc_hub.osx_aarch_64/BUILD.bazel:25:14: Analysis of target '@@toolchains_protoc++protoc+toolchains_protoc_hub.osx_aarch_64//:compiler/plugin_proto' (config: ....) failed

I'm wondering if anyone has seen anything like it before. Running bazel clean --expunge etc. doesn't help much here.

I am working on a reproduction guide now.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions