rules-proto-grpc / rules_proto_grpc

Bazel rules for building Protobuf and gRPC code and libraries from proto_library targets
https://rules-proto-grpc.com
Apache License 2.0
249 stars 156 forks source link

Rules break with Bazel 7 due to nocopts #292

Closed jmmv closed 8 months ago

jmmv commented 10 months ago

Issue Description

The rules in this repository pass nocopts to the C/C++ rules. They do so via the indirection provided by @rules_cc//cc:defs.bzl. This breaks with Bazel 7, which seems to have lost all support for the nocopts deprecated attribute.

This was probably broken by fe6a20095dd85a49bdf0ec032ba43e32c62056e3 in the bazel.git repository.

Log Output

$ bazel build the:target
INFO: Invocation ID: 77f67304-9e97-406e-8858-62edb068e33e
ERROR: /home/jmmv/workspace/the/target/BUILD.bazel:62:18: //the:some_proto_cc: no such attribute 'nocopts' in 'cc_library' rule (did you mean 'copts'?)

rules_proto_grpc Version

4.3.0 (also fails with 4.5.0)

Bazel Version

release 7.0.0-pre.20231011.2

OS

Linux

Link to Demo Repo

No response

WORKSPACE Content

No response

BUILD Content

No response

Proto Content

No response

Any Other Content

No response

rdesgroppes commented 8 months ago

I stumbled upon this issue now Bazel 7.0.0 is out.

axeluhlig commented 8 months ago

Looks like https://github.com/rules-proto-grpc/rules_proto_grpc/pull/298 already tried to fix this