grpc 1.47.0-x86-linux → 1.49.0.pre1-x86-linux

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of grpc might be problematic. Click here for more details.

checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 8f00e8d92bd5a162892ffcd45f4f64ed87a4909a507fc370b578436a42b8bb23
4
- data.tar.gz: 34d7a2de017432db648c709f9d17d774844ab7a2a2d13431c5e84b9808b831bc
3
+ metadata.gz: 1da9db032eb6f032678db80a697d44602ebfc52d5868bfbd78f8ec569780a64c
4
+ data.tar.gz: 628e72afb59ce09fdb05887d9c5b7c58fd688f6a74485dd0cb852c195027e4a4
5
5
  SHA512:
6
- metadata.gz: a5472b0022ac700527befe34dc88f0fb958bdee7ffd8ce6acb57bd6b85a4961b0349bdf968dd5a73f46665315677db60e5e53a218c52887195d2ca05a05a5abc
7
- data.tar.gz: f7d7e0bd2a1733270e2bc483c35113f05b8d915d33533588f5138ed7865ad64968311b0081021c21b4e337dc93c796c31c7adab9019a143729ede44edd8551c8
6
+ metadata.gz: 0d1a69615bd1a6cc4418c240feb1c62c99a20e15f59113e14b947e7df2cc9455ad955619722a32b88e59f9da775c12ffab9c1d12fd6e7c7afd364efed48c9646
7
+ data.tar.gz: ded53d6886ccb3c385bb29ddfeb579ef31ef75f553b45b93974cdb37e1cd655d981c30cf50ff5cd09e8795e034d28b56ba19079adc197e5c383f33cee7afc62c
File without changes
File without changes
@@ -0,0 +1,2 @@
1
+ _Init_grpc_c
2
+ _rb_tr_abi_version
@@ -0,0 +1,7 @@
1
+ grpc_1.0 {
2
+ global:
3
+ Init_grpc_c;
4
+ rb_tr_abi_version;
5
+ local:
6
+ *;
7
+ };
@@ -1 +1,2 @@
1
1
  _Init_grpc_c
2
+ _ruby_abi_version
@@ -1,6 +1,7 @@
1
1
  grpc_1.0 {
2
2
  global:
3
3
  Init_grpc_c;
4
+ ruby_abi_version;
4
5
  local:
5
6
  *;
6
7
  };
@@ -16,10 +16,13 @@ require 'etc'
16
16
  require 'mkmf'
17
17
 
18
18
  windows = RUBY_PLATFORM =~ /mingw|mswin/
19
+ windows_ucrt = RUBY_PLATFORM =~ /(mingw|mswin).*ucrt/
19
20
  bsd = RUBY_PLATFORM =~ /bsd/
20
21
  darwin = RUBY_PLATFORM =~ /darwin/
21
22
  linux = RUBY_PLATFORM =~ /linux/
22
23
  cross_compiling = ENV['RCD_HOST_RUBY_VERSION'] # set by rake-compiler-dock in build containers
24
+ # TruffleRuby uses the Sulong LLVM runtime, which is different from Apple's.
25
+ apple_toolchain = darwin && RUBY_ENGINE != 'truffleruby'
23
26
 
24
27
  grpc_root = File.expand_path(File.join(File.dirname(__FILE__), '../../../..'))
25
28
 
@@ -27,30 +30,53 @@ grpc_config = ENV['GRPC_CONFIG'] || 'opt'
27
30
 
28
31
  ENV['MACOSX_DEPLOYMENT_TARGET'] = '10.10'
29
32
 
30
- if ENV['AR'].nil? || ENV['AR'].size == 0
31
- ENV['AR'] = RbConfig::CONFIG['AR']
33
+ def env_unset?(name)
34
+ ENV[name].nil? || ENV[name].size == 0
32
35
  end
33
- if ENV['CC'].nil? || ENV['CC'].size == 0
34
- ENV['CC'] = RbConfig::CONFIG['CC']
36
+
37
+ def rbconfig_set?(name)
38
+ RbConfig::CONFIG[name] && RbConfig::CONFIG[name].size > 0
35
39
  end
36
- if ENV['CXX'].nil? || ENV['CXX'].size == 0
37
- ENV['CXX'] = RbConfig::CONFIG['CXX']
40
+
41
+ def inherit_rbconfig(name)
42
+ ENV[name] = RbConfig::CONFIG[name] if env_unset?(name) && rbconfig_set?(name)
38
43
  end
39
- if ENV['LD'].nil? || ENV['LD'].size == 0
40
- ENV['LD'] = ENV['CC']
44
+
45
+ def env_append(name, string)
46
+ ENV[name] ||= ''
47
+ ENV[name] += ' ' + string
48
+ end
49
+
50
+ inherit_rbconfig 'AR'
51
+ inherit_rbconfig 'CC'
52
+ inherit_rbconfig 'CXX'
53
+ inherit_rbconfig 'RANLIB'
54
+ inherit_rbconfig 'STRIP'
55
+ inherit_rbconfig 'CPPFLAGS'
56
+ inherit_rbconfig 'LDFLAGS'
57
+
58
+ ENV['LD'] = ENV['CC'] if env_unset?('LD')
59
+ ENV['LDXX'] = ENV['CXX'] if env_unset?('LDXX')
60
+
61
+ if RUBY_ENGINE == 'truffleruby'
62
+ # ensure we can find the system's OpenSSL
63
+ env_append 'CPPFLAGS', RbConfig::CONFIG['cppflags']
41
64
  end
42
65
 
43
- if darwin && !cross_compiling
66
+ if apple_toolchain && !cross_compiling
44
67
  ENV['AR'] = 'libtool'
45
68
  ENV['ARFLAGS'] = '-o'
46
69
  end
47
70
 
48
- ENV['EMBED_OPENSSL'] = 'true'
49
- ENV['EMBED_ZLIB'] = 'true'
71
+ # Don't embed on TruffleRuby (constant-time crypto is unsafe with Sulong, slow build times)
72
+ ENV['EMBED_OPENSSL'] = (RUBY_ENGINE != 'truffleruby').to_s
73
+ # Don't embed on TruffleRuby (the system zlib is already linked for the zlib C extension, slow build times)
74
+ ENV['EMBED_ZLIB'] = (RUBY_ENGINE != 'truffleruby').to_s
75
+
50
76
  ENV['EMBED_CARES'] = 'true'
51
77
 
52
78
  ENV['ARCH_FLAGS'] = RbConfig::CONFIG['ARCH_FLAG']
53
- if darwin && !cross_compiling
79
+ if apple_toolchain && !cross_compiling
54
80
  if RUBY_PLATFORM =~ /arm64/
55
81
  ENV['ARCH_FLAGS'] = '-arch arm64'
56
82
  else
@@ -58,9 +84,12 @@ if darwin && !cross_compiling
58
84
  end
59
85
  end
60
86
 
61
- ENV['CPPFLAGS'] = '-DGPR_BACKWARDS_COMPATIBILITY_MODE'
62
- ENV['CPPFLAGS'] += ' -DGRPC_XDS_USER_AGENT_NAME_SUFFIX="\"RUBY\"" '
63
- ENV['CPPFLAGS'] += ' -DGRPC_XDS_USER_AGENT_VERSION_SUFFIX="\"1.47.0\"" '
87
+ env_append 'CPPFLAGS', '-DGPR_BACKWARDS_COMPATIBILITY_MODE'
88
+ env_append 'CPPFLAGS', '-DGRPC_XDS_USER_AGENT_NAME_SUFFIX="\"RUBY\""'
89
+ env_append 'CPPFLAGS', '-DGRPC_RUBY_WINDOWS_UCRT' if windows_ucrt
90
+
91
+ require_relative '../../lib/grpc/version'
92
+ env_append 'CPPFLAGS', '-DGRPC_XDS_USER_AGENT_VERSION_SUFFIX="\"' + GRPC::VERSION + '\""'
64
93
 
65
94
  output_dir = File.expand_path(RbConfig::CONFIG['topdir'])
66
95
  grpc_lib_dir = File.join(output_dir, 'libs', grpc_config)
@@ -85,8 +114,9 @@ end
85
114
  $CFLAGS << ' -I' + File.join(grpc_root, 'include')
86
115
 
87
116
  ext_export_file = File.join(grpc_root, 'src', 'ruby', 'ext', 'grpc', 'ext-export')
117
+ ext_export_file += '-truffleruby' if RUBY_ENGINE == 'truffleruby'
88
118
  $LDFLAGS << ' -Wl,--version-script="' + ext_export_file + '.gcc"' if linux
89
- $LDFLAGS << ' -Wl,-exported_symbols_list,"' + ext_export_file + '.clang"' if darwin
119
+ $LDFLAGS << ' -Wl,-exported_symbols_list,"' + ext_export_file + '.clang"' if apple_toolchain
90
120
 
91
121
  $LDFLAGS << ' ' + File.join(grpc_lib_dir, 'libgrpc.a') unless windows
92
122
  if grpc_config == 'gcov'
@@ -99,7 +129,10 @@ if grpc_config == 'dbg'
99
129
  end
100
130
 
101
131
  $LDFLAGS << ' -Wl,-wrap,memcpy' if linux
102
- $LDFLAGS << ' -static-libgcc -static-libstdc++' if linux
132
+ # Do not statically link standard libraries on TruffleRuby as this does not work when compiling to bitcode
133
+ if linux && RUBY_ENGINE != 'truffleruby'
134
+ $LDFLAGS << ' -static-libgcc -static-libstdc++'
135
+ end
103
136
  $LDFLAGS << ' -static' if windows
104
137
 
105
138
  $CFLAGS << ' -std=c11 '
@@ -112,7 +145,7 @@ puts 'Generating Makefile for ' + output
112
145
  create_makefile(output)
113
146
 
114
147
  strip_tool = RbConfig::CONFIG['STRIP']
115
- strip_tool += ' -x' if darwin
148
+ strip_tool += ' -x' if apple_toolchain
116
149
 
117
150
  if grpc_config == 'opt'
118
151
  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);
@@ -23,9 +23,13 @@
23
23
 
24
24
  int grpc_rb_load_core() {
25
25
  #if GPR_ARCH_64
26
- TCHAR fname[] = _T("grpc_c.64.ruby");
26
+ #if GRPC_RUBY_WINDOWS_UCRT
27
+ TCHAR fname[] = _T("grpc_c.64-ucrt.ruby");
27
28
  #else
28
- TCHAR fname[] = _T("grpc_c.32.ruby");
29
+ TCHAR fname[] = _T("grpc_c.64-msvcrt.ruby");
30
+ #endif
31
+ #else
32
+ TCHAR fname[] = _T("grpc_c.32-msvcrt.ruby");
29
33
  #endif
30
34
  HMODULE module = GetModuleHandle(_T("grpc_c.so"));
31
35
  TCHAR path[2048 + 32] = _T("");
Binary file
Binary file
Binary file
Binary file
Binary file
@@ -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:#{debug_error_string}"
46
+ exception_message += ". debug_error_string:{#{debug_error_string}}"
47
47
  end
48
48
  super(exception_message)
49
49
  @code = code
@@ -14,5 +14,5 @@
14
14
 
15
15
  # GRPC contains the General RPC module.
16
16
  module GRPC
17
- VERSION = '1.47.0'
17
+ VERSION = '1.49.0.pre1'
18
18
  end
@@ -104,6 +104,9 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
104
104
  end
105
105
  add_message "grpc.testing.ClientConfigureResponse" do
106
106
  end
107
+ add_message "grpc.testing.MemorySize" do
108
+ optional :rss, :int64, 1
109
+ end
107
110
  add_enum "grpc.testing.PayloadType" do
108
111
  value :COMPRESSABLE, 0
109
112
  end
@@ -139,6 +142,7 @@ module Grpc
139
142
  ClientConfigureRequest::Metadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("grpc.testing.ClientConfigureRequest.Metadata").msgclass
140
143
  ClientConfigureRequest::RpcType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("grpc.testing.ClientConfigureRequest.RpcType").enummodule
141
144
  ClientConfigureResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("grpc.testing.ClientConfigureResponse").msgclass
145
+ MemorySize = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("grpc.testing.MemorySize").msgclass
142
146
  PayloadType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("grpc.testing.PayloadType").enummodule
143
147
  GrpclbRouteType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("grpc.testing.GrpclbRouteType").enummodule
144
148
  end
@@ -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 = run_server_streamer_against_client_with_unmarshal_error(
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 = run_server_streamer(@sent_msg, @replys, @pass)
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.47.0
4
+ version: 1.49.0.pre1
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-06-21 00:00:00.000000000 Z
11
+ date: 2022-08-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: google-protobuf
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: '3.19'
19
+ version: '3.21'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: '3.19'
26
+ version: '3.21'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: googleapis-common-protos-types
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -205,15 +205,17 @@ extensions: []
205
205
  extra_rdoc_files: []
206
206
  files:
207
207
  - etc/roots.pem
208
- - grpc_c.32.ruby
208
+ - grpc_c.32-msvcrt.ruby
209
+ - grpc_c.64-msvcrt.ruby
209
210
  - grpc_c.64-ucrt.ruby
210
- - grpc_c.64.ruby
211
211
  - src/ruby/bin/math_client.rb
212
212
  - src/ruby/bin/math_pb.rb
213
213
  - src/ruby/bin/math_server.rb
214
214
  - src/ruby/bin/math_services_pb.rb
215
215
  - src/ruby/bin/noproto_client.rb
216
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
217
219
  - src/ruby/ext/grpc/ext-export.clang
218
220
  - src/ruby/ext/grpc/ext-export.gcc
219
221
  - src/ruby/ext/grpc/extconf.rb
@@ -351,9 +353,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
351
353
  version: 3.2.dev
352
354
  required_rubygems_version: !ruby/object:Gem::Requirement
353
355
  requirements:
354
- - - ">="
356
+ - - ">"
355
357
  - !ruby/object:Gem::Version
356
- version: '0'
358
+ version: 1.3.1
357
359
  requirements: []
358
360
  rubygems_version: 3.3.4
359
361
  signing_key: