grpc 1.47.0-x86_64-darwin → 1.48.0.pre1-x86_64-darwin

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: 0cdba64a163fb521496ef944dea3ea3e933300623f1856e7e3d94a698b3a5f0c
4
- data.tar.gz: ea05da2b99b582d41fc09cc4d4ce88af11d501f55ebcd4cd361b52d436eb63f9
3
+ metadata.gz: 9612985c52cb86a0d04cfc112e9a2239d9b273f40e7e00af22cd16fed9846ea0
4
+ data.tar.gz: 6ffb6dd517bc6075898e364819b347a1d1841ab4d8080d3deda5683163c3a666
5
5
  SHA512:
6
- metadata.gz: faa99e21c49067700a9f556ac01ccf365c2dd8924ab1a4bb32e640f4ebd8aac58e1c4b2a61e15cbd911d72ca27035a9afb644a76ca513eb897af5befd1d364ec
7
- data.tar.gz: '0883f3a1b321376d8bca43340388b66f2fa1b0f43b1895e56952d7342ffd290254bb91ca2b1d2adb634fb27a99dd6536341bf5a45b86ebeaf3bbeb198caf748b'
6
+ metadata.gz: ac879b915dba2f2fb520c85aca49439f1e1bd3d5cbf882e06d396ee4ed25a7c7c056341bb9909a0ce091303aa40d4b7365ac785f0039cc292a18982e3ed680ed
7
+ data.tar.gz: 92d684e588224f3ddc683c05460cc8738ccb253cf95a95e774c0fe6b7d0ed7f8efe69f8f5e61f1be67b47a42fbfec9c0809cfe85f7b031f2df091c99e269fdee
@@ -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
  };
@@ -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
- if ENV['AR'].nil? || ENV['AR'].size == 0
31
- ENV['AR'] = RbConfig::CONFIG['AR']
32
+ def env_unset?(name)
33
+ ENV[name].nil? || ENV[name].size == 0
32
34
  end
33
- if ENV['CC'].nil? || ENV['CC'].size == 0
34
- ENV['CC'] = RbConfig::CONFIG['CC']
35
+
36
+ def rbconfig_set?(name)
37
+ RbConfig::CONFIG[name] && RbConfig::CONFIG[name].size > 0
35
38
  end
36
- if ENV['CXX'].nil? || ENV['CXX'].size == 0
37
- ENV['CXX'] = RbConfig::CONFIG['CXX']
39
+
40
+ def inherit_rbconfig(name)
41
+ ENV[name] = RbConfig::CONFIG[name] if env_unset?(name) && rbconfig_set?(name)
38
42
  end
39
- if ENV['LD'].nil? || ENV['LD'].size == 0
40
- ENV['LD'] = ENV['CC']
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 darwin && !cross_compiling
65
+ if apple_toolchain && !cross_compiling
44
66
  ENV['AR'] = 'libtool'
45
67
  ENV['ARFLAGS'] = '-o'
46
68
  end
47
69
 
48
- ENV['EMBED_OPENSSL'] = 'true'
49
- ENV['EMBED_ZLIB'] = 'true'
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 darwin && !cross_compiling
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
- 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\"" '
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 darwin
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,7 +127,10 @@ if grpc_config == 'dbg'
99
127
  end
100
128
 
101
129
  $LDFLAGS << ' -Wl,-wrap,memcpy' if linux
102
- $LDFLAGS << ' -static-libgcc -static-libstdc++' if linux
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
136
  $CFLAGS << ' -std=c11 '
@@ -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 darwin
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
@@ -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.48.0.pre1'
18
18
  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.48.0.pre1
5
5
  platform: x86_64-darwin
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-07-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: google-protobuf
@@ -214,6 +214,8 @@ files:
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: