Skip to content

Target latest version of grpc gem (1.62.0)

Tyler Amos requested to merge ta-update-grpc-gem into master

This MR updates the grpc and grpc-tools gem dependencies to target the latest version, 1.62.0.

We found when working with the gitlab-labkit gem in the customers-dot project that the grpc gem (a dependency of gitlab-labkit) can lead to compile errors when bundling earlier versions. We updated CustomersDot in https://gitlab.com/gitlab-org/customers-gitlab-com/-/merge_requests/9559 to update this dependency to the latest, but discussed in https://gitlab.com/gitlab-org/customers-gitlab-com/-/merge_requests/9559#note_1821171939 also updating the minimum version in this gem as well.

Example of the error that may occur when bundling an earlier version of grpc on MacOS:

Click to expand
rb_channel.c:786:30: error: incompatible function pointer types passing 'void (void *)' to parameter of type 'void *(*)(void *)' [-Wincompatible-function-pointer-types]
  rb_thread_call_without_gvl(run_poll_channels_loop_unblocking_func, NULL, NULL,
                             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/tyler/.asdf/installs/ruby/3.2.3/include/ruby-3.2.0/ruby/thread.h:130:42: note: passing argument to parameter 'func' here
void *rb_thread_call_without_gvl(void *(*func)(void *), void *data1,
                                         ^
rb_channel.c:796:38: warning: a function declaration without a prototype is deprecated in all versions of C [-Wstrict-prototypes]
static void Init_grpc_propagate_masks() {
                                     ^
                                      void
rb_channel.c:812:42: warning: a function declaration without a prototype is deprecated in all versions of C [-Wstrict-prototypes]
static void Init_grpc_connectivity_states() {
                                         ^
                                          void
rb_channel.c:828:23: warning: a function declaration without a prototype is deprecated in all versions of C [-Wstrict-prototypes]
void Init_grpc_channel() {
                      ^
                       void
53 warnings and 2 errors generated.
make: *** [rb_channel.o] Error 1

make failed, exit code 2

Gem files will remain installed in /Users/tyler/.asdf/installs/ruby/3.2.3/lib/ruby/gems/3.2.0/gems/grpc-1.57.0 for inspection.
Results logged to /Users/tyler/.asdf/installs/ruby/3.2.3/lib/ruby/gems/3.2.0/extensions/arm64-darwin-23/3.2.0/grpc-1.57.0/gem_make.out

  /Users/tyler/.asdf/installs/ruby/3.2.3/lib/ruby/site_ruby/3.2.0/rubygems/ext/builder.rb:125:in `run'
  /Users/tyler/.asdf/installs/ruby/3.2.3/lib/ruby/site_ruby/3.2.0/rubygems/ext/builder.rb:51:in `block in make'
  /Users/tyler/.asdf/installs/ruby/3.2.3/lib/ruby/site_ruby/3.2.0/rubygems/ext/builder.rb:43:in `each'
  /Users/tyler/.asdf/installs/ruby/3.2.3/lib/ruby/site_ruby/3.2.0/rubygems/ext/builder.rb:43:in `make'
  /Users/tyler/.asdf/installs/ruby/3.2.3/lib/ruby/site_ruby/3.2.0/rubygems/ext/ext_conf_builder.rb:42:in `build'
  /Users/tyler/.asdf/installs/ruby/3.2.3/lib/ruby/site_ruby/3.2.0/rubygems/ext/builder.rb:193:in `build_extension'
  /Users/tyler/.asdf/installs/ruby/3.2.3/lib/ruby/site_ruby/3.2.0/rubygems/ext/builder.rb:227:in `block in build_extensions'
  /Users/tyler/.asdf/installs/ruby/3.2.3/lib/ruby/site_ruby/3.2.0/rubygems/ext/builder.rb:224:in `each'
  /Users/tyler/.asdf/installs/ruby/3.2.3/lib/ruby/site_ruby/3.2.0/rubygems/ext/builder.rb:224:in `build_extensions'
  /Users/tyler/.asdf/installs/ruby/3.2.3/lib/ruby/site_ruby/3.2.0/rubygems/installer.rb:852:in `build_extensions'
  /Users/tyler/.asdf/installs/ruby/3.2.3/lib/ruby/gems/3.2.0/gems/bundler-2.5.4/lib/bundler/rubygems_gem_installer.rb:76:in `build_extensions'
  /Users/tyler/.asdf/installs/ruby/3.2.3/lib/ruby/gems/3.2.0/gems/bundler-2.5.4/lib/bundler/rubygems_gem_installer.rb:28:in `install'
  /Users/tyler/.asdf/installs/ruby/3.2.3/lib/ruby/gems/3.2.0/gems/bundler-2.5.4/lib/bundler/source/rubygems.rb:205:in `install'
  /Users/tyler/.asdf/installs/ruby/3.2.3/lib/ruby/gems/3.2.0/gems/bundler-2.5.4/lib/bundler/installer/gem_installer.rb:54:in `install'
  /Users/tyler/.asdf/installs/ruby/3.2.3/lib/ruby/gems/3.2.0/gems/bundler-2.5.4/lib/bundler/installer/gem_installer.rb:16:in `install_from_spec'
  /Users/tyler/.asdf/installs/ruby/3.2.3/lib/ruby/gems/3.2.0/gems/bundler-2.5.4/lib/bundler/installer/parallel_installer.rb:132:in `do_install'
  /Users/tyler/.asdf/installs/ruby/3.2.3/lib/ruby/gems/3.2.0/gems/bundler-2.5.4/lib/bundler/installer/parallel_installer.rb:123:in `block in worker_pool'
  /Users/tyler/.asdf/installs/ruby/3.2.3/lib/ruby/gems/3.2.0/gems/bundler-2.5.4/lib/bundler/worker.rb:62:in `apply_func'
  /Users/tyler/.asdf/installs/ruby/3.2.3/lib/ruby/gems/3.2.0/gems/bundler-2.5.4/lib/bundler/worker.rb:57:in `block in process_queue'
  /Users/tyler/.asdf/installs/ruby/3.2.3/lib/ruby/gems/3.2.0/gems/bundler-2.5.4/lib/bundler/worker.rb:54:in `loop'
  /Users/tyler/.asdf/installs/ruby/3.2.3/lib/ruby/gems/3.2.0/gems/bundler-2.5.4/lib/bundler/worker.rb:54:in `process_queue'
  /Users/tyler/.asdf/installs/ruby/3.2.3/lib/ruby/gems/3.2.0/gems/bundler-2.5.4/lib/bundler/worker.rb:90:in `block (2 levels) in create_threads'

An error occurred while installing grpc (1.57.0), and Bundler cannot continue.

In Gemfile:
  gitlab-labkit was resolved to 0.34.0, which depends on
    grpc
Edited by Tyler Amos

Merge request reports