Skip to content

Commit 93a5f73

Browse files
authored
Merge branch 'master' into sampersand/2025-10-30/deprecate-toplevel-float
2 parents a0fe3ed + 66d2eac commit 93a5f73

65 files changed

Lines changed: 2107 additions & 712 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.clang-format

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ ConstructorInitializerAllOnOneLineOrOnePerLine: false
5151
Cpp11BracedListStyle: false
5252
ReflowComments: false
5353
SortIncludes: Never
54+
InsertNewlineAtEOF: true
5455

5556
# Spaces
5657
SpaceAfterCStyleCast: true

.github/dependabot.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,3 +20,5 @@ updates:
2020
directory: '/'
2121
schedule:
2222
interval: 'weekly'
23+
labels:
24+
- 'no-milestone'

.github/workflows/bundle-update.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,4 +57,7 @@ jobs:
5757
--title "bundle update ($(date +'%Y-%m-%d'))" \
5858
--body "Automated weekly bundle update" \
5959
--head "$(git rev-parse --abbrev-ref HEAD)" \
60-
--base "${{ github.event.repository.default_branch }}"
60+
--base "${{ github.event.repository.default_branch }}" \
61+
--label "no-milestone"
62+
63+
gh pr merge --auto --merge "$(git rev-parse --abbrev-ref HEAD)"

.github/workflows/dependabot.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414
if: ${{ github.event.pull_request.user.login == 'dependabot[bot]' }}
1515
steps:
1616
- name: Dependabot metadata
17-
uses: dependabot/fetch-metadata@21025c705c08248db411dc16f3619e6b5f9ea21a # v2.5.0
17+
uses: dependabot/fetch-metadata@ffa630c65fa7e0ecfa0625b5ceda64399aea1b36 # v3.0.0
1818
id: metadata
1919
- name: Checkout repository
2020
uses: actions/checkout@v6

.github/workflows/milestone.yml

Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
name: Check milestone
2+
3+
on:
4+
pull_request:
5+
types: [opened, edited, labeled, unlabeled, milestoned, demilestoned, synchronize]
6+
7+
jobs:
8+
check:
9+
runs-on: ubuntu-latest
10+
11+
steps:
12+
- uses: actions/checkout@v6
13+
14+
- name: Extract RBS::Version
15+
id: version
16+
run: |
17+
# Extract version string from lib/rbs/version.rb
18+
version=$(ruby -e 'load "lib/rbs/version.rb"; print RBS::VERSION')
19+
echo "version=$version" >> "$GITHUB_OUTPUT"
20+
21+
# Parse major.minor.patch
22+
IFS='.' read -r major minor patch _rest <<< "$version"
23+
echo "major=$major" >> "$GITHUB_OUTPUT"
24+
echo "minor=$minor" >> "$GITHUB_OUTPUT"
25+
echo "patch=$patch" >> "$GITHUB_OUTPUT"
26+
27+
echo "RBS::VERSION = $version (major=$major, minor=$minor, patch=$patch)"
28+
29+
- name: Check milestone
30+
uses: actions/github-script@v8
31+
with:
32+
script: |
33+
const pr = context.payload.pull_request;
34+
const milestone = pr.milestone;
35+
const labels = pr.labels.map(l => l.name);
36+
37+
const version = '${{ steps.version.outputs.version }}';
38+
const major = '${{ steps.version.outputs.major }}';
39+
const minor = '${{ steps.version.outputs.minor }}';
40+
const patch = parseInt('${{ steps.version.outputs.patch }}', 10);
41+
42+
if (!milestone) {
43+
if (labels.includes('no-milestone')) {
44+
core.info('No milestone set, but no-milestone label is present — OK');
45+
return;
46+
}
47+
core.setFailed(
48+
'No milestone set. Add a milestone or add the "no-milestone" label.'
49+
);
50+
return;
51+
}
52+
53+
if (labels.includes('no-milestone')) {
54+
core.setFailed(
55+
'Milestone is set but "no-milestone" label is present. Remove the label or the milestone.'
56+
);
57+
return;
58+
}
59+
60+
const milestoneName = milestone.title;
61+
core.info(`Milestone: "${milestoneName}", RBS::VERSION: ${version}`);
62+
63+
// Expected milestone based on version:
64+
// patch == 0 → "RBS major.minor" (e.g. "RBS 4.0")
65+
// patch >= 1 → "RBS major.minor.x" (e.g. "RBS 4.0.x")
66+
let expectedMilestone;
67+
if (patch === 0) {
68+
expectedMilestone = `RBS ${major}.${minor}`;
69+
} else {
70+
expectedMilestone = `RBS ${major}.${minor}.x`;
71+
}
72+
73+
if (milestoneName !== expectedMilestone) {
74+
core.setFailed(
75+
`Milestone "${milestoneName}" does not match RBS::VERSION ${version}. ` +
76+
`Expected milestone: "${expectedMilestone}"`
77+
);
78+
} else {
79+
core.info(`Milestone "${milestoneName}" matches RBS::VERSION ${version}`);
80+
}

.github/workflows/ruby.yml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,3 +110,37 @@ jobs:
110110
run: |
111111
bin/setup
112112
- run: bundle exec rake clean compile_c99
113+
114+
clang_compile:
115+
runs-on: macos-latest
116+
strategy:
117+
fail-fast: false
118+
matrix:
119+
ruby: ['4.0', head]
120+
steps:
121+
- uses: actions/checkout@v6
122+
- name: Install dependencies
123+
run: |
124+
brew install ruby-build
125+
- uses: ruby/setup-ruby@v1
126+
with:
127+
ruby-version: ${{ matrix.ruby }}
128+
bundler: none
129+
- name: Set working directory as safe
130+
run: git config --global --add safe.directory $(pwd)
131+
- name: Update rubygems & bundler
132+
run: |
133+
ruby -v
134+
gem update --system
135+
- name: install erb
136+
run: gem install erb
137+
- name: clang version
138+
run: clang --version
139+
- name: bundle config set force_ruby_platform true if head
140+
if: ${{ contains(matrix.ruby, 'head') }}
141+
run: |
142+
bundle config set force_ruby_platform true
143+
- name: bin/setup
144+
run: |
145+
bin/setup
146+
- run: bundle exec rake clean compile

.github/workflows/rust.yml

Lines changed: 93 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,6 @@ on:
88
paths:
99
- ".github/workflows/rust.yml"
1010
- "rust/**"
11-
- "include/**"
12-
- "src/**"
1311

