Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade protobuf and grpc deps #1211

Merged
merged 3 commits into from
Mar 8, 2022
Merged

Upgrade protobuf and grpc deps #1211

merged 3 commits into from
Mar 8, 2022

Conversation

aapeliv
Copy link
Contributor

@aapeliv aapeliv commented Feb 26, 2022

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)            

Copy link
Collaborator

@sampajano sampajano left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the update! :) 2 small things :)

WORKSPACE Show resolved Hide resolved
sha256 = "43feda4d7ce2892400d5a0cbccecc5b1790f3253244a171360018d84c2949fb7",
strip_prefix = "grpc-1.33.2",
sha256 = "de2d3168e77e5ffb27758b07e87f6066fd0d8087fe272f278771e7780e6aaacb",
strip_prefix = "grpc-1.44.0",
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

curious if this update is also necessary? Could you provide the error if it's not updated if so (or maybe it's part of the same log you already mentioned)? thanks! :)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

gRPC is giving the error and is the main issue. I bumped protobuf just because I saw it was a bit out of date

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Aha i see! I was confused.. Thanks for explaining! :)

Copy link
Collaborator

@sampajano sampajano left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks again! 😃

@sampajano sampajano merged commit 8c55021 into grpc:master Mar 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants