rbs 4.0.3 → 4.1.3
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/.dockerignore +37 -0
- data/.github/dependabot.yml +1 -1
- data/.github/workflows/bundle-update.yml +2 -2
- data/.github/workflows/c-check.yml +14 -6
- data/.github/workflows/comments.yml +2 -2
- data/.github/workflows/dependabot.yml +2 -2
- data/.github/workflows/jruby.yml +74 -0
- data/.github/workflows/release-gems.yml +235 -0
- data/.github/workflows/ruby.yml +43 -3
- data/.github/workflows/rust.yml +13 -10
- data/.github/workflows/truffleruby.yml +54 -0
- data/.github/workflows/typecheck.yml +5 -2
- data/.github/workflows/wasm.yml +55 -0
- data/.github/workflows/windows.yml +5 -2
- data/.gitignore +8 -0
- data/CHANGELOG.md +113 -0
- data/Dockerfile.jruby +53 -0
- data/README.md +4 -4
- data/Rakefile +512 -82
- data/Steepfile +9 -0
- data/config.yml +26 -0
- data/core/array.rbs +243 -180
- data/core/builtin.rbs +7 -6
- data/core/class.rbs +5 -3
- data/core/enumerable.rbs +109 -109
- data/core/enumerator/product.rbs +5 -5
- data/core/enumerator.rbs +28 -28
- data/core/file.rbs +24 -1018
- data/core/file_constants.rbs +463 -0
- data/core/file_stat.rbs +534 -0
- data/core/float.rbs +0 -24
- data/core/hash.rbs +117 -101
- data/core/integer.rbs +21 -58
- data/core/io.rbs +25 -7
- data/core/kernel.rbs +26 -11
- data/core/match_data.rbs +1 -1
- data/core/module.rbs +88 -74
- data/core/numeric.rbs +3 -0
- data/core/object_space/weak_key_map.rbs +7 -7
- data/core/pathname.rbs +0 -10
- data/core/ractor.rbs +0 -10
- data/core/range.rbs +23 -23
- data/core/rbs/ops.rbs +154 -0
- data/core/rbs/unnamed/argf.rbs +3 -3
- data/core/ruby_vm.rbs +40 -0
- data/core/rubygems/errors.rbs +4 -1
- data/core/rubygems/requirement.rbs +0 -10
- data/core/rubygems/rubygems.rbs +4 -1
- data/core/rubygems/specification.rbs +8 -0
- data/core/rubygems/version.rbs +0 -160
- data/core/set.rbs +3 -3
- data/core/struct.rbs +16 -16
- data/core/thread.rbs +9 -14
- data/docs/CONTRIBUTING.md +2 -1
- data/docs/inline.md +65 -7
- data/docs/rbs_by_example.md +20 -20
- data/docs/release.md +247 -0
- data/docs/syntax.md +2 -2
- data/docs/wasm_serialization.md +80 -0
- data/ext/rbs_extension/ast_translation.c +1298 -956
- data/ext/rbs_extension/ast_translation.h +4 -0
- data/ext/rbs_extension/class_constants.c +2 -0
- data/ext/rbs_extension/class_constants.h +1 -0
- data/ext/rbs_extension/extconf.rb +1 -0
- data/ext/rbs_extension/legacy_location.c +11 -6
- data/ext/rbs_extension/main.c +139 -4
- data/include/rbs/ast.h +323 -298
- data/include/rbs/defines.h +18 -0
- data/include/rbs/lexer.h +1 -0
- data/include/rbs/serialize.h +39 -0
- data/lib/rbs/annotate/rdoc_annotator.rb +27 -31
- data/lib/rbs/ast/ruby/annotations.rb +42 -0
- data/lib/rbs/ast/ruby/comment_block.rb +6 -4
- data/lib/rbs/ast/ruby/declarations.rb +11 -1
- data/lib/rbs/ast/ruby/helpers/location_helper.rb +1 -1
- data/lib/rbs/ast/ruby/members.rb +40 -1
- data/lib/rbs/buffer.rb +48 -11
- data/lib/rbs/cli.rb +3 -5
- data/lib/rbs/collection/config/lockfile_generator.rb +14 -1
- data/lib/rbs/collection/sources/git.rb +6 -0
- data/lib/rbs/definition_builder/method_builder.rb +12 -6
- data/lib/rbs/environment.rb +10 -3
- data/lib/rbs/inline_parser.rb +54 -28
- data/lib/rbs/namespace.rb +47 -11
- data/lib/rbs/parser_aux.rb +4 -2
- data/lib/rbs/prototype/rbi.rb +193 -25
- data/lib/rbs/prototype/runtime.rb +2 -0
- data/lib/rbs/resolver/type_name_resolver.rb +12 -14
- data/lib/rbs/rewriter.rb +70 -0
- data/lib/rbs/test/type_check.rb +6 -1
- data/lib/rbs/type_name.rb +33 -13
- data/lib/rbs/unit_test/type_assertions.rb +14 -5
- data/lib/rbs/version.rb +1 -1
- data/lib/rbs/wasm/deserializer.rb +213 -0
- data/lib/rbs/wasm/location.rb +61 -0
- data/lib/rbs/wasm/parser.rb +137 -0
- data/lib/rbs/wasm/runtime.rb +196 -0
- data/lib/rbs/wasm/serialization_schema.rb +110 -0
- data/lib/rbs.rb +14 -2
- data/lib/rbs_jars.rb +39 -0
- data/lib/rdoc_plugin/parser.rb +5 -0
- data/rbs.gemspec +32 -2
- data/sig/annotate/rdoc_annotater.rbs +12 -9
- data/sig/ast/ruby/annotations.rbs +49 -0
- data/sig/ast/ruby/members.rbs +21 -1
- data/sig/buffer.rbs +19 -1
- data/sig/collection/config/lockfile_generator.rbs +2 -0
- data/sig/inline_parser.rbs +2 -0
- data/sig/manifest.yaml +0 -1
- data/sig/namespace.rbs +20 -0
- data/sig/parser.rbs +10 -0
- data/sig/prototype/rbi.rbs +33 -4
- data/sig/resolver/type_name_resolver.rbs +2 -4
- data/sig/rewriter.rbs +45 -0
- data/sig/typename.rbs +15 -0
- data/sig/unit_test/type_assertions.rbs +6 -2
- data/sig/wasm/deserializer.rbs +66 -0
- data/sig/wasm/serialization_schema.rbs +13 -0
- data/src/ast.c +186 -162
- data/src/lexer.c +220 -193
- data/src/lexer.re +2 -1
- data/src/lexstate.c +10 -1
- data/src/parser.c +61 -8
- data/src/serialize.c +958 -0
- data/src/util/rbs_allocator.c +14 -8
- data/stdlib/abbrev/0/array.rbs +1 -1
- data/stdlib/csv/0/csv.rbs +5 -5
- data/stdlib/delegate/0/delegator.rbs +2 -1
- data/stdlib/digest/0/digest.rbs +11 -5
- data/stdlib/erb/0/erb.rbs +1 -1
- data/stdlib/etc/0/etc.rbs +18 -4
- data/stdlib/fileutils/0/fileutils.rbs +21 -21
- data/stdlib/ipaddr/0/ipaddr.rbs +0 -5
- data/stdlib/json/0/json.rbs +6 -6
- data/stdlib/monitor/0/monitor.rbs +2 -2
- data/stdlib/openssl/0/openssl.rbs +46 -40
- data/stdlib/resolv/0/resolv.rbs +1 -1
- data/stdlib/shellwords/0/shellwords.rbs +1 -1
- data/stdlib/stringio/0/stringio.rbs +32 -10
- data/stdlib/strscan/0/string_scanner.rbs +74 -55
- data/stdlib/tempfile/0/manifest.yaml +3 -0
- data/stdlib/timeout/0/timeout.rbs +0 -5
- data/stdlib/tsort/0/cyclic.rbs +1 -1
- data/stdlib/tsort/0/interfaces.rbs +8 -8
- data/stdlib/tsort/0/tsort.rbs +9 -9
- data/stdlib/uri/0/generic.rbs +0 -5
- data/stdlib/zlib/0/gzip_reader.rbs +2 -2
- data/stdlib/zlib/0/zstream.rbs +0 -1
- data/wasm/README.md +93 -0
- data/wasm/rbs_wasm.c +423 -0
- metadata +29 -6
- data/.github/workflows/milestone.yml +0 -80
- data/.vscode/extensions.json +0 -5
- data/.vscode/settings.json +0 -19
|
@@ -7,16 +7,19 @@ on:
|
|
|
7
7
|
pull_request: {}
|
|
8
8
|
merge_group: {}
|
|
9
9
|
|
|
10
|
+
permissions:
|
|
11
|
+
contents: read
|
|
12
|
+
|
|
10
13
|
jobs:
|
|
11
14
|
steep:
|
|
12
15
|
runs-on: "ubuntu-latest"
|
|
13
16
|
strategy:
|
|
14
17
|
fail-fast: false
|
|
15
18
|
steps:
|
|
16
|
-
- uses: actions/checkout@
|
|
19
|
+
- uses: actions/checkout@v7
|
|
17
20
|
- uses: ruby/setup-ruby@v1
|
|
18
21
|
with:
|
|
19
|
-
ruby-version: "
|
|
22
|
+
ruby-version: "4.0"
|
|
20
23
|
bundler: none
|
|
21
24
|
- name: Set working directory as safe
|
|
22
25
|
run: git config --global --add safe.directory $(pwd)
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
name: WebAssembly
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches:
|
|
6
|
+
- master
|
|
7
|
+
pull_request:
|
|
8
|
+
paths:
|
|
9
|
+
- ".github/workflows/wasm.yml"
|
|
10
|
+
- "Rakefile"
|
|
11
|
+
- "include/**"
|
|
12
|
+
- "src/**"
|
|
13
|
+
- "wasm/**"
|
|
14
|
+
# `merge_group` has no `paths` filter, so this runs on every queue entry.
|
|
15
|
+
merge_group: {}
|
|
16
|
+
|
|
17
|
+
permissions:
|
|
18
|
+
contents: read
|
|
19
|
+
|
|
20
|
+
env:
|
|
21
|
+
# Pinned so the smoke test is reproducible. Bump together when upgrading.
|
|
22
|
+
WASI_SDK_VERSION: "33"
|
|
23
|
+
WASI_SDK_RELEASE: "33.0"
|
|
24
|
+
WASMTIME_VERSION: "v47.0.2"
|
|
25
|
+
|
|
26
|
+
jobs:
|
|
27
|
+
build:
|
|
28
|
+
name: wasm:check
|
|
29
|
+
runs-on: ubuntu-latest
|
|
30
|
+
steps:
|
|
31
|
+
- uses: actions/checkout@v7
|
|
32
|
+
- run: git fetch --depth=1 origin +refs/tags/*:refs/tags/*
|
|
33
|
+
- name: Set up Ruby
|
|
34
|
+
uses: ruby/setup-ruby@v1
|
|
35
|
+
with:
|
|
36
|
+
ruby-version: ruby
|
|
37
|
+
bundler: none
|
|
38
|
+
- name: Update rubygems & bundler
|
|
39
|
+
run: gem update --system
|
|
40
|
+
- name: Install gems
|
|
41
|
+
run: |
|
|
42
|
+
bundle config set --local without libs:profilers
|
|
43
|
+
bundle install --jobs 4 --retry 3
|
|
44
|
+
- name: Install the WASI SDK
|
|
45
|
+
run: |
|
|
46
|
+
url="https://github.com/WebAssembly/wasi-sdk/releases/download/wasi-sdk-${WASI_SDK_VERSION}/wasi-sdk-${WASI_SDK_RELEASE}-x86_64-linux.tar.gz"
|
|
47
|
+
mkdir -p "$HOME/wasi-sdk"
|
|
48
|
+
curl -sSL "$url" | tar xz --strip-components=1 -C "$HOME/wasi-sdk"
|
|
49
|
+
echo "WASI_SDK_PATH=$HOME/wasi-sdk" >> "$GITHUB_ENV"
|
|
50
|
+
- name: Install wasmtime
|
|
51
|
+
uses: bytecodealliance/actions/wasmtime/setup@v1
|
|
52
|
+
with:
|
|
53
|
+
version: ${{ env.WASMTIME_VERSION }}
|
|
54
|
+
- name: Build and smoke-test the WebAssembly module
|
|
55
|
+
run: bundle exec rake wasm:check
|
|
@@ -7,15 +7,18 @@ on:
|
|
|
7
7
|
pull_request: {}
|
|
8
8
|
merge_group: {}
|
|
9
9
|
|
|
10
|
+
permissions:
|
|
11
|
+
contents: read
|
|
12
|
+
|
|
10
13
|
jobs:
|
|
11
14
|
compile:
|
|
12
15
|
runs-on: "windows-latest"
|
|
13
16
|
strategy:
|
|
14
17
|
fail-fast: false
|
|
15
18
|
matrix:
|
|
16
|
-
ruby: ['
|
|
19
|
+
ruby: ['4.0', ucrt, mswin]
|
|
17
20
|
steps:
|
|
18
|
-
- uses: actions/checkout@
|
|
21
|
+
- uses: actions/checkout@v7
|
|
19
22
|
- name: load ruby
|
|
20
23
|
uses: ruby/setup-ruby@v1
|
|
21
24
|
with:
|
data/.gitignore
CHANGED
|
@@ -29,3 +29,11 @@ ext/rbs_extension/.cache
|
|
|
29
29
|
# Rust crate vendored RBS source (managed by rake rust:rbs:sync or rust:rbs:symlink)
|
|
30
30
|
rust/ruby-rbs-sys/vendor/rbs/
|
|
31
31
|
rust/ruby-rbs/vendor/rbs/
|
|
32
|
+
|
|
33
|
+
# Compiled WebAssembly module (built by rake wasm:build)
|
|
34
|
+
wasm/*.wasm
|
|
35
|
+
|
|
36
|
+
# JRuby runtime artifact (built by rake wasm:jruby_setup, bundled in the -java
|
|
37
|
+
# gem). The require_jar file lib/rbs_jars.rb is committed; the Chicory/ASM jars
|
|
38
|
+
# themselves live in ~/.m2 (jar-dependencies), not here.
|
|
39
|
+
lib/rbs/wasm/*.wasm
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,118 @@
|
|
|
1
1
|
# CHANGELOG
|
|
2
2
|
|
|
3
|
+
## 4.1.3 (2026-08-10)
|
|
4
|
+
|
|
5
|
+
### Miscellaneous
|
|
6
|
+
|
|
7
|
+
* Don't use Clang nullability qualifiers in strict ISO C mode ([#3074](https://github.com/ruby/rbs/pull/3074), Backported in [#3075](https://github.com/ruby/rbs/pull/3075))
|
|
8
|
+
* Avoid eagerly inspecting call traces in type assertions ([#3073](https://github.com/ruby/rbs/pull/3073), Backported in [#3076](https://github.com/ruby/rbs/pull/3076))
|
|
9
|
+
|
|
10
|
+
## 4.1.2 (2026-08-03)
|
|
11
|
+
|
|
12
|
+
### Miscellaneous
|
|
13
|
+
|
|
14
|
+
* Keep GC disabled during GC_test#test_stress_and_stress= ([#3061](https://github.com/ruby/rbs/pull/3061))
|
|
15
|
+
* Fix GC_test#test_enable leaving GC disabled for the rest of the suite ([#3059](https://github.com/ruby/rbs/pull/3059))
|
|
16
|
+
|
|
17
|
+
## 4.1.1 (2026-07-30)
|
|
18
|
+
|
|
19
|
+
### Library changes
|
|
20
|
+
|
|
21
|
+
* Include the trailing `?` in a keyword key's symbol location ([#3043](https://github.com/ruby/rbs/pull/3043))
|
|
22
|
+
* Mark `type_name` as optional on the alias annotations ([#3039](https://github.com/ruby/rbs/pull/3039))
|
|
23
|
+
|
|
24
|
+
### Miscellaneous
|
|
25
|
+
|
|
26
|
+
* Fix template drift for ext/rbs_extension/ast_translation.c ([#3038](https://github.com/ruby/rbs/pull/3038))
|
|
27
|
+
|
|
28
|
+
## 4.1.0 (2026-07-27)
|
|
29
|
+
|
|
30
|
+
RBS 4.1 ships with JRuby support. The RBS parser is written in plain C without depending on the Ruby C API, so it is compiled to WebAssembly and runs on a Wasm runtime, with the parsed AST serialized in a binary format and decoded into RBS objects. The full test suite runs on JRuby in CI.
|
|
31
|
+
|
|
32
|
+
The inline RBS syntax gets three new features: singleton method definitions (`def self.`), the `module-self` constraint, and instance variable annotations in `module` declarations. Note that RBS inline is still experimental and may change in future releases.
|
|
33
|
+
|
|
34
|
+
This release also introduces `RBS::Rewriter`, an API to edit RBS source text while preserving the surrounding content, which `rbs annotate` is now built on. Parsing performance is improved by interning type names in a shared trie and reducing allocations per node.
|
|
35
|
+
|
|
36
|
+
`RBS::Prototype::Runtime`, the RDoc plugin parser, and the top-level `float` type alias are deprecated in this release.
|
|
37
|
+
|
|
38
|
+
### Signature updates
|
|
39
|
+
|
|
40
|
+
**Updated classes/modules/methods:** `ARGF`, `Array`, `CSV`, `Class`, `Delegator`, `Digest`, `ERB`, `Enumerable`, `Enumerator`, `Enumerator::Product`, `Etc`, `File`, `File::Constants`, `File::Stat`, `FileUtils`, `Float`, `Gem`, `Hash`, `IO`, `IPAddr`, `Integer`, `JSON`, `Kernel`, `MatchData`, `Module`, `Monitor`, `Numeric`, `ObjectSpace::WeakKeyMap`, `OpenSSL`, `Pathname`, `RBS::Ops`, `Ractor`, `Range`, `Resolv`, `RubyVM::InstructionSequence`, `Set`, `Shellwords`, `String`, `StringIO`, `StringScanner`, `Struct`, `Tempfile`, `Thread`, `Timeout`, `TSort`, `URI::Generic`, `Zlib::GzipReader`, `Zlib::ZStream`
|
|
41
|
+
|
|
42
|
+
* Remove stale Float constants and add a constant drift test ([#2994](https://github.com/ruby/rbs/pull/2994))
|
|
43
|
+
* Update RDoc comments with Ruby 4.0.6 ([#3035](https://github.com/ruby/rbs/pull/3035))
|
|
44
|
+
* Add a dependency on tempfile. ([#3025](https://github.com/ruby/rbs/pull/3025))
|
|
45
|
+
* Support `%a{implicitly-returns-nil}` on `MatchData#[]` ([#2990](https://github.com/ruby/rbs/pull/2990))
|
|
46
|
+
* Update `Array` ([#2987](https://github.com/ruby/rbs/pull/2987))
|
|
47
|
+
* Allow nil output buffers for reader methods ([#3002](https://github.com/ruby/rbs/pull/3002))
|
|
48
|
+
* Add stdlib signature tests for #2967 ([#2989](https://github.com/ruby/rbs/pull/2989))
|
|
49
|
+
* Update `Integer`, phase 1 ([#2995](https://github.com/ruby/rbs/pull/2995))
|
|
50
|
+
* Add RBS::Ops ([#2934](https://github.com/ruby/rbs/pull/2934))
|
|
51
|
+
* Update Module ([#2933](https://github.com/ruby/rbs/pull/2933))
|
|
52
|
+
* Correct core/stdlib signatures to match Ruby 4.0 ([#2967](https://github.com/ruby/rbs/pull/2967))
|
|
53
|
+
* Revert Digest::Class method changes ([#2980](https://github.com/ruby/rbs/pull/2980))
|
|
54
|
+
* Add stdlib tests for updated StringScanner signatures ([#2968](https://github.com/ruby/rbs/pull/2968))
|
|
55
|
+
* Update `StringScanner` signatures to match strscan 3.1.6 ([#2959](https://github.com/ruby/rbs/pull/2959))
|
|
56
|
+
* Remove StringScanner methods absent from the latest Ruby release ([#2961](https://github.com/ruby/rbs/pull/2961))
|
|
57
|
+
* Fix `Resolv#initialize` signature: array of resolvers + `use_ipv6:` ([#2960](https://github.com/ruby/rbs/pull/2960))
|
|
58
|
+
* [Hash] Update Hash's signatures and tests to be correct ([#2694](https://github.com/ruby/rbs/pull/2694))
|
|
59
|
+
* update rbs signatures to be more consistent with generics ([#2867](https://github.com/ruby/rbs/pull/2867))
|
|
60
|
+
* Use top-level `path` in fileutils.rbs to suppress deprecation warning ([#2949](https://github.com/ruby/rbs/pull/2949))
|
|
61
|
+
* Update File::Constants and File::Stat ([#2942](https://github.com/ruby/rbs/pull/2942))
|
|
62
|
+
* Add signature for `RubyVM::InstructionSequence.of` ([#2916](https://github.com/ruby/rbs/pull/2916))
|
|
63
|
+
* fix OpenSSL#session_new_cb signature ([#2924](https://github.com/ruby/rbs/pull/2924))
|
|
64
|
+
* [Class] update class.rbs ([#2898](https://github.com/ruby/rbs/pull/2898))
|
|
65
|
+
* Deprecate top-level float ([#2695](https://github.com/ruby/rbs/pull/2695))
|
|
66
|
+
* [Kernel] Updated querying methods ([#2685](https://github.com/ruby/rbs/pull/2685))
|
|
67
|
+
|
|
68
|
+
### Library changes
|
|
69
|
+
|
|
70
|
+
* Convert character offset to byte offset in parse_inline_*_annotation ([#2945](https://github.com/ruby/rbs/pull/2945))
|
|
71
|
+
* Guard against underflow when sysconf(_SC_PAGESIZE) returns 0 ([#3031](https://github.com/ruby/rbs/pull/3031))
|
|
72
|
+
* Report invalid UTF-8 byte in a comment as a parsing error ([#2983](https://github.com/ruby/rbs/pull/2983))
|
|
73
|
+
* Fetch Chicory/ASM jars from Maven instead of bundling in gem ([#3019](https://github.com/ruby/rbs/pull/3019))
|
|
74
|
+
* Add write barrier protection to RBS Location objects ([#3022](https://github.com/ruby/rbs/pull/3022))
|
|
75
|
+
* Rename parameter in rbs_intern_type_name for clarity ([#3023](https://github.com/ruby/rbs/pull/3023))
|
|
76
|
+
* Deprecate RDoc plugin parser ([#3016](https://github.com/ruby/rbs/pull/3016))
|
|
77
|
+
* Run the test suite on JRuby (JRuby support, step 4) ([#3008](https://github.com/ruby/rbs/pull/3008))
|
|
78
|
+
* Run the RBS parser on JRuby via WebAssembly (JRuby support, step 3) ([#3000](https://github.com/ruby/rbs/pull/3000))
|
|
79
|
+
* Add binary serialization of the parsed AST (JRuby support, step 2) ([#2999](https://github.com/ruby/rbs/pull/2999))
|
|
80
|
+
* Build the RBS parser as a WebAssembly module (JRuby support, step 1) ([#2998](https://github.com/ruby/rbs/pull/2998))
|
|
81
|
+
* Reject reversed position ranges in parser/lexer entrypoints ([#2974](https://github.com/ruby/rbs/pull/2974))
|
|
82
|
+
* Fix lexer infinite loop / abort on invalid UTF-8 byte ([#2973](https://github.com/ruby/rbs/pull/2973))
|
|
83
|
+
* Flyweight TypeName / Namespace cached in a shared trie ([#2957](https://github.com/ruby/rbs/pull/2957))
|
|
84
|
+
* Reduce Hash allocation per `Node` creation ([#2946](https://github.com/ruby/rbs/pull/2946))
|
|
85
|
+
* Tidy `ast_translation.c` ([#2947](https://github.com/ruby/rbs/pull/2947))
|
|
86
|
+
* Auto-generate rbs_ast_ruby_annotations_t union from config.yml ([#2939](https://github.com/ruby/rbs/pull/2939))
|
|
87
|
+
* Speed up RBS::InlineParser on large sources with non-ASCII characters ([#2950](https://github.com/ruby/rbs/pull/2950))
|
|
88
|
+
* Support `def self.method_name` singleton method in inline parser ([#2935](https://github.com/ruby/rbs/pull/2935))
|
|
89
|
+
* This is not prism ([#2951](https://github.com/ruby/rbs/pull/2951))
|
|
90
|
+
* Add RBS::Rewriter and use it in rbs annotate ([#2927](https://github.com/ruby/rbs/pull/2927))
|
|
91
|
+
* Add nullability annotations to AST pointer types ([#2922](https://github.com/ruby/rbs/pull/2922))
|
|
92
|
+
* Support `module-self` inline annotation ([#2921](https://github.com/ruby/rbs/pull/2921))
|
|
93
|
+
* Inline instance variable annotation in module declaration ([#2919](https://github.com/ruby/rbs/pull/2919))
|
|
94
|
+
|
|
95
|
+
#### rbs prototype
|
|
96
|
+
|
|
97
|
+
* Fix nested declarations in rbs prototype rbi ([#3029](https://github.com/ruby/rbs/pull/3029))
|
|
98
|
+
* Deprecate prototype runtime ([#2956](https://github.com/ruby/rbs/pull/2956))
|
|
99
|
+
|
|
100
|
+
#### rbs collection
|
|
101
|
+
|
|
102
|
+
* Clean up partial clone before falling back to full clone ([#2978](https://github.com/ruby/rbs/pull/2978))
|
|
103
|
+
* Suppress spurious warning for non-gem stdlib libraries ([#2929](https://github.com/ruby/rbs/pull/2929))
|
|
104
|
+
|
|
105
|
+
### Miscellaneous
|
|
106
|
+
|
|
107
|
+
* Fix Lint/DuplicateMethods in StringIO_test.rb ([#3010](https://github.com/ruby/rbs/pull/3010))
|
|
108
|
+
* Compressed files must be opened in binary mode ([#2981](https://github.com/ruby/rbs/pull/2981))
|
|
109
|
+
* Fix flaky DirSingletonTest GC failures in test_fchdir and test_for_fd ([#3004](https://github.com/ruby/rbs/pull/3004))
|
|
110
|
+
* Add TruffleRuby CI job ([#2996](https://github.com/ruby/rbs/pull/2996))
|
|
111
|
+
* Update the target Ruby version notes to the latest release ([#2962](https://github.com/ruby/rbs/pull/2962))
|
|
112
|
+
* Update docs/inline.md to match current inline parser behavior ([#2953](https://github.com/ruby/rbs/pull/2953))
|
|
113
|
+
* ci: skip Gemfile.lock BUNDLED WITH on ruby-head ([#2952](https://github.com/ruby/rbs/pull/2952))
|
|
114
|
+
* Remove `logger` from sig dependencies ([#2904](https://github.com/ruby/rbs/pull/2904))
|
|
115
|
+
|
|
3
116
|
## 4.0.3 (2026-06-18)
|
|
4
117
|
|
|
5
118
|
### Miscellaneous
|
data/Dockerfile.jruby
ADDED
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
# JRuby verification image for RBS.
|
|
2
|
+
#
|
|
3
|
+
# RBS can't load its MRI C extension on JRuby, so it parses through a
|
|
4
|
+
# WebAssembly build of the parser (see lib/rbs/wasm and docs/wasm_serialization.md).
|
|
5
|
+
# This single-stage image installs the WASI SDK, compiles rbs_parser.wasm and
|
|
6
|
+
# downloads the Chicory/ASM jars into ~/.m2 (via jar-dependencies), then runs the
|
|
7
|
+
# test suite on JRuby. It mirrors .github/workflows/jruby.yml but is self-contained.
|
|
8
|
+
#
|
|
9
|
+
# docker build -f Dockerfile.jruby -t rbs-jruby .
|
|
10
|
+
# docker run --rm rbs-jruby # run the test suite
|
|
11
|
+
# docker run --rm -e RBS_PLATFORM=java rbs-jruby \
|
|
12
|
+
# gem build rbs.gemspec # build the -java gem
|
|
13
|
+
#
|
|
14
|
+
# Bundler is intentionally not used: the development Gemfile pulls in CRuby-only
|
|
15
|
+
# C extensions (bigdecimal, stackprof, ...) that cannot build on JRuby. The few
|
|
16
|
+
# gems the suite needs are installed directly, exactly as the CI does.
|
|
17
|
+
|
|
18
|
+
FROM jruby:10.1.1.0-jdk21
|
|
19
|
+
|
|
20
|
+
# Keep in sync with .github/workflows/wasm.yml and .github/workflows/jruby.yml.
|
|
21
|
+
ARG WASI_SDK_VERSION=33
|
|
22
|
+
ARG WASI_SDK_RELEASE=33.0
|
|
23
|
+
|
|
24
|
+
# build-essential supplies cc/make: on JRuby the prism gem builds libprism.so
|
|
25
|
+
# (loaded via FFI) instead of an MRI C extension, so it needs a C toolchain.
|
|
26
|
+
RUN apt-get update \
|
|
27
|
+
&& apt-get install -y --no-install-recommends git curl ca-certificates build-essential \
|
|
28
|
+
&& rm -rf /var/lib/apt/lists/*
|
|
29
|
+
|
|
30
|
+
# The WASI SDK provides clang, the wasi-libc sysroot and the wasm32 compiler-rt
|
|
31
|
+
# builtins that `rake wasm:build` needs to compile src/**/*.c to WebAssembly.
|
|
32
|
+
RUN set -eux; \
|
|
33
|
+
case "$(uname -m)" in \
|
|
34
|
+
x86_64 | amd64) wasi_arch=x86_64 ;; \
|
|
35
|
+
aarch64 | arm64) wasi_arch=arm64 ;; \
|
|
36
|
+
*) echo "unsupported arch: $(uname -m)" >&2; exit 1 ;; \
|
|
37
|
+
esac; \
|
|
38
|
+
mkdir -p /opt/wasi-sdk; \
|
|
39
|
+
curl -fsSL "https://github.com/WebAssembly/wasi-sdk/releases/download/wasi-sdk-${WASI_SDK_VERSION}/wasi-sdk-${WASI_SDK_RELEASE}-${wasi_arch}-linux.tar.gz" \
|
|
40
|
+
| tar xz --strip-components=1 -C /opt/wasi-sdk
|
|
41
|
+
ENV WASI_SDK_PATH=/opt/wasi-sdk
|
|
42
|
+
|
|
43
|
+
# Runtime/test gems the suite needs on JRuby (same set as the jruby.yml CI).
|
|
44
|
+
RUN gem install prism rake rake-compiler test-unit rdoc rspec minitest json-schema pry --no-document
|
|
45
|
+
|
|
46
|
+
WORKDIR /rbs
|
|
47
|
+
COPY . .
|
|
48
|
+
|
|
49
|
+
# Compile rbs_parser.wasm (clang is a subprocess, so the build is engine
|
|
50
|
+
# independent) and download the Chicory + ASM jars into ~/.m2 via jar-dependencies.
|
|
51
|
+
RUN rake wasm:jruby_setup wasm:install_jars
|
|
52
|
+
|
|
53
|
+
CMD ["rake", "test"]
|
data/README.md
CHANGED
|
@@ -54,8 +54,8 @@ end
|
|
|
54
54
|
|
|
55
55
|
## The Target Version
|
|
56
56
|
|
|
57
|
-
* The standard library signatures targets the latest release of Ruby. (`
|
|
58
|
-
* The library code targets non-EOL versions of Ruby. (`>= 3.
|
|
57
|
+
* The standard library signatures targets the [latest release of Ruby](https://www.ruby-lang.org/en/downloads/branches/). (`4.0` as of 2026.)
|
|
58
|
+
* The library code targets [non-EOL versions of Ruby](https://www.ruby-lang.org/en/downloads/branches/). (`>= 3.3` as of 2026.)
|
|
59
59
|
|
|
60
60
|
## Installation
|
|
61
61
|
|
|
@@ -122,7 +122,7 @@ This is only a starting point, and you should edit the output to match your sign
|
|
|
122
122
|
|
|
123
123
|
- `rb` generates from just the available Ruby code
|
|
124
124
|
- `rbi` generates from Sorbet RBI
|
|
125
|
-
- `runtime` generates from runtime API
|
|
125
|
+
- `runtime` generates from runtime API (**deprecated**; see [#2841](https://github.com/ruby/rbs/issues/2841))
|
|
126
126
|
|
|
127
127
|
## Library
|
|
128
128
|
|
|
@@ -196,7 +196,7 @@ Here is a list of some places you can talk with active maintainers.
|
|
|
196
196
|
|
|
197
197
|
After checking out the repo, run `bin/setup` to install dependencies. Then, run `bundle exec rake test` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
|
|
198
198
|
|
|
199
|
-
To install this gem onto your local machine, run `bundle exec rake install`.
|
|
199
|
+
To install this gem onto your local machine, run `bundle exec rake install`. Releases are cut by the `Release gems` workflow rather than from a working copy -- see [docs/release.md](docs/release.md).
|
|
200
200
|
|
|
201
201
|
### C Code Formatting
|
|
202
202
|
|