grpc 1.46.3-x86-linux → 1.48.0-x86-linux
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of grpc might be problematic. Click here for more details.
- checksums.yaml +4 -4
- data/grpc_c.64-ucrt.ruby +0 -0
- data/src/ruby/ext/grpc/ext-export-truffleruby.clang +2 -0
- data/src/ruby/ext/grpc/ext-export-truffleruby.gcc +7 -0
- data/src/ruby/ext/grpc/ext-export.clang +1 -0
- data/src/ruby/ext/grpc/ext-export.gcc +1 -0
- data/src/ruby/ext/grpc/extconf.rb +50 -19
- data/src/ruby/ext/grpc/rb_grpc_imports.generated.h +1 -1
- data/src/ruby/lib/grpc/2.5/grpc_c.so +0 -0
- data/src/ruby/lib/grpc/2.6/grpc_c.so +0 -0
- data/src/ruby/lib/grpc/2.7/grpc_c.so +0 -0
- data/src/ruby/lib/grpc/3.0/grpc_c.so +0 -0
- data/src/ruby/lib/grpc/3.1/grpc_c.so +0 -0
- data/src/ruby/lib/grpc/errors.rb +1 -1
- data/src/ruby/lib/grpc/version.rb +1 -1
- data/src/ruby/spec/generic/client_stub_spec.rb +23 -23
- metadata +5 -2
    
        checksums.yaml
    CHANGED
    
    | @@ -1,7 +1,7 @@ | |
| 1 1 | 
             
            ---
         | 
| 2 2 | 
             
            SHA256:
         | 
| 3 | 
            -
              metadata.gz:  | 
| 4 | 
            -
              data.tar.gz:  | 
| 3 | 
            +
              metadata.gz: e282e7b9b6658dff381fe9f34f8ec117772aa35e5f9e98c562c3776681fa6bf0
         | 
| 4 | 
            +
              data.tar.gz: a2d08ea617c4322a447967b1d33ad5b3feb65cc6604421c86ad23353092b5a7a
         | 
| 5 5 | 
             
            SHA512:
         | 
| 6 | 
            -
              metadata.gz:  | 
| 7 | 
            -
              data.tar.gz:  | 
| 6 | 
            +
              metadata.gz: c4e277551da00d67fb3934bb46723a3ea054771afca53123a8062328dd3fc3425b80b4f692bc15332a25d5456f06d249c2331027940e41defc997551331983cc
         | 
| 7 | 
            +
              data.tar.gz: 8f6623d9a4aea347cf655c7d6816b2c1bdbcf0a9e36cb48d9793dd9bd7a5165783c0ebfbc1ec31a28e9b52927dcc986f57cfa0750631d108040930dd2f43e832
         | 
    
        data/grpc_c.64-ucrt.ruby
    ADDED
    
    | 
            File without changes
         | 
| @@ -20,6 +20,8 @@ bsd = RUBY_PLATFORM =~ /bsd/ | |
| 20 20 | 
             
            darwin = RUBY_PLATFORM =~ /darwin/
         | 
| 21 21 | 
             
            linux = RUBY_PLATFORM =~ /linux/
         | 
| 22 22 | 
             
            cross_compiling = ENV['RCD_HOST_RUBY_VERSION'] # set by rake-compiler-dock in build containers
         | 
| 23 | 
            +
            # TruffleRuby uses the Sulong LLVM runtime, which is different from Apple's.
         | 
| 24 | 
            +
            apple_toolchain = darwin && RUBY_ENGINE != 'truffleruby'
         | 
| 23 25 |  | 
| 24 26 | 
             
            grpc_root = File.expand_path(File.join(File.dirname(__FILE__), '../../../..'))
         | 
| 25 27 |  | 
| @@ -27,30 +29,53 @@ grpc_config = ENV['GRPC_CONFIG'] || 'opt' | |
| 27 29 |  | 
| 28 30 | 
             
            ENV['MACOSX_DEPLOYMENT_TARGET'] = '10.10'
         | 
| 29 31 |  | 
| 30 | 
            -
             | 
| 31 | 
            -
             | 
| 32 | 
            +
            def env_unset?(name)
         | 
| 33 | 
            +
              ENV[name].nil? || ENV[name].size == 0
         | 
| 32 34 | 
             
            end
         | 
| 33 | 
            -
             | 
| 34 | 
            -
             | 
| 35 | 
            +
             | 
| 36 | 
            +
            def rbconfig_set?(name)
         | 
| 37 | 
            +
              RbConfig::CONFIG[name] && RbConfig::CONFIG[name].size > 0
         | 
| 35 38 | 
             
            end
         | 
| 36 | 
            -
             | 
| 37 | 
            -
             | 
| 39 | 
            +
             | 
| 40 | 
            +
            def inherit_rbconfig(name)
         | 
| 41 | 
            +
              ENV[name] = RbConfig::CONFIG[name] if env_unset?(name) && rbconfig_set?(name)
         | 
| 38 42 | 
             
            end
         | 
| 39 | 
            -
             | 
| 40 | 
            -
             | 
| 43 | 
            +
             | 
| 44 | 
            +
            def env_append(name, string)
         | 
| 45 | 
            +
              ENV[name] ||= ''
         | 
| 46 | 
            +
              ENV[name] += ' ' + string
         | 
| 47 | 
            +
            end
         | 
| 48 | 
            +
             | 
| 49 | 
            +
            inherit_rbconfig 'AR'
         | 
| 50 | 
            +
            inherit_rbconfig 'CC'
         | 
| 51 | 
            +
            inherit_rbconfig 'CXX'
         | 
| 52 | 
            +
            inherit_rbconfig 'RANLIB'
         | 
| 53 | 
            +
            inherit_rbconfig 'STRIP'
         | 
| 54 | 
            +
            inherit_rbconfig 'CPPFLAGS'
         | 
| 55 | 
            +
            inherit_rbconfig 'LDFLAGS'
         | 
| 56 | 
            +
             | 
| 57 | 
            +
            ENV['LD'] = ENV['CC'] if env_unset?('LD')
         | 
| 58 | 
            +
            ENV['LDXX'] = ENV['CXX'] if env_unset?('LDXX')
         | 
| 59 | 
            +
             | 
| 60 | 
            +
            if RUBY_ENGINE == 'truffleruby'
         | 
| 61 | 
            +
              # ensure we can find the system's OpenSSL
         | 
| 62 | 
            +
              env_append 'CPPFLAGS', RbConfig::CONFIG['cppflags']
         | 
| 41 63 | 
             
            end
         | 
| 42 64 |  | 
| 43 | 
            -
            if  | 
| 65 | 
            +
            if apple_toolchain && !cross_compiling
         | 
| 44 66 | 
             
              ENV['AR'] = 'libtool'
         | 
| 45 67 | 
             
              ENV['ARFLAGS'] = '-o'
         | 
| 46 68 | 
             
            end
         | 
| 47 69 |  | 
| 48 | 
            -
             | 
