Without the upgrade of gRPC, I cannot build grpc-web with bazel 5.0.0; with this patch it works.
Error from using bazel 5 with old grpc dep on ubuntu 20.04:
Starting local Bazel server and connecting to it...
Loading:
Loading: 0 packages loaded
Loading: 0 packages loaded
Loading: 0 packages loaded
Loading: 0 packages loaded
Analyzing: 6 targets (2 packages loaded, 0 targets configured)
ERROR: Traceback (most recent call last):
File "/root/.cache/bazel/_bazel_root/f13c4d1ddc0c0b52d282683ced3f4e3e/external/build_bazel_rules_apple/apple/internal/testing/ios_rules.bzl", line 62,
column 61, in <toplevel>
ios_ui_test_bundle = rule_factory.create_apple_bundling_rule(
File "/root/.cache/bazel/_bazel_root/f13c4d1ddc0c0b52d282683ced3f4e3e/external/build_bazel_rules_apple/apple/internal/rule_factory.bzl", line 904, col
umn 55, in _create_apple_bundling_rule
rule_attrs.append(_common_binary_linking_attrs(rule_descriptor))
File "/root/.cache/bazel/_bazel_root/f13c4d1ddc0c0b52d282683ced3f4e3e/external/build_bazel_rules_apple/apple/internal/rule_factory.bzl", line 218, col
umn 21, in _common_binary_linking_attrs
apple_common.objc_proto_aspect,
Error: 'apple_common' value has no field or method 'objc_proto_aspect'
INFO: Repository go_sdk instantiated at:
/deps/grpc-web/WORKSPACE:38:16: in <toplevel>
/root/.cache/bazel/_bazel_root/f13c4d1ddc0c0b52d282683ced3f4e3e/external/com_github_grpc_grpc/bazel/grpc_extra_deps.bzl:36:27: in grpc_extra_deps
/root/.cache/bazel/_bazel_root/f13c4d1ddc0c0b52d282683ced3f4e3e/external/io_bazel_rules_go/go/toolchain/toolchains.bzl:379:28: in go_register_toolchains
/root/.cache/bazel/_bazel_root/f13c4d1ddc0c0b52d282683ced3f4e3e/external/io_bazel_rules_go/go/private/sdk.bzl:65:21: in go_download_sdk
Repository rule _go_download_sdk defined at:
/root/.cache/bazel/_bazel_root/f13c4d1ddc0c0b52d282683ced3f4e3e/external/io_bazel_rules_go/go/private/sdk.bzl:53:35: in <toplevel>
INFO: Repository rules_python instantiated at:
/deps/grpc-web/WORKSPACE:34:10: in <toplevel>
/root/.cache/bazel/_bazel_root/f13c4d1ddc0c0b52d282683ced3f4e3e/external/com_github_grpc_grpc/bazel/grpc_deps.bzl:348:21: in grpc_deps
/root/.cache/bazel/_bazel_root/f13c4d1ddc0c0b52d282683ced3f4e3e/external/com_github_grpc_grpc/bazel/grpc_python_deps.bzl:44:21: in grpc_python_deps
Repository rule http_archive defined at:
/root/.cache/bazel/_bazel_root/f13c4d1ddc0c0b52d282683ced3f4e3e/external/bazel_tools/tools/build_defs/repo/http.bzl:364:31: in <toplevel>
ERROR: /deps/grpc-web/net/grpc/gateway/examples/echo/BUILD.bazel:21:16: error loading package '@com_github_grpc_grpc//src/compiler': at /root/.cache/bazel/_ba
zel_root/f13c4d1ddc0c0b52d282683ced3f4e3e/external/com_github_grpc_grpc/bazel/grpc_build_system.bzl:28:6: at /root/.cache/bazel/_bazel_root/f13c4d1ddc0c0b52d2
82683ced3f4e3e/external/build_bazel_rules_apple/apple/ios.bzl:22:5: initialization of module 'apple/internal/testing/ios_rules.bzl' failed and referenced by '
//net/grpc/gateway/examples/echo:_echo_cc_grpc_grpc_codegen'
ERROR: Analysis of target '//net/grpc/gateway/examples/echo:_echo_cc_grpc_grpc_codegen' failed; build aborted: Analysis failed
INFO: Elapsed time: 5.618s
INFO: 0 processes.
FAILED: Build did NOT complete successfully (30 packages loaded, 6 targets configured)
FAILED: Build did NOT complete successfully (30 packages loaded, 6 targets configured)
Without the upgrade of gRPC, I cannot build grpc-web with bazel 5.0.0; with this patch it works.
Error from using bazel 5 with old grpc dep on ubuntu 20.04: