beni 0.24.0 → 0.26.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +77 -0
- data/README.md +1 -1
- data/lib/beni/build_config.rb +1 -6
- data/lib/beni/builder.rb +12 -3
- data/lib/beni/selected_toolchain.rb +3 -1
- data/lib/beni/tasks.rb +3 -1
- data/lib/beni/vendor/downloader.rb +8 -4
- data/lib/beni/vendor/platform.rb +36 -0
- data/lib/beni/vendor/tarball.rb +10 -4
- data/lib/beni/vendor/toolchain.rb +26 -11
- data/lib/beni/vendor/toolchains/wasi.rake +3 -2
- data/lib/beni/vendor/unvendored_checksum.rb +15 -0
- data/lib/beni/vendor.rb +30 -44
- data/lib/beni/version.rb +1 -1
- data/sig/beni/build_config.rbs +0 -2
- data/sig/beni/builder.rbs +1 -0
- data/sig/beni/selected_toolchain.rbs +2 -2
- data/sig/beni/vendor/platform.rbs +13 -0
- data/sig/beni/vendor/tarball.rbs +2 -0
- data/sig/beni/vendor/toolchain.rbs +4 -2
- data/sig/beni/vendor/unvendored_checksum.rbs +13 -0
- data/sig/beni/vendor.rbs +8 -12
- metadata +7 -5
- data/scripts/cloud_setup.sh +0 -25
- data/sig/patches/open-uri.rbs +0 -10
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 38f0019d83181c71f73bd28ac1e0dac4496f90da8c9ea4138674ebb7563607ab
|
|
4
|
+
data.tar.gz: 9908ec932576527cce5b4accc728b5e22e118e3dd2c9447cd3ec1b1b60bfee6a
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: cc8e2f46c0d880f6906fbcf0158854c62300e76287b1c2fc36be14fce337a6c0b4755c39178eccc00872545ffb99618a874cf249954cd77d5943e368209e7540
|
|
7
|
+
data.tar.gz: a6656f2edb19c7f52ee1478598e037cf485322926f0fe37ef21d82dcfb4f37a37298b7b12817a1fc97b7fe7da87dab8105784801e8864d4efa6870838acd86e1
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,82 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [0.26.0](https://github.com/elct9620/beni/compare/v0.25.0...v0.26.0) (2026-11-06)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### ⚠ BREAKING CHANGES
|
|
7
|
+
|
|
8
|
+
* **beni:** `RString::as_bytes` is renamed `as_slice`; `ReprValue::freeze` returns `()` instead of the receiver; `RArray::join` takes an `IntoRString` separator, so `Some(sep)` becomes `sep` and `None` becomes `""`.
|
|
9
|
+
|
|
10
|
+
### Features
|
|
11
|
+
|
|
12
|
+
* **beni:** read frames in every build, as magnus's DebugInspector does ([7a3b01d](https://github.com/elct9620/beni/commit/7a3b01d6b44ee3cf861d3282f5c2aad1097b9c77))
|
|
13
|
+
* **beni:** take a join separator through IntoRString and read string bytes as as_slice ([0c2f6bd](https://github.com/elct9620/beni/commit/0c2f6bd540d1782af15e0e8a906401acb450b685))
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
### Bug Fixes
|
|
17
|
+
|
|
18
|
+
* **beni:** accept only an initialized Range into the Range handle ([85a3005](https://github.com/elct9620/beni/commit/85a3005107f8a0fd9a53401afdd36ddde5dc2445))
|
|
19
|
+
* **beni:** copy a file name out before the next name read rewrites it ([aadf0b0](https://github.com/elct9620/beni/commit/aadf0b01a3d7ae8a9d54051885fe6fd4363b854e))
|
|
20
|
+
* **beni:** find no frames when the inspector opens with no Ruby call running ([11b6f87](https://github.com/elct9620/beni/commit/11b6f8708b0007cc64c7faf5a3a6a26ca0113f65))
|
|
21
|
+
* **beni:** read a String allocated without content as no bytes ([822a9f1](https://github.com/elct9620/beni/commit/822a9f17423e1cb340cd8ed090c6e12394f037b5))
|
|
22
|
+
* **gemspec:** leave the cloud bootstrap and the steep patch out of the package ([c6b5a12](https://github.com/elct9620/beni/commit/c6b5a12d2d40a050831d3cdd0a5d6edc10a4836d))
|
|
23
|
+
* **tasks:** clean every build tree and staged toolchain, not only the declared ones ([ca0b8d6](https://github.com/elct9620/beni/commit/ca0b8d62ec86caf19d4ed9234a9eb2cc56956894))
|
|
24
|
+
* **tasks:** stage and read the archive from one vendor tree ([5346e9c](https://github.com/elct9620/beni/commit/5346e9cfec90405f1391a9ac2ca44a03f2c91b49))
|
|
25
|
+
* **vendor:** leave no partial download behind when a fetch fails ([4bf2af3](https://github.com/elct9620/beni/commit/4bf2af3cdcb85b798d23dfa1e5e50613d8e9dc39))
|
|
26
|
+
* **vendor:** refuse a missing platform checksum at setup and drop a tarball that fails verification ([e3ca724](https://github.com/elct9620/beni/commit/e3ca724128f172ab607e0f9b3d5ffb95f45c6c22))
|
|
27
|
+
|
|
28
|
+
## [0.25.0](https://github.com/elct9620/beni/compare/v0.24.0...v0.25.0) (2026-10-22)
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
### ⚠ BREAKING CHANGES
|
|
32
|
+
|
|
33
|
+
* **beni:** Symbol::to_str is removed; call to_r_string, which answers a Result.
|
|
34
|
+
* **beni:** the calls take an ArgList and name their result type. &[] becomes (), &[a, b] becomes [a, b] or (a, b), &vec becomes vec.as_slice(), and funcall::<_, _, Value> keeps the untyped result.
|
|
35
|
+
* **beni:** RArray::entry / pop / shift, RHash::delete, and Mrb::gv_get name their result type (entry::<Value> to keep the untyped read; entry and gv_get now return Result); Symbol::new takes AsRef<str> instead of &CStr.
|
|
36
|
+
* **beni:** Id::name / name_bytes / dump and Symbol::name / name_bytes / dump return Result instead of Option.
|
|
37
|
+
* **beni:** Mrb::load_string(bytes) is now Mrb::eval::<T>(str); name Value as T to keep the untyped result.
|
|
38
|
+
* **beni:** Mrb::sym_name(id), sym_name_len(id), and sym_dump(id) are now id.name(mrb), id.name_bytes(mrb), and id.dump(mrb).
|
|
39
|
+
* **beni:** Range::begin is now beg and Range::is_exclusive is now excl; beg and end take a TryConvert target and return a Result.
|
|
40
|
+
* **beni:** RString::cat_str is now RString::buf_append.
|
|
41
|
+
* **beni:** Module::alias_method is now Module::define_alias.
|
|
42
|
+
* **beni:** Mrb::str_new_capa is now Mrb::str_buf_new.
|
|
43
|
+
* **beni:** Mrb::full_gc is now Mrb::gc_start.
|
|
44
|
+
* **beni:** RHash::set, get, and fetch are now aset, aref, and lookup2; aref and lookup2 name their result type.
|
|
45
|
+
* **beni:** Mrb::object_class is now Mrb::class_object.
|
|
46
|
+
|
|
47
|
+
### Features
|
|
48
|
+
|
|
49
|
+
* **beni-sys:** publish whether the archive is a bigint archive ([661f79f](https://github.com/elct9620/beni/commit/661f79f819b00a6bbc8f7bab3c4148194578cf88))
|
|
50
|
+
* **beni:** alias a method through magnus's define_alias ([2d1711a](https://github.com/elct9620/beni/commit/2d1711ab5464b00e321990613f4041228216e752))
|
|
51
|
+
* **beni:** answer a typed payload as a raw pointer through as_ptr ([d79dc03](https://github.com/elct9620/beni/commit/d79dc03d5d1bbde8ca28d912c42a4423271beebf))
|
|
52
|
+
* **beni:** append one string to another through magnus's buf_append ([3cb74d0](https://github.com/elct9620/beni/commit/3cb74d078518bc8e689350f350bfdb82ab804082))
|
|
53
|
+
* **beni:** build a string with capacity through magnus's str_buf_new ([b2010ec](https://github.com/elct9620/beni/commit/b2010ecab203698dbd89ee40c12a2567b3fbac19))
|
|
54
|
+
* **beni:** build an Integer from every Rust integer a bigint archive holds ([9d99fee](https://github.com/elct9620/beni/commit/9d99fee2478daf754b4879e83788d2f9207b158a))
|
|
55
|
+
* **beni:** convert any Numeric through magnus's NumericValue ([de4d310](https://github.com/elct9620/beni/commit/de4d310ba51a9b565789ad27a7a665622a3df599))
|
|
56
|
+
* **beni:** convert nil, true, false, and Symbol handles into heap collections ([6b7cdd9](https://github.com/elct9620/beni/commit/6b7cdd9268711fae3368e2ffbc28907f3b891a68))
|
|
57
|
+
* **beni:** convert Rust text, paths, and collections into Ruby values ([de4a50c](https://github.com/elct9620/beni/commit/de4a50c29e925f4e9349144af007c1e951264a8b))
|
|
58
|
+
* **beni:** convert Time, IO, and Enumerator instances as magnus does ([550a918](https://github.com/elct9620/beni/commit/550a918592923a877255fd80a1c48de442dd23a2))
|
|
59
|
+
* **beni:** evaluate Ruby source through magnus's eval ([7b3c1ad](https://github.com/elct9620/beni/commit/7b3c1ad85e08abcb74f08f600c95c67733984946))
|
|
60
|
+
* **beni:** pass call arguments through magnus's ArgList ([cad0366](https://github.com/elct9620/beni/commit/cad0366b7655347b8bc50d22e571bede07467de1))
|
|
61
|
+
* **beni:** read a range's bounds through magnus's beg, end, and excl ([3a9d0d5](https://github.com/elct9620/beni/commit/3a9d0d5ed3fc738e178066127bfa5caa9c0ce53f))
|
|
62
|
+
* **beni:** read an id's name on the Id, as magnus places it ([17f02ce](https://github.com/elct9620/beni/commit/17f02cec134acf5faacd9e6f921fc763634cf626))
|
|
63
|
+
* **beni:** read an Integer into every Rust integer its range holds ([500aad5](https://github.com/elct9620/beni/commit/500aad51f09b4d31d05818bd49f996551b00819b))
|
|
64
|
+
* **beni:** read and assign hash entries through magnus's names ([f10988a](https://github.com/elct9620/beni/commit/f10988a24182b1dd750fb21b55d250ee4f35636f))
|
|
65
|
+
* **beni:** read symbol names fallibly, as magnus's Id::name does ([d518990](https://github.com/elct9620/beni/commit/d51899043bd09a42037579aef69345ca9054a7d2))
|
|
66
|
+
* **beni:** read the core classes and define global functions as magnus does ([ba02a08](https://github.com/elct9620/beni/commit/ba02a08391035f411ede26f65de0a006ed3790e5))
|
|
67
|
+
* **beni:** render a symbol's name through ReprValue::to_r_string ([657aa6e](https://github.com/elct9620/beni/commit/657aa6ec61de77a57de13344c757ed6c1bd55a68))
|
|
68
|
+
* **beni:** run a full collection through magnus's gc_start ([5fc51c9](https://github.com/elct9620/beni/commit/5fc51c9cc7d26a3c9ecdd1e650472a70d0aa6675))
|
|
69
|
+
* **beni:** tell a Fixnum from an RBignum, as magnus does ([ec6c247](https://github.com/elct9620/beni/commit/ec6c247bf1ac133e49bd7a9c6d81711e5a52e2d9))
|
|
70
|
+
* **beni:** tell a word-carried Float from an allocated one, as magnus does ([0008c9a](https://github.com/elct9620/beni/commit/0008c9a27b0d2adb9a389d14c9965c0c0b551cc2))
|
|
71
|
+
* **beni:** type container and global access through magnus's signatures ([c2f62fd](https://github.com/elct9620/beni/commit/c2f62fd9073720f546df0207780e8e3bec40a3e1))
|
|
72
|
+
|
|
73
|
+
|
|
74
|
+
### Bug Fixes
|
|
75
|
+
|
|
76
|
+
* **beni:** name a non-UTF-8 class lossily when refusing its redefinition ([534368e](https://github.com/elct9620/beni/commit/534368ee0fa4137f528fc05b2a9e154da4aa5ef7))
|
|
77
|
+
* **beni:** read a parsed integer through its tag ([320ee04](https://github.com/elct9620/beni/commit/320ee0443bf27dd0889e9b2b8042df7744b7d087))
|
|
78
|
+
* **beni:** read class names and renders lossily, as magnus does ([b73b4d5](https://github.com/elct9620/beni/commit/b73b4d50dd98fb4ef615a40df795636a3191cdd4))
|
|
79
|
+
|
|
3
80
|
## [0.24.0](https://github.com/elct9620/beni/compare/v0.23.1...v0.24.0) (2026-10-22)
|
|
4
81
|
|
|
5
82
|
|
data/README.md
CHANGED
|
@@ -83,7 +83,7 @@ struct WidgetGem;
|
|
|
83
83
|
|
|
84
84
|
impl Gem for WidgetGem {
|
|
85
85
|
fn init(mrb: &Mrb) -> Result<(), Error> {
|
|
86
|
-
let widget = mrb.define_class(c"Widget", mrb.
|
|
86
|
+
let widget = mrb.define_class(c"Widget", mrb.class_object())?;
|
|
87
87
|
widget.define_method(mrb, c"answer", method!(answer, 0))?;
|
|
88
88
|
Ok(())
|
|
89
89
|
}
|
data/lib/beni/build_config.rb
CHANGED
|
@@ -30,16 +30,11 @@ module Beni
|
|
|
30
30
|
# wrong release.
|
|
31
31
|
def staged_default_config(mruby_dir, version)
|
|
32
32
|
source = File.join(mruby_dir, "build_config", "default.rb")
|
|
33
|
-
return source if staged_version(mruby_dir) == version && File.exist?(source)
|
|
33
|
+
return source if Vendor::Tarball.staged_version(mruby_dir) == version && File.exist?(source)
|
|
34
34
|
|
|
35
35
|
raise Error,
|
|
36
36
|
"[beni] mruby #{version}'s source is not staged at #{mruby_dir} — " \
|
|
37
37
|
"run `rake beni:vendor:setup` first"
|
|
38
38
|
end
|
|
39
|
-
|
|
40
|
-
def staged_version(mruby_dir)
|
|
41
|
-
marker = File.join(mruby_dir, Vendor::Tarball::VERSION_MARKER)
|
|
42
|
-
File.read(marker).strip if File.exist?(marker)
|
|
43
|
-
end
|
|
44
39
|
end
|
|
45
40
|
end
|
data/lib/beni/builder.rb
CHANGED
|
@@ -25,6 +25,10 @@ module Beni
|
|
|
25
25
|
# The sidecar mruby writes beside every archive it builds.
|
|
26
26
|
FLAGS_MAK = "libmruby.flags.mak"
|
|
27
27
|
|
|
28
|
+
# Where mruby clones the gem sources a build config fetches, under
|
|
29
|
+
# its build directory.
|
|
30
|
+
CLONED_GEMS_DIR = "repos"
|
|
31
|
+
|
|
28
32
|
attr_reader :vendor_dir, :build_config, :targets
|
|
29
33
|
|
|
30
34
|
def initialize(vendor_dir:, build_config: nil, targets: DEFAULT_TARGETS)
|
|
@@ -88,10 +92,15 @@ module Beni
|
|
|
88
92
|
verify_artifacts!
|
|
89
93
|
end
|
|
90
94
|
|
|
91
|
-
# Remove
|
|
95
|
+
# Remove every build tree, declared or not, keeping the vendored
|
|
96
|
+
# mruby source and the gem sources mruby clones into +build/repos+,
|
|
97
|
+
# which mruby's own +clean+ keeps too.
|
|
92
98
|
def clean
|
|
93
|
-
|
|
94
|
-
|
|
99
|
+
build_dir = File.join(mruby_dir, "build")
|
|
100
|
+
return unless Dir.exist?(build_dir)
|
|
101
|
+
|
|
102
|
+
(Dir.children(build_dir) - [CLONED_GEMS_DIR]).each do |entry|
|
|
103
|
+
dir = File.join(build_dir, entry)
|
|
95
104
|
FileUtils.rm_rf(dir)
|
|
96
105
|
puts "[beni] removed #{dir}"
|
|
97
106
|
end
|
|
@@ -5,7 +5,9 @@ module Beni
|
|
|
5
5
|
# +sha256+ is concrete at resolution time — a definition's declared
|
|
6
6
|
# value or the built-in checksum +Beni::Vendor+ resolves. +nil+ has
|
|
7
7
|
# exactly one reachable meaning: mruby at a non-default version, where
|
|
8
|
-
# verification falls to the TOFU sidecar path.
|
|
8
|
+
# verification falls to the TOFU sidecar path. A
|
|
9
|
+
# +Vendor::UnvendoredChecksum+ stands for a built-in pair lacking the
|
|
10
|
+
# build platform's checksum, which setup refuses.
|
|
9
11
|
class SelectedToolchain < Data.define(:name, :version, :sha256)
|
|
10
12
|
end
|
|
11
13
|
end
|
data/lib/beni/tasks.rb
CHANGED
|
@@ -103,7 +103,9 @@ module Beni
|
|
|
103
103
|
def define_vendor_clean_tasks
|
|
104
104
|
desc "Remove unpacked vendor toolchains (keeps cached tarballs)"
|
|
105
105
|
task :clean do
|
|
106
|
-
|
|
106
|
+
Vendor::TOOLCHAIN_FACTORIES.each_key do |name|
|
|
107
|
+
FileUtils.rm_rf(File.join(configuration.vendor_dir, Vendor.staged_dir(name)))
|
|
108
|
+
end
|
|
107
109
|
end
|
|
108
110
|
|
|
109
111
|
desc "Remove #{configuration.vendor_dir} entirely (unpacked trees and cached tarballs)"
|
|
@@ -32,14 +32,18 @@ module Beni
|
|
|
32
32
|
end
|
|
33
33
|
|
|
34
34
|
# Fetch +url+ into +dest+ atomically via a +.part+ sidecar, retrying
|
|
35
|
-
# transient failures with exponential backoff.
|
|
36
|
-
# (4xx, DNS resolution failure on non-network condition) surface
|
|
35
|
+
# transient failures with exponential backoff. A 4xx surfaces
|
|
37
36
|
# immediately. Raises whatever the underlying +URI#open+ raises after
|
|
38
|
-
# the retry budget is exhausted.
|
|
37
|
+
# the retry budget is exhausted, leaving no +.part+ behind.
|
|
39
38
|
def download
|
|
40
39
|
FileUtils.mkdir_p(File.dirname(@dest))
|
|
41
40
|
tmp = "#{@dest}.part"
|
|
42
|
-
|
|
41
|
+
begin
|
|
42
|
+
with_retry { fetch(tmp) }
|
|
43
|
+
rescue StandardError
|
|
44
|
+
FileUtils.rm_f(tmp)
|
|
45
|
+
raise
|
|
46
|
+
end
|
|
43
47
|
File.rename(tmp, @dest)
|
|
44
48
|
end
|
|
45
49
|
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Beni
|
|
4
|
+
# The build platform half of the vendor façade: how the host's
|
|
5
|
+
# +RUBY_PLATFORM+ names the platform toolchains key their tarballs by.
|
|
6
|
+
module Vendor
|
|
7
|
+
# +RUBY_PLATFORM+ spells the same architecture and operating system
|
|
8
|
+
# differently across hosts; toolchains key their per-platform tarballs
|
|
9
|
+
# by one spelling each.
|
|
10
|
+
ARCH_ALIASES = { "x64" => "x86_64", "amd64" => "x86_64", "aarch64" => "arm64" }.freeze
|
|
11
|
+
OS_ALIASES = { /darwin/ => "macos", /linux/ => "linux", /mingw|mswin/ => "windows" }.freeze
|
|
12
|
+
|
|
13
|
+
# The build platform: the architecture and operating system the Rake
|
|
14
|
+
# tasks run on, spelled the way toolchains key their tarballs. Derived
|
|
15
|
+
# from the host rather than matched against a covered set, so a host no
|
|
16
|
+
# toolchain vendors a tarball for still has a name to be named in.
|
|
17
|
+
def self.build_platform(platform = RUBY_PLATFORM)
|
|
18
|
+
"#{platform_arch(platform)}-#{platform_os(platform)}"
|
|
19
|
+
end
|
|
20
|
+
|
|
21
|
+
def self.platform_arch(platform)
|
|
22
|
+
arch = platform.split("-").first.to_s
|
|
23
|
+
ARCH_ALIASES.fetch(arch, arch)
|
|
24
|
+
end
|
|
25
|
+
|
|
26
|
+
def self.platform_os(platform)
|
|
27
|
+
OS_ALIASES.find { |pattern, _| pattern.match?(platform) }&.last ||
|
|
28
|
+
platform.split("-")[1].to_s
|
|
29
|
+
end
|
|
30
|
+
|
|
31
|
+
private_class_method :platform_arch, :platform_os
|
|
32
|
+
|
|
33
|
+
# The build platform, resolved once at load.
|
|
34
|
+
BUILD_PLATFORM = build_platform
|
|
35
|
+
end
|
|
36
|
+
end
|
data/lib/beni/vendor/tarball.rb
CHANGED
|
@@ -18,6 +18,13 @@ module Beni
|
|
|
18
18
|
# value short-circuits +#prepare+, a mismatch forces re-extract.
|
|
19
19
|
VERSION_MARKER = ".beni-version"
|
|
20
20
|
|
|
21
|
+
# Version the last successful unpack into +dir+ recorded, or +nil+
|
|
22
|
+
# when the tree is absent or predates version stamping.
|
|
23
|
+
def self.staged_version(dir)
|
|
24
|
+
marker = File.join(dir, VERSION_MARKER)
|
|
25
|
+
File.read(marker).strip if File.exist?(marker)
|
|
26
|
+
end
|
|
27
|
+
|
|
21
28
|
def initialize(tarball:, top_level_dir:, final_dir:, version:)
|
|
22
29
|
@tarball = tarball
|
|
23
30
|
@top_level_dir = top_level_dir
|
|
@@ -44,11 +51,10 @@ module Beni
|
|
|
44
51
|
|
|
45
52
|
private
|
|
46
53
|
|
|
47
|
-
# Version recorded by the last successful unpack
|
|
48
|
-
#
|
|
54
|
+
# Version recorded by the last successful unpack; +nil+ forces a
|
|
55
|
+
# re-extract.
|
|
49
56
|
def installed_version
|
|
50
|
-
|
|
51
|
-
File.read(marker).strip if File.exist?(marker)
|
|
57
|
+
self.class.staged_version(@final_dir)
|
|
52
58
|
end
|
|
53
59
|
|
|
54
60
|
def extract_to_staging(staging)
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
|
+
require "fileutils"
|
|
4
|
+
|
|
3
5
|
module Beni
|
|
4
6
|
module Vendor
|
|
5
7
|
# Declarative value object describing a tarball-style vendored
|
|
@@ -21,8 +23,8 @@ module Beni
|
|
|
21
23
|
# stamped into +final_dir+ as the idempotency key
|
|
22
24
|
# that detects a bump and forces a re-extract.
|
|
23
25
|
# * +base_url+ — remote URL prefix; resolved through
|
|
24
|
-
# +Beni::Vendor.base_url_for
|
|
25
|
-
#
|
|
26
|
+
# +Beni::Vendor.base_url_for+, which a
|
|
27
|
+
# +BENI_VENDOR_BASE_URL+ mirror replaces.
|
|
26
28
|
# * +tarball_name+ — filename joined to both +base_url+ (download)
|
|
27
29
|
# and the +.cache+ directory (cache location).
|
|
28
30
|
# * +top_level_dir+ — the single top-level directory produced when
|
|
@@ -37,7 +39,8 @@ module Beni
|
|
|
37
39
|
# * +expected_sha256+ — the toolchain's selected checksum (resolved
|
|
38
40
|
# by +Beni::Vendor+ from the built-in pair or a
|
|
39
41
|
# consumer override); +nil+ falls to TOFU
|
|
40
|
-
# sidecar pinning in +Checksum#verify_or_pin
|
|
42
|
+
# sidecar pinning in +Checksum#verify_or_pin+,
|
|
43
|
+
# and an +UnvendoredChecksum+ refuses setup.
|
|
41
44
|
class Toolchain <
|
|
42
45
|
Data.define(:name, :version_label, :base_url, :tarball_name, :top_level_dir, :vendor_dir, :staged_dir,
|
|
43
46
|
:expected_sha256)
|
|
@@ -52,9 +55,8 @@ module Beni
|
|
|
52
55
|
name.tr("-", "_").to_sym
|
|
53
56
|
end
|
|
54
57
|
|
|
55
|
-
# Resolved download URL.
|
|
56
|
-
#
|
|
57
|
-
# test can flip the env var after the Toolchain is built.
|
|
58
|
+
# Resolved download URL. Reads the +BENI_VENDOR_BASE_URL+ mirror at
|
|
59
|
+
# call time, not at construction time.
|
|
58
60
|
def url
|
|
59
61
|
"#{Vendor.base_url_for(base_url)}/#{tarball_name}"
|
|
60
62
|
end
|
|
@@ -73,10 +75,10 @@ module Beni
|
|
|
73
75
|
# Download the tarball into +tarball_path+ and verify its SHA256.
|
|
74
76
|
# Intended as the body of the +file tarball_path+ rake task; the
|
|
75
77
|
# task's mtime-based caching avoids re-downloading on a cache hit.
|
|
76
|
-
# A
|
|
77
|
-
#
|
|
78
|
-
# trigger, and the cache-hit path re-fails it the same way.
|
|
78
|
+
# A toolchain with no checksum for the build platform is refused
|
|
79
|
+
# before anything downloads.
|
|
79
80
|
def fetch
|
|
81
|
+
expected_checksum
|
|
80
82
|
puts "[beni] downloading #{name} #{version_label} from #{url}"
|
|
81
83
|
downloader.download
|
|
82
84
|
verify
|
|
@@ -85,9 +87,13 @@ module Beni
|
|
|
85
87
|
# Recompute the cached tarball's SHA256 and check it against
|
|
86
88
|
# +expected_sha256+ (or pin via TOFU sidecar). Idempotent — safe
|
|
87
89
|
# to call from both +file+ and +setup+ task bodies when the latter
|
|
88
|
-
# depends on the former.
|
|
90
|
+
# depends on the former. A tarball failing verification leaves the
|
|
91
|
+
# cache, so the next setup downloads it again.
|
|
89
92
|
def verify
|
|
90
|
-
Checksum.new(tarball_path,
|
|
93
|
+
Checksum.new(tarball_path, expected_checksum).verify_or_pin
|
|
94
|
+
rescue Error
|
|
95
|
+
FileUtils.rm_f(tarball_path)
|
|
96
|
+
raise
|
|
91
97
|
end
|
|
92
98
|
|
|
93
99
|
# Verify the cached tarball, then unpack it into +final_dir+ via
|
|
@@ -106,6 +112,15 @@ module Beni
|
|
|
106
112
|
|
|
107
113
|
private
|
|
108
114
|
|
|
115
|
+
# The checksum verification compares against, +nil+ for a TOFU pin;
|
|
116
|
+
# raises for a built-in pair lacking the build platform's checksum.
|
|
117
|
+
def expected_checksum
|
|
118
|
+
checksum = expected_sha256
|
|
119
|
+
raise Error, checksum.message if checksum.is_a?(UnvendoredChecksum)
|
|
120
|
+
|
|
121
|
+
checksum
|
|
122
|
+
end
|
|
123
|
+
|
|
109
124
|
# The network boundary — tests override this to script the
|
|
110
125
|
# download without opening a connection.
|
|
111
126
|
def downloader
|
|
@@ -10,8 +10,9 @@ MRuby::Toolchain.new(:wasi) do |conf, _params|
|
|
|
10
10
|
wasi_sdk = ENV["WASI_SDK_PATH"] || File.join(File.expand_path("..", MRUBY_ROOT), "wasi-sdk")
|
|
11
11
|
bin = File.join(wasi_sdk, "bin")
|
|
12
12
|
target_flags = ["--target=wasm32-wasip1", "--sysroot=#{File.join(wasi_sdk, "share", "wasi-sysroot")}"]
|
|
13
|
-
# setjmp/longjmp via the wasm exception-handling mechanism:
|
|
14
|
-
#
|
|
13
|
+
# setjmp/longjmp via the wasm exception-handling mechanism: these
|
|
14
|
+
# flags go to every compile and the link, and the link adds the
|
|
15
|
+
# setjmp library.
|
|
15
16
|
sjlj_flags = ["-mllvm", "-wasm-enable-sjlj", "-mllvm", "-wasm-use-legacy-eh=false"]
|
|
16
17
|
|
|
17
18
|
conf.toolchain :clang
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Beni
|
|
4
|
+
module Vendor
|
|
5
|
+
# The checksum a platform-keyed built-in pair lacks for the build
|
|
6
|
+
# platform. It stands in for the checksum until setup, which refuses
|
|
7
|
+
# it before anything downloads, so the tasks still load there.
|
|
8
|
+
class UnvendoredChecksum < Data.define(:name, :version, :platform)
|
|
9
|
+
def message
|
|
10
|
+
"[beni] #{name} #{version} vendors no tarball for build platform #{platform}; " \
|
|
11
|
+
"declare the toolchain with a version and sha256 for this platform"
|
|
12
|
+
end
|
|
13
|
+
end
|
|
14
|
+
end
|
|
15
|
+
end
|
data/lib/beni/vendor.rb
CHANGED
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
|
+
require_relative "vendor/platform"
|
|
3
4
|
require_relative "vendor/downloader"
|
|
4
5
|
require_relative "vendor/checksum"
|
|
6
|
+
require_relative "vendor/unvendored_checksum"
|
|
5
7
|
require_relative "vendor/tarball"
|
|
6
8
|
require_relative "vendor/toolchain"
|
|
7
9
|
|
|
@@ -15,8 +17,7 @@ module Beni
|
|
|
15
17
|
# tarball extraction in +Vendor::Tarball+, and the per-toolchain
|
|
16
18
|
# pipeline composition in +Vendor::Toolchain+.
|
|
17
19
|
#
|
|
18
|
-
# Honors +BENI_VENDOR_BASE_URL+ to
|
|
19
|
-
# during tests.
|
|
20
|
+
# Honors +BENI_VENDOR_BASE_URL+ to move every download to a mirror.
|
|
20
21
|
module Vendor
|
|
21
22
|
# ---- Built-in pairs ----------------------------------------------------
|
|
22
23
|
# The version and checksum pair this release vendors per toolchain.
|
|
@@ -54,35 +55,6 @@ module Beni
|
|
|
54
55
|
# mruby source rather than serving a target, and has no built-in pair.
|
|
55
56
|
SELECTED_BY_DEFINITION = %w[prism].freeze
|
|
56
57
|
|
|
57
|
-
# +RUBY_PLATFORM+ spells the same architecture and operating system
|
|
58
|
-
# differently across hosts; toolchains key their per-platform tarballs
|
|
59
|
-
# by one spelling each.
|
|
60
|
-
ARCH_ALIASES = { "x64" => "x86_64", "amd64" => "x86_64", "aarch64" => "arm64" }.freeze
|
|
61
|
-
OS_ALIASES = { /darwin/ => "macos", /linux/ => "linux", /mingw|mswin/ => "windows" }.freeze
|
|
62
|
-
|
|
63
|
-
# The build platform: the architecture and operating system the Rake
|
|
64
|
-
# tasks run on, spelled the way toolchains key their tarballs. Derived
|
|
65
|
-
# from the host rather than matched against a covered set, so a host no
|
|
66
|
-
# toolchain vendors a tarball for still has a name to be named in.
|
|
67
|
-
def self.build_platform(platform = RUBY_PLATFORM)
|
|
68
|
-
"#{platform_arch(platform)}-#{platform_os(platform)}"
|
|
69
|
-
end
|
|
70
|
-
|
|
71
|
-
def self.platform_arch(platform)
|
|
72
|
-
arch = platform.split("-").first.to_s
|
|
73
|
-
ARCH_ALIASES.fetch(arch, arch)
|
|
74
|
-
end
|
|
75
|
-
|
|
76
|
-
def self.platform_os(platform)
|
|
77
|
-
OS_ALIASES.find { |pattern, _| pattern.match?(platform) }&.last ||
|
|
78
|
-
platform.split("-")[1].to_s
|
|
79
|
-
end
|
|
80
|
-
|
|
81
|
-
private_class_method :platform_arch, :platform_os
|
|
82
|
-
|
|
83
|
-
# The build platform, resolved once at load.
|
|
84
|
-
BUILD_PLATFORM = build_platform
|
|
85
|
-
|
|
86
58
|
# Known toolchain names mapped to their factory methods — the name
|
|
87
59
|
# domain the DSL validates against and +Beni::Tasks+ dispatches on.
|
|
88
60
|
TOOLCHAIN_FACTORIES = {
|
|
@@ -91,10 +63,16 @@ module Beni
|
|
|
91
63
|
"prism" => :prism
|
|
92
64
|
}.freeze
|
|
93
65
|
|
|
66
|
+
# Where a toolchain staging somewhere other than its own name under
|
|
67
|
+
# the vendor tree unpacks; every other one unpacks at its name.
|
|
68
|
+
STAGED_DIRS = {
|
|
69
|
+
"prism" => File.join("mruby", "mrbgems", "mruby-compiler", "lib", "prism")
|
|
70
|
+
}.freeze
|
|
71
|
+
|
|
94
72
|
module_function
|
|
95
73
|
|
|
96
74
|
def wasi_sdk(vendor_dir:, version: nil, sha256: nil)
|
|
97
|
-
version ||=
|
|
75
|
+
version ||= built_in_version("wasi-sdk")
|
|
98
76
|
# The release tag carries the major version only; tarballs carry the
|
|
99
77
|
# full version plus the platform.
|
|
100
78
|
Toolchain.new(
|
|
@@ -109,7 +87,7 @@ module Beni
|
|
|
109
87
|
end
|
|
110
88
|
|
|
111
89
|
def mruby(vendor_dir:, version: nil, sha256: nil)
|
|
112
|
-
version ||=
|
|
90
|
+
version ||= built_in_version("mruby")
|
|
113
91
|
Toolchain.new(
|
|
114
92
|
name: "mruby",
|
|
115
93
|
version_label: version,
|
|
@@ -133,14 +111,14 @@ module Beni
|
|
|
133
111
|
tarball_name: "#{version}.tar.gz",
|
|
134
112
|
top_level_dir: "prism-#{version}",
|
|
135
113
|
vendor_dir: vendor_dir,
|
|
136
|
-
staged_dir:
|
|
114
|
+
staged_dir: staged_dir("prism"),
|
|
137
115
|
expected_sha256: sha256
|
|
138
116
|
)
|
|
139
117
|
end
|
|
140
118
|
|
|
141
119
|
# When BENI_VENDOR_BASE_URL is set, all tarballs are fetched from that
|
|
142
|
-
#
|
|
143
|
-
# +tarball_name
|
|
120
|
+
# mirror, which serves each toolchain's tarball under its exact
|
|
121
|
+
# +tarball_name+.
|
|
144
122
|
def base_url_for(default)
|
|
145
123
|
override = ENV.fetch("BENI_VENDOR_BASE_URL", nil)
|
|
146
124
|
return default if override.nil? || override.empty?
|
|
@@ -148,24 +126,32 @@ module Beni
|
|
|
148
126
|
override.chomp("/")
|
|
149
127
|
end
|
|
150
128
|
|
|
129
|
+
# The version +name+'s built-in pair vendors.
|
|
130
|
+
def built_in_version(name)
|
|
131
|
+
BUILT_IN_PAIRS.fetch(name).fetch(:version)
|
|
132
|
+
end
|
|
133
|
+
private_class_method :built_in_version
|
|
134
|
+
|
|
135
|
+
# Where +name+ unpacks, relative to the vendor tree.
|
|
136
|
+
def staged_dir(name)
|
|
137
|
+
STAGED_DIRS.fetch(name, name)
|
|
138
|
+
end
|
|
139
|
+
|
|
151
140
|
# The built-in checksum for +name+ at +version+: the build platform's
|
|
152
141
|
# entry when the toolchain's checksums are platform-keyed, +nil+ for
|
|
153
142
|
# any version other than the vendored one — mruby's TOFU pinning path.
|
|
154
143
|
# A platform-keyed pair carrying no entry for +platform+ vendors no
|
|
155
|
-
# tarball there
|
|
156
|
-
#
|
|
144
|
+
# tarball there: the lookup answers an +UnvendoredChecksum+, which
|
|
145
|
+
# setup refuses, rather than letting another platform's checksum
|
|
146
|
+
# stand in.
|
|
157
147
|
def built_in_sha256(name, version, platform = BUILD_PLATFORM)
|
|
158
148
|
pair = BUILT_IN_PAIRS.fetch(name)
|
|
159
|
-
return nil unless version ==
|
|
149
|
+
return nil unless version == built_in_version(name)
|
|
160
150
|
|
|
161
151
|
checksum = pair.fetch(:sha256)
|
|
162
152
|
return checksum unless checksum.is_a?(Hash)
|
|
163
153
|
|
|
164
|
-
checksum.fetch(platform)
|
|
165
|
-
raise Error, "[beni] #{name} #{version} vendors no tarball for build platform " \
|
|
166
|
-
"#{platform}; declare the toolchain with a version and sha256 " \
|
|
167
|
-
"for this platform"
|
|
168
|
-
end
|
|
154
|
+
checksum.fetch(platform) { UnvendoredChecksum.new(name:, version:, platform:) }
|
|
169
155
|
end
|
|
170
156
|
|
|
171
157
|
# Write the gem-shipped wasi toolchain file into the staged mruby
|
data/lib/beni/version.rb
CHANGED
data/sig/beni/build_config.rbs
CHANGED
data/sig/beni/builder.rbs
CHANGED
|
@@ -2,8 +2,8 @@ module Beni
|
|
|
2
2
|
class SelectedToolchain
|
|
3
3
|
attr_reader name: String
|
|
4
4
|
attr_reader version: String
|
|
5
|
-
attr_reader sha256: String?
|
|
5
|
+
attr_reader sha256: (String | Vendor::UnvendoredChecksum)?
|
|
6
6
|
|
|
7
|
-
def initialize: (name: String, version: String, sha256: String?) -> void
|
|
7
|
+
def initialize: (name: String, version: String, sha256: (String | Vendor::UnvendoredChecksum)?) -> void
|
|
8
8
|
end
|
|
9
9
|
end
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
module Beni
|
|
2
|
+
module Vendor
|
|
3
|
+
ARCH_ALIASES: Hash[String, String]
|
|
4
|
+
OS_ALIASES: Hash[Regexp, String]
|
|
5
|
+
BUILD_PLATFORM: String
|
|
6
|
+
|
|
7
|
+
def self.build_platform: (?String platform) -> String
|
|
8
|
+
|
|
9
|
+
def self.platform_arch: (String platform) -> String
|
|
10
|
+
|
|
11
|
+
def self.platform_os: (String platform) -> String
|
|
12
|
+
end
|
|
13
|
+
end
|
data/sig/beni/vendor/tarball.rbs
CHANGED
|
@@ -8,9 +8,9 @@ module Beni
|
|
|
8
8
|
attr_reader top_level_dir: String
|
|
9
9
|
attr_reader vendor_dir: String
|
|
10
10
|
attr_reader staged_dir: String
|
|
11
|
-
attr_reader expected_sha256: String?
|
|
11
|
+
attr_reader expected_sha256: (String | UnvendoredChecksum)?
|
|
12
12
|
|
|
13
|
-
def initialize: (name: String, version_label: String, base_url: String, tarball_name: String, top_level_dir: String, vendor_dir: String, ?staged_dir: String, expected_sha256: String?) -> void
|
|
13
|
+
def initialize: (name: String, version_label: String, base_url: String, tarball_name: String, top_level_dir: String, vendor_dir: String, ?staged_dir: String, expected_sha256: (String | UnvendoredChecksum)?) -> void
|
|
14
14
|
|
|
15
15
|
def task_name: () -> Symbol
|
|
16
16
|
|
|
@@ -28,6 +28,8 @@ module Beni
|
|
|
28
28
|
|
|
29
29
|
private
|
|
30
30
|
|
|
31
|
+
def expected_checksum: () -> String?
|
|
32
|
+
|
|
31
33
|
def downloader: () -> Downloader
|
|
32
34
|
end
|
|
33
35
|
end
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
module Beni
|
|
2
|
+
module Vendor
|
|
3
|
+
class UnvendoredChecksum
|
|
4
|
+
attr_reader name: String
|
|
5
|
+
attr_reader version: String
|
|
6
|
+
attr_reader platform: String
|
|
7
|
+
|
|
8
|
+
def initialize: (name: String, version: String, platform: String) -> void
|
|
9
|
+
|
|
10
|
+
def message: () -> String
|
|
11
|
+
end
|
|
12
|
+
end
|
|
13
|
+
end
|
data/sig/beni/vendor.rbs
CHANGED
|
@@ -4,27 +4,23 @@ module Beni
|
|
|
4
4
|
|
|
5
5
|
BUILT_IN_PAIRS: Hash[String, built_in_pair]
|
|
6
6
|
DEPENDENCIES: Hash[String, Array[String]]
|
|
7
|
-
ARCH_ALIASES: Hash[String, String]
|
|
8
|
-
OS_ALIASES: Hash[Regexp, String]
|
|
9
|
-
BUILD_PLATFORM: String
|
|
10
7
|
TOOLCHAIN_FACTORIES: Hash[String, Symbol]
|
|
8
|
+
STAGED_DIRS: Hash[String, String]
|
|
11
9
|
SELECTED_BY_DEFINITION: Array[String]
|
|
12
10
|
|
|
13
|
-
def self
|
|
11
|
+
def self?.wasi_sdk: (vendor_dir: String, ?version: String?, ?sha256: (String | UnvendoredChecksum)?) -> Toolchain
|
|
14
12
|
|
|
15
|
-
def self
|
|
16
|
-
|
|
17
|
-
def self.platform_os: (String platform) -> String
|
|
18
|
-
|
|
19
|
-
def self?.wasi_sdk: (vendor_dir: String, ?version: String?, ?sha256: String?) -> Toolchain
|
|
20
|
-
|
|
21
|
-
def self?.mruby: (vendor_dir: String, ?version: String?, ?sha256: String?) -> Toolchain
|
|
13
|
+
def self?.mruby: (vendor_dir: String, ?version: String?, ?sha256: (String | UnvendoredChecksum)?) -> Toolchain
|
|
22
14
|
|
|
23
15
|
def self?.prism: (vendor_dir: String, version: String, sha256: String) -> Toolchain
|
|
24
16
|
|
|
25
17
|
def self?.base_url_for: (String default) -> String
|
|
26
18
|
|
|
27
|
-
def self?.
|
|
19
|
+
def self?.built_in_version: (String name) -> String
|
|
20
|
+
|
|
21
|
+
def self?.staged_dir: (String name) -> String
|
|
22
|
+
|
|
23
|
+
def self?.built_in_sha256: (String name, String version, ?String platform) -> (String | UnvendoredChecksum)?
|
|
28
24
|
|
|
29
25
|
def self?.stage_wasi_toolchain_file: (vendor_dir: String) -> String
|
|
30
26
|
end
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: beni
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.26.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Aotokitsuruya
|
|
@@ -23,8 +23,8 @@ dependencies:
|
|
|
23
23
|
- - "~>"
|
|
24
24
|
- !ruby/object:Gem::Version
|
|
25
25
|
version: '13.0'
|
|
26
|
-
description: Vendors mruby and builds
|
|
27
|
-
generated build configs for customization. Aims to grow into a full mruby dependency
|
|
26
|
+
description: Vendors mruby and builds its static archive through a Rake task library,
|
|
27
|
+
with generated build configs for customization. Aims to grow into a full mruby dependency
|
|
28
28
|
manager.
|
|
29
29
|
email:
|
|
30
30
|
- contact@aotoki.me
|
|
@@ -50,11 +50,12 @@ files:
|
|
|
50
50
|
- lib/beni/vendor.rb
|
|
51
51
|
- lib/beni/vendor/checksum.rb
|
|
52
52
|
- lib/beni/vendor/downloader.rb
|
|
53
|
+
- lib/beni/vendor/platform.rb
|
|
53
54
|
- lib/beni/vendor/tarball.rb
|
|
54
55
|
- lib/beni/vendor/toolchain.rb
|
|
55
56
|
- lib/beni/vendor/toolchains/wasi.rake
|
|
57
|
+
- lib/beni/vendor/unvendored_checksum.rb
|
|
56
58
|
- lib/beni/version.rb
|
|
57
|
-
- scripts/cloud_setup.sh
|
|
58
59
|
- sig/beni.rbs
|
|
59
60
|
- sig/beni/build_config.rbs
|
|
60
61
|
- sig/beni/builder.rbs
|
|
@@ -70,9 +71,10 @@ files:
|
|
|
70
71
|
- sig/beni/vendor.rbs
|
|
71
72
|
- sig/beni/vendor/checksum.rbs
|
|
72
73
|
- sig/beni/vendor/downloader.rbs
|
|
74
|
+
- sig/beni/vendor/platform.rbs
|
|
73
75
|
- sig/beni/vendor/tarball.rbs
|
|
74
76
|
- sig/beni/vendor/toolchain.rbs
|
|
75
|
-
- sig/
|
|
77
|
+
- sig/beni/vendor/unvendored_checksum.rbs
|
|
76
78
|
homepage: https://github.com/elct9620/beni
|
|
77
79
|
licenses:
|
|
78
80
|
- Apache-2.0
|
data/scripts/cloud_setup.sh
DELETED
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env bash
|
|
2
|
-
# Cloud session bootstrap
|
|
3
|
-
# =======================
|
|
4
|
-
#
|
|
5
|
-
# A cloud session starts from a fresh VM holding nothing but a clone, so
|
|
6
|
-
# everything the task surface expects from a working checkout is rebuilt
|
|
7
|
-
# here. A local checkout keeps its own, so the script stops unless it is
|
|
8
|
-
# running in the cloud.
|
|
9
|
-
set -euo pipefail
|
|
10
|
-
|
|
11
|
-
[ "${CLAUDE_CODE_REMOTE:-}" = "true" ] || exit 0
|
|
12
|
-
|
|
13
|
-
cd "$CLAUDE_PROJECT_DIR"
|
|
14
|
-
|
|
15
|
-
# The default rake task and every hook run through bundler.
|
|
16
|
-
bundle check >/dev/null 2>&1 || bundle install
|
|
17
|
-
|
|
18
|
-
# The coverage measure reads its inventory from the vendored mruby headers,
|
|
19
|
-
# and the session's egress serves the git protocol but not source archives —
|
|
20
|
-
# so the source arrives by clone here, at the gem's default version.
|
|
21
|
-
if [ ! -d vendor/mruby ]; then
|
|
22
|
-
version="$(ruby -Ilib -rbeni/vendor -e 'print Beni::Vendor::BUILT_IN_PAIRS.fetch("mruby").fetch(:version)')"
|
|
23
|
-
GIT_LFS_SKIP_SMUDGE=1 git -c advice.detachedHead=false clone --quiet --depth 1 \
|
|
24
|
-
--branch "$version" https://github.com/mruby/mruby.git vendor/mruby
|
|
25
|
-
fi
|
data/sig/patches/open-uri.rbs
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
# Patch: rbs' open-uri stdlib signatures only cover the module function
|
|
2
|
-
# +URI.open+; the instance form +URI::Generic#open+ (mixed in via
|
|
3
|
-
# +OpenURI::OpenRead+ for http/https/ftp URIs at runtime) is missing.
|
|
4
|
-
# Declared here so +Beni::Vendor::Downloader#download+ type-checks.
|
|
5
|
-
module URI
|
|
6
|
-
class Generic
|
|
7
|
-
def open: (?String mode) -> (StringIO & OpenURI::Meta)
|
|
8
|
-
| [T] (?String mode) { (StringIO | Tempfile) -> T } -> T
|
|
9
|
-
end
|
|
10
|
-
end
|