| 49 | 
            -
            ENV[' | 
| 70 | 
            +
            # Don't embed on TruffleRuby (constant-time crypto is unsafe with Sulong, slow build times)
         | 
| 71 | 
            +
            ENV['EMBED_OPENSSL'] = (RUBY_ENGINE != 'truffleruby').to_s
         | 
| 72 | 
            +
            # Don't embed on TruffleRuby (the system zlib is already linked for the zlib C extension, slow build times)
         | 
| 73 | 
            +
            ENV['EMBED_ZLIB'] = (RUBY_ENGINE != 'truffleruby').to_s
         | 
| 74 | 
            +
             | 
| 50 75 | 
             
            ENV['EMBED_CARES'] = 'true'
         | 
| 51 76 |  | 
| 52 77 | 
             
            ENV['ARCH_FLAGS'] = RbConfig::CONFIG['ARCH_FLAG']
         | 
| 53 | 
            -
            if  | 
| 78 | 
            +
            if apple_toolchain && !cross_compiling
         | 
| 54 79 | 
             
              if RUBY_PLATFORM =~ /arm64/
         | 
| 55 80 | 
             
                ENV['ARCH_FLAGS'] = '-arch arm64'
         | 
| 56 81 | 
             
              else
         | 
| @@ -58,9 +83,11 @@ if darwin && !cross_compiling | |
| 58 83 | 
             
              end
         | 
| 59 84 | 
             
            end
         | 
| 60 85 |  | 
| 61 | 
            -
             | 
| 62 | 
            -
             | 
| 63 | 
            -
             | 
| 86 | 
            +
            env_append 'CPPFLAGS', '-DGPR_BACKWARDS_COMPATIBILITY_MODE'
         | 
| 87 | 
            +
            env_append 'CPPFLAGS', '-DGRPC_XDS_USER_AGENT_NAME_SUFFIX="\"RUBY\""'
         | 
| 88 | 
            +
             | 
| 89 | 
            +
            require_relative '../../lib/grpc/version'
         | 
| 90 | 
            +
            env_append 'CPPFLAGS', '-DGRPC_XDS_USER_AGENT_VERSION_SUFFIX="\"' + GRPC::VERSION + '\""'
         | 
| 64 91 |  | 
| 65 92 | 
             
            output_dir = File.expand_path(RbConfig::CONFIG['topdir'])
         | 
| 66 93 | 
             
            grpc_lib_dir = File.join(output_dir, 'libs', grpc_config)
         | 
| @@ -85,8 +112,9 @@ end | |
| 85 112 | 
             
            $CFLAGS << ' -I' + File.join(grpc_root, 'include')
         | 
| 86 113 |  | 
| 87 114 | 
             
            ext_export_file = File.join(grpc_root, 'src', 'ruby', 'ext', 'grpc', 'ext-export')
         | 
| 115 | 
            +
            ext_export_file += '-truffleruby' if RUBY_ENGINE == 'truffleruby'
         | 
| 88 116 | 
             
            $LDFLAGS << ' -Wl,--version-script="' + ext_export_file + '.gcc"' if linux
         | 
| 89 | 
            -
            $LDFLAGS << ' -Wl,-exported_symbols_list,"' + ext_export_file + '.clang"' if  | 
| 117 | 
            +
            $LDFLAGS << ' -Wl,-exported_symbols_list,"' + ext_export_file + '.clang"' if apple_toolchain
         | 
| 90 118 |  | 
| 91 119 | 
             
            $LDFLAGS << ' ' + File.join(grpc_lib_dir, 'libgrpc.a') unless windows
         | 
| 92 120 | 
             
            if grpc_config == 'gcov'
         | 
| @@ -99,10 +127,13 @@ if grpc_config == 'dbg' | |
| 99 127 | 
             
            end
         | 
| 100 128 |  | 
| 101 129 | 
             
            $LDFLAGS << ' -Wl,-wrap,memcpy' if linux
         | 
| 102 | 
            -
             | 
| 130 | 
            +
            # Do not statically link standard libraries on TruffleRuby as this does not work when compiling to bitcode
         | 
| 131 | 
            +
            if linux && RUBY_ENGINE != 'truffleruby'
         | 
| 132 | 
            +
              $LDFLAGS << ' -static-libgcc -static-libstdc++'
         | 
| 133 | 
            +
            end
         | 
| 103 134 | 
             
            $LDFLAGS << ' -static' if windows
         | 
| 104 135 |  | 
| 105 | 
            -
            $CFLAGS << ' -std= | 
| 136 | 
            +
            $CFLAGS << ' -std=c11 '
         | 
| 106 137 | 
             
            $CFLAGS << ' -Wall '
         | 
| 107 138 | 
             
            $CFLAGS << ' -Wextra '
         | 
| 108 139 | 
             
            $CFLAGS << ' -pedantic '
         | 
| @@ -112,7 +143,7 @@ puts 'Generating Makefile for ' + output | |
| 112 143 | 
             
            create_makefile(output)
         | 
| 113 144 |  | 
| 114 145 | 
             
            strip_tool = RbConfig::CONFIG['STRIP']
         | 
| 115 | 
            -
            strip_tool += ' -x' if  | 
| 146 | 
            +
            strip_tool += ' -x' if apple_toolchain
         | 
| 116 147 |  | 
| 117 148 | 
             
            if grpc_config == 'opt'
         | 
| 118 149 | 
             
              File.open('Makefile.new', 'w') do |o|
         | 
| @@ -278,7 +278,7 @@ extern grpc_resource_quota_resize_type grpc_resource_quota_resize_import; | |
| 278 278 | 
             
            typedef void(*grpc_resource_quota_set_max_threads_type)(grpc_resource_quota* resource_quota, int new_max_threads);
         | 
| 279 279 | 
             
            extern grpc_resource_quota_set_max_threads_type grpc_resource_quota_set_max_threads_import;
         | 
| 280 280 | 
             
            #define grpc_resource_quota_set_max_threads grpc_resource_quota_set_max_threads_import
         | 
| 281 | 
            -
            typedef grpc_slice(*grpc_dump_xds_configs_type)();
         | 
| 281 | 
            +
            typedef grpc_slice(*grpc_dump_xds_configs_type)(void);
         | 
| 282 282 | 
             
            extern grpc_dump_xds_configs_type grpc_dump_xds_configs_import;
         | 
| 283 283 | 
             
            #define grpc_dump_xds_configs grpc_dump_xds_configs_import
         | 
| 284 284 | 
             
            typedef const grpc_arg_pointer_vtable*(*grpc_resource_quota_arg_vtable_type)(void);
         | 
| Binary file | 
| Binary file | 
| Binary file | 
| Binary file | 
| Binary file | 
    
        data/src/ruby/lib/grpc/errors.rb
    CHANGED
    
    | @@ -43,7 +43,7 @@ module GRPC | |
| 43 43 | 
             
                               debug_error_string = nil)
         | 
| 44 44 | 
             
                  exception_message = "#{code}:#{details}"
         | 
| 45 45 | 
             
                  if debug_error_string
         | 
| 46 | 
            -
                    exception_message += ". debug_error_string | 
| 46 | 
            +
                    exception_message += ". debug_error_string:{#{debug_error_string}}"
         | 
| 47 47 | 
             
                  end
         | 
| 48 48 | 
             
                  super(exception_message)
         | 
| 49 49 | 
             
                  @code = code
         | 
| @@ -498,31 +498,10 @@ describe 'ClientStub' do  # rubocop:disable Metrics/BlockLength | |
| 498 498 | 
             
                                       /Header values must be of type string or array/)
         | 
| 499 499 | 
             
                  end
         | 
| 500 500 |  | 
| 501 | 
            -
                  def run_server_streamer_against_client_with_unmarshal_error(
         | 
| 502 | 
            -
                    expected_input, replys)
         | 
| 503 | 
            -
                    wakey_thread do |notifier|
         | 
| 504 | 
            -
                      c = expect_server_to_be_invoked(notifier)
         | 
| 505 | 
            -
                      expect(c.remote_read).to eq(expected_input)
         | 
| 506 | 
            -
                      begin
         | 
| 507 | 
            -
                        replys.each { |r| c.remote_send(r) }
         | 
| 508 | 
            -
                      rescue GRPC::Core::CallError
         | 
| 509 | 
            -
                        # An attempt to write to the client might fail. This is ok
         | 
| 510 | 
            -
                        # because the client call is expected to fail when
         | 
| 511 | 
            -
                        # unmarshalling the first response, and to cancel the call,
         | 
| 512 | 
            -
                        # and there is a race as for when the server-side call will
         | 
| 513 | 
            -
                        # start to fail.
         | 
| 514 | 
            -
                        p 'remote_send failed (allowed because call expected to cancel)'
         | 
| 515 | 
            -
                      ensure
         | 
| 516 | 
            -
                        c.send_status(OK, 'OK', true)
         | 
| 517 | 
            -
                        close_active_server_call(c)
         | 
| 518 | 
            -
                      end
         | 
| 519 | 
            -
                    end
         | 
| 520 | 
            -
                  end
         | 
| 521 | 
            -
             | 
| 522 501 | 
             
                  it 'the call terminates when there is an unmarshalling error' do
         | 
| 523 502 | 
             
                    server_port = create_test_server
         | 
| 524 503 | 
             
                    host = "localhost:#{server_port}"
         | 
| 525 | 
            -
                    th =  | 
| 504 | 
            +
                    th = run_server_streamer_handle_client_cancellation(
         | 
| 526 505 | 
             
                      @sent_msg, @replys)
         | 
| 527 506 | 
             
                    stub = GRPC::ClientStub.new(host, :this_channel_is_insecure)
         | 
| 528 507 |  | 
| @@ -597,7 +576,8 @@ describe 'ClientStub' do  # rubocop:disable Metrics/BlockLength | |
| 597 576 | 
             
                  it 'raises GRPC::Cancelled after the call has been cancelled' do
         | 
| 598 577 | 
             
                    server_port = create_test_server
         | 
| 599 578 | 
             
                    host = "localhost:#{server_port}"
         | 
| 600 | 
            -
                    th =  | 
| 579 | 
            +
                    th = run_server_streamer_handle_client_cancellation(
         | 
| 580 | 
            +
                      @sent_msg, @replys)
         | 
| 601 581 | 
             
                    stub = GRPC::ClientStub.new(host, :this_channel_is_insecure)
         | 
| 602 582 | 
             
                    resp = get_responses(stub, run_start_call_first: false)
         | 
| 603 583 | 
             
                    expect(resp.next).to eq('reply_1')
         | 
| @@ -1037,6 +1017,26 @@ describe 'ClientStub' do  # rubocop:disable Metrics/BlockLength | |
| 1037 1017 | 
             
                end
         | 
| 1038 1018 | 
             
              end
         | 
| 1039 1019 |  | 
| 1020 | 
            +
              def run_server_streamer_handle_client_cancellation(
         | 
| 1021 | 
            +
                expected_input, replys)
         | 
| 1022 | 
            +
                wakey_thread do |notifier|
         | 
| 1023 | 
            +
                  c = expect_server_to_be_invoked(notifier)
         | 
| 1024 | 
            +
                  expect(c.remote_read).to eq(expected_input)
         | 
| 1025 | 
            +
                  begin
         | 
| 1026 | 
            +
                    replys.each { |r| c.remote_send(r) }
         | 
| 1027 | 
            +
                  rescue GRPC::Core::CallError
         | 
| 1028 | 
            +
                    # An attempt to write to the client might fail. This is ok
         | 
| 1029 | 
            +
                    # because the client call is expected to cancel the call,
         | 
| 1030 | 
            +
                    # and there is a race as for when the server-side call will
         | 
| 1031 | 
            +
                    # start to fail.
         | 
| 1032 | 
            +
                    p 'remote_send failed (allowed because call expected to cancel)'
         | 
| 1033 | 
            +
                  ensure
         | 
| 1034 | 
            +
                    c.send_status(OK, 'OK', true)
         | 
| 1035 | 
            +
                    close_active_server_call(c)
         | 
| 1036 | 
            +
                  end
         | 
| 1037 | 
            +
                end
         | 
| 1038 | 
            +
              end
         | 
| 1039 | 
            +
             | 
| 1040 1040 | 
             
              def run_request_response(expected_input, resp, status,
         | 
| 1041 1041 | 
             
                                       expected_metadata: {},
         | 
| 1042 1042 | 
             
                                       server_initial_md: {},
         | 
    
        metadata
    CHANGED
    
    | @@ -1,14 +1,14 @@ | |
| 1 1 | 
             
            --- !ruby/object:Gem::Specification
         | 
| 2 2 | 
             
            name: grpc
         | 
| 3 3 | 
             
            version: !ruby/object:Gem::Version
         | 
| 4 | 
            -
              version: 1. | 
| 4 | 
            +
              version: 1.48.0
         | 
| 5 5 | 
             
            platform: x86-linux
         | 
| 6 6 | 
             
            authors:
         | 
| 7 7 | 
             
            - gRPC Authors
         | 
| 8 8 | 
             
            autorequire:
         | 
| 9 9 | 
             
            bindir: src/ruby/bin
         | 
| 10 10 | 
             
            cert_chain: []
         | 
| 11 | 
            -
            date: 2022- | 
| 11 | 
            +
            date: 2022-07-19 00:00:00.000000000 Z
         | 
| 12 12 | 
             
            dependencies:
         | 
| 13 13 | 
             
            - !ruby/object:Gem::Dependency
         | 
| 14 14 | 
             
              name: google-protobuf
         | 
| @@ -206,6 +206,7 @@ extra_rdoc_files: [] | |
| 206 206 | 
             
            files:
         | 
| 207 207 | 
             
            - etc/roots.pem
         | 
| 208 208 | 
             
            - grpc_c.32.ruby
         | 
| 209 | 
            +
            - grpc_c.64-ucrt.ruby
         | 
| 209 210 | 
             
            - grpc_c.64.ruby
         | 
| 210 211 | 
             
            - src/ruby/bin/math_client.rb
         | 
| 211 212 | 
             
            - src/ruby/bin/math_pb.rb
         | 
| @@ -213,6 +214,8 @@ files: | |
| 213 214 | 
             
            - src/ruby/bin/math_services_pb.rb
         | 
| 214 215 | 
             
            - src/ruby/bin/noproto_client.rb
         | 
| 215 216 | 
             
            - src/ruby/bin/noproto_server.rb
         | 
| 217 | 
            +
            - src/ruby/ext/grpc/ext-export-truffleruby.clang
         | 
| 218 | 
            +
            - src/ruby/ext/grpc/ext-export-truffleruby.gcc
         | 
| 216 219 | 
             
            - src/ruby/ext/grpc/ext-export.clang
         | 
| 217 220 | 
             
            - src/ruby/ext/grpc/ext-export.gcc
         | 
| 218 221 | 
             
            - src/ruby/ext/grpc/extconf.rb
         |