Skip to content

Commit 4a7d6b6

Browse files
authored
Fix multiple build/release issues (temporalio#135)
1 parent 4556c0f commit 4a7d6b6

9 files changed

+51
-28
lines changed

.gitignore

+3-1
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,11 @@ _yardoc/
99
/spec/reports/
1010
/tmp/
1111

12+
*.gem
13+
1214
# Thermite artefacts
1315
mkmf.log
14-
lib/bridge.so
16+
lib/temporal_sdk_ruby_bridge.*
1517

1618
# rspec failure tracking
1719
.rspec_status

Gemfile.lock

+9-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
PATH
22
remote: .
33
specs:
4-
temporalio (0.1.0)
4+
temporalio (0.1.1)
55
async
66
google-protobuf (~> 3.21.1)
77
rexml (~> 3.2.5)
@@ -31,11 +31,19 @@ GEM
3131
fiber-local (1.0.0)
3232
fileutils (1.7.0)
3333
google-protobuf (3.21.12)
34+
google-protobuf (3.21.12-x86_64-darwin)
35+
google-protobuf (3.21.12-x86_64-linux)
3436
googleapis-common-protos-types (1.5.0)
3537
google-protobuf (~> 3.14)
3638
grpc (1.52.0)
3739
google-protobuf (~> 3.21)
3840
googleapis-common-protos-types (~> 1.0)
41+
grpc (1.52.0-x86_64-darwin)
42+
google-protobuf (~> 3.21)
43+
googleapis-common-protos-types (~> 1.0)
44+
grpc (1.52.0-x86_64-linux)
45+
google-protobuf (~> 3.21)
46+
googleapis-common-protos-types (~> 1.0)
3947
grpc-tools (1.52.0)
4048
i18n (1.12.0)
4149
concurrent-ruby (~> 1.0)

bridge/Cargo.lock

+20-20
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

bridge/Cargo.toml

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
2-
name = "bridge"
3-
version = "0.1.0"
2+
name = "temporal-sdk-ruby-bridge"
3+
version = "0.1.1"
44
authors = ["Anthony D <[email protected]>"]
55
edition = "2021"
66
repository = "https://github.com/temporalio/sdk-ruby"
@@ -22,7 +22,7 @@ tonic = "0.8"
2222
url = "2.2"
2323

2424
[lib]
25-
name = "bridge"
25+
name = "temporal_sdk_ruby_bridge"
2626
crate-type = ["dylib"]
2727

2828
[package.metadata.thermite]

lib/temporalio/bridge.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ module Temporalio
88
# @api private
99
module Bridge
1010
Rutie
11-
.new(:bridge, lib_path: '', lib_suffix: 'so', lib_prefix: '')
11+
.new(:temporal_sdk_ruby_bridge, lib_path: '', lib_suffix: 'so', lib_prefix: '')
1212
.init('init_bridge', BRIDGE_DIR)
1313
end
1414
end

lib/temporalio/version.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
module Temporalio
2-
VERSION = '0.1.0'.freeze
2+
VERSION = '0.1.1'.freeze
33
end

lib/thermite_patch.rb

+10
Original file line numberDiff line numberDiff line change
@@ -19,5 +19,15 @@ def cargo_target_path(profile, *path_components)
1919
target_base = ENV.fetch('CARGO_TARGET_DIR', File.join(rust_toplevel_dir, 'target'))
2020
File.join(target_base, ENV.fetch('CARGO_BUILD_TARGET', ''), profile, *path_components)
2121
end
22+
23+
def dynamic_linker_flags
24+
@dynamic_linker_flags ||= begin
25+
default_flags = RbConfig::CONFIG['DLDFLAGS'].strip
26+
if target_os == 'darwin' && !default_flags.include?('-Wl,-undefined,dynamic_lookup')
27+
default_flags += ' -Wl,-undefined,dynamic_lookup'
28+
end
29+
default_flags
30+
end
31+
end
2232
end
2333
end

sig/thermite_patch.rbs

+2
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,12 @@ module Thermite
44
def target_os: -> String
55
def cargo_target_path: (String, *String) -> String
66
def rust_toplevel_dir: -> String
7+
def dynamic_linker_flags: -> String
78

89
private
910

1011
@target_arch: String?
1112
@target_os: String?
13+
@dynamic_linker_flags: String?
1214
end
1315
end

temporalio.gemspec

+2-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,8 @@ Gem::Specification.new do |spec|
1515
spec.extensions = ['ext/Rakefile']
1616

1717
spec.files =
18-
Dir['lib/**/*.*'] +
18+
Dir['lib/**/*.rb'] +
19+
Dir['sig/**/*.rbs'] +
1920
Dir['bridge/**/*.*'].reject { |x| x.include?('/target/') } +
2021
%w[ext/Rakefile temporalio.gemspec Gemfile LICENSE README.md]
2122

0 commit comments

Comments
 (0)