1412
env:
1513
RUSTFLAGS: "-D warnings"
@@ -24,6 +22,20 @@ jobs:
2422
os: [ubuntu-latest, macos-latest, windows-latest]
2523
steps:
2624
- uses: actions/checkout@v6
25+
- run: git fetch --depth=1 origin +refs/tags/*:refs/tags/*
26+
- name: Set up Ruby
27+
uses: ruby/setup-ruby@v1
28+
with:
29+
ruby-version: ruby
30+
bundler: none
31+
- name: Update rubygems & bundler
32+
run: gem update --system
33+
- name: Install gems
34+
run: |
35+
bundle config set --local without libs:profilers
36+
bundle install --jobs 4 --retry 3
37+
- name: Set up vendored RBS source
38+
run: bundle exec rake rust:rbs:sync
2739
- name: Install Rust tools
2840
run: |
2941
rustup update --no-self-update stable
@@ -42,12 +54,30 @@ jobs:
4254
cd rust
4355
cargo test --verbose
4456
45-
publish-dry-run:
46-
name: cargo:publish-dry-run
57+
publish-dry-run-ruby-rbs-sys:
58+
name: rust:publish:ruby-rbs-sys
4759
runs-on: ubuntu-latest
4860
continue-on-error: true
4961
steps:
5062
- uses: actions/checkout@v6
63+
- run: git fetch --depth=1 origin +refs/tags/*:refs/tags/*
64+
- name: Set up git identity
65+
run: |
66+
git config user.name "GitHub Actions"
67+
git config user.email "actions@github.com"
68+
- name: Set up Ruby
69+
uses: ruby/setup-ruby@v1
70+
with:
71+
ruby-version: ruby
72+
bundler: none
73+
- name: Update rubygems & bundler
74+
run: gem update --system
75+
- name: Install gems
76+
run: |
77+
bundle config set --local without libs:profilers
78+
bundle install --jobs 4 --retry 3
79+
- name: Set up vendored RBS source
80+
run: bundle exec rake rust:rbs:sync
5181
- name: Install Rust tools
5282
run: |
5383
rustup update --no-self-update stable
@@ -61,16 +91,72 @@ jobs:
6191
key: ${{ runner.os }}-cargo-${{ hashFiles('rust/Cargo.lock') }}
6292
restore-keys: |
6393
${{ runner.os }}-cargo-
64-
- name: Test publish crates
94+
- name: Test publish ruby-rbs-sys
95+
run: bundle exec rake rust:publish:ruby-rbs-sys
96+
env:
97+
RBS_RUST_PUBLISH_DRY_RUN: "1"
98+
99+
publish-dry-run-ruby-rbs:
100+
name: rust:publish:ruby-rbs
101+
runs-on: ubuntu-latest
102+
continue-on-error: true
103+
steps:
104+
- uses: actions/checkout@v6
105+
- run: git fetch --depth=1 origin +refs/tags/*:refs/tags/*
106+
- name: Set up git identity
65107
run: |
66-
cd rust
67-
cargo publish --dry-run
108+
git config user.name "GitHub Actions"
109+
git config user.email "actions@github.com"
110+
- name: Set up Ruby
111+
uses: ruby/setup-ruby@v1
112+
with:
113+
ruby-version: ruby
114+
bundler: none
115+
- name: Update rubygems & bundler
116+
run: gem update --system
117+
- name: Install gems
118+
run: |
119+
bundle config set --local without libs:profilers
120+
bundle install --jobs 4 --retry 3
121+
- name: Set up vendored RBS source
122+
run: bundle exec rake rust:rbs:sync
123+
- name: Install Rust tools
124+
run: |
125+
rustup update --no-self-update stable
126+
rustup default stable
127+
- uses: actions/cache@v5
128+
with:
129+
path: |
130+
~/.cargo/registry
131+
~/.cargo/git
132+
rust/target
133+
key: ${{ runner.os }}-cargo-${{ hashFiles('rust/Cargo.lock') }}
134+
restore-keys: |
135+
${{ runner.os }}-cargo-
136+
- name: Test publish ruby-rbs
137+
run: bundle exec rake rust:publish:ruby-rbs
138+
env:
139+
RBS_RUST_PUBLISH_DRY_RUN: "1"
68140

69141
lint:
70142
name: cargo:lint
71143
runs-on: ubuntu-latest
72144
steps:
73145
- uses: actions/checkout@v6
146+
- run: git fetch --depth=1 origin +refs/tags/*:refs/tags/*
147+
- name: Set up Ruby
148+
uses: ruby/setup-ruby@v1
149+
with:
150+
ruby-version: ruby
151+
bundler: none
152+
- name: Update rubygems & bundler
153+
run: gem update --system
154+
- name: Install gems
155+
run: |
156+
bundle config set --local without libs:profilers
157+
bundle install --jobs 4 --retry 3
158+
- name: Set up vendored RBS source
159+
run: bundle exec rake rust:rbs:sync
74160
- name: Install Rust tools
75161
run: |
76162
rustup update --no-self-update stable

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,3 +25,7 @@ doc/
2525
# For clangd's editor integration
2626
ext/rbs_extension/compile_commands.json
2727
ext/rbs_extension/.cache
28+
29+
# Rust crate vendored RBS source (managed by rake rust:rbs:sync or rust:rbs:symlink)
30+
rust/ruby-rbs-sys/vendor/rbs/
31+
rust/ruby-rbs/vendor/rbs/

CHANGELOG.md

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,31 @@
11
# CHANGELOG
22

3+
## 4.0.2 (2026-03-25)
4+
5+
### Library changes
6+
7+
#### rbs collection
8+
9+
* Fix: pathname not written to lockfile. ([#2889](https://github.com/ruby/rbs/pull/2889))
10+
11+
### Miscellaneous
12+
13+
* Fix test failure on Windows in `ruby/ruby` ([#2900](https://github.com/ruby/rbs/pull/2900))
14+
* Fix test for Ruby 4.1 ([#2899](https://github.com/ruby/rbs/pull/2899))
15+
16+
## 4.0.1 (2026-03-23)
17+
18+
This is a minor release to fix Ruby CI failure, which was caused by symlinks included in the `rust` directory.
19+
20+
### Library changes
21+
22+
* Fix `() -> (void)` being rejected as SyntaxError ([#2884](https://github.com/ruby/rbs/pull/2884))
23+
24+
### Miscellaneous
25+
26+
* Drop crates ([#2887](https://github.com/ruby/rbs/pull/2887))
27+
* Add newline at eof ([#2885](https://github.com/ruby/rbs/pull/2885))
28+
329
## 4.0.0 (2026-03-16)
430

531
RBS 4.0 ships with experimental RBS inline syntax support, allowing you to write type annotations directly in Ruby source files. See [docs/inline.md](docs/inline.md) for the syntax details.
@@ -208,6 +234,14 @@ This release also introduces two language changes: type argument support for sin
208234
* Skip loading ruby_memcheck ([#2349](https://github.com/ruby/rbs/pull/2349))
209235
* Forcibly uninstall gems even if there is a dependency problem. ([#2346](https://github.com/ruby/rbs/pull/2346))
210236

237+
## 3.10.4 (2026-03-25)
238+
239+
### Library changes
240+
241+
#### rbs collection
242+
243+
* [Backport] [3.10] Fix: pathname not written to lockfile. ([#2896](https://github.com/ruby/rbs/pull/2896))
244+
211245
## 3.10.3 (2026-01-30)
212246

213247
This is a minor fix around the dependency to `tsort`.

0 commit comments

Comments
 (0)