File tree 6 files changed +14
-12
lines changed
packages/npm-packages/ruby-wasm-wasi/example/require_relative
6 files changed +14
-12
lines changed Original file line number Diff line number Diff line change @@ -14,5 +14,5 @@ group :check do
14
14
# Use the latest version of webrick for URI change in Ruby 3.4
15
15
gem "webrick" , "~> 1.8.2"
16
16
gem "syntax_tree" , "~> 3.5"
17
- gem "steep" , "~> 1.9 " if RUBY_VERSION >= "3.1.0"
17
+ gem "steep" , "1.10.0 " if RUBY_VERSION >= "3.1.0"
18
18
end
Original file line number Diff line number Diff line change @@ -46,7 +46,7 @@ def self.check_executable(command)
46
46
%i[ cc cxx ranlib ld ar ] . each do |name |
47
47
define_method ( name ) do
48
48
@tools_cache ||= { } #: Hash[String, String]
49
- @tools_cache [ name ] ||= find_tool ( name )
49
+ __skip__ = @tools_cache [ name ] ||= find_tool ( name )
50
50
@tools_cache [ name ]
51
51
end
52
52
end
Original file line number Diff line number Diff line change 1
1
module RubyWasm ::Packager ::ComponentAdapter
2
- module_function
3
-
4
2
# The path to the component adapter for the given WASI execution model.
5
3
#
6
4
# @param exec_model [String] "command" or "reactor"
7
- def wasi_snapshot_preview1 ( exec_model )
5
+ def self . wasi_snapshot_preview1 ( exec_model )
8
6
File . join (
9
7
File . dirname ( __FILE__ ) ,
10
8
"component_adapter" ,
Original file line number Diff line number Diff line change 21
21
end
22
22
end
23
23
24
- # "bundle install --standalone" does not care about bundled gems , so we need
25
- # to activate them manually .
26
- Gem ::Dependency . new ( "csv" ) . to_spec . activate
27
-
28
- # The above patch does not break the original require_relative
29
- require 'csv'
30
- csv = CSV . new "foo\nbar\n"
24
+ # The above patch should not break the original require_relative
25
+ require 'uri'
26
+ URI . parse ( 'http://example.com' )
31
27
32
28
# Load the main script
33
29
require_relative 'main'
Original file line number Diff line number Diff line change @@ -29,7 +29,10 @@ module RubyWasm
29
29
30
30
def initialize : (stdout: IO, stderr: IO) -> void
31
31
32
+ def run : (Array[String] args) -> void
33
+
32
34
def build : (Array[String] args) -> void
35
+ def do_build_with_force_ruby_platform : (cli_options options) -> void
33
36
def pack : (Array[String] args) -> void
34
37
35
38
private
@@ -49,5 +52,6 @@ module RubyWasm
49
52
50
53
self .@logger: Logger?
51
54
def self.logger : () -> Logger
55
+ def self.logger= : (Logger) -> void
52
56
attr_accessor self .log_level: Symbol
53
57
end
Original file line number Diff line number Diff line change @@ -70,8 +70,12 @@ class RubyWasm::Packager
70
70
def build_strategy : () -> BuildStrategy
71
71
72
72
class BuildStrategy
73
+ include RubyWasm::_Cacheable
74
+
73
75
@packager: RubyWasm::Packager
74
76
def initialize : (RubyWasm::Packager) -> void
77
+ def target : () -> RubyWasm::Target
78
+ def artifact : () -> string
75
79
def build : (RubyWasm::BuildExecutor, untyped options) -> String
76
80
def specs_with_extensions : () -> Array[[untyped , Array[string]]]
77
81
def build_gem_exts : (RubyWasm::BuildExecutor, string gem_home) -> void
You can’t perform that action at this time.
0 commit comments