grpc 1.46.3-x86_64-darwin → 1.48.0-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: a2bd1a36c22675fb327cdfcae43a07536bedee866d5695bde4491fe22c6e856d
4
- data.tar.gz: 147fafaea5bfa81778f2312ea7cb0ec426e56b799d05468d6470fb70c6975731
3
+ metadata.gz: 05fa97ed319e62faac05cc2c2b5c368b32497bd39dec67c863f470dd4cfa74ee
4
+ data.tar.gz: d8ee2ead275b4f5f0b519723f52b8c0846d006dbeabe0d86dea45108d15bbed5
5
5
  SHA512:
6
- metadata.gz: fcc61465294e5a07061c0703aee512d3b933a6941a6ae145d8ae3ac8cb61f4ea6ecc60a51a6620086a540cf16621005c59f7f12ab5e11d3f954cb945f46f02eb
7
- data.tar.gz: d572068da711808ff70ad77a238aa40f1b19a5546ec08fcded33494ace22b492e8cc6a9d801263fb111c16a1f9c04a38bca2f9f8d11a7cc0b34360d8ab1a550b
6
+ metadata.gz: ad795c14f0978b637bd12268626394241379a4ee0b98d07868750ca8d407e2346bec7f1e5e811846c1ed54b84441dad3268073b10056ee3ca49f19284ad0e325
7
+ data.tar.gz: e9f5c55e4df34173d3261ac9361a72f757cfef4ae9a61e928a3a966b83b38b34c6d128455594bc2dce8494f34024ecebb4e95b0fe778bcf42e0c18c42359ba62
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
  };
@@ -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.46.3\"" '
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,10 +127,13 @@ 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
- $CFLAGS << ' -std=c99 '
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 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.46.3'
17
+ VERSION = '1.48.0'
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.46.3
4
+ version: 1.48.0
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-05-20 00:00:00.000000000 Z
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