Skip to content

Commit 858c7db

Browse files
authored
Merge branch 'master' into Fix_return_type_of__Process_detach__to_return__Process__Waiter_
2 parents 31ee679 + 6c77c6b commit 858c7db

Some content is hidden

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

64 files changed

+962
-1991
lines changed

.github/workflows/windows.yml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,9 @@ jobs:
2020
uses: ruby/setup-ruby@v1
2121
with:
2222
ruby-version: ${{ matrix.ruby }}
23-
- name: rake-compiler
24-
run: gem install rake-compiler
23+
- name: bundle install
24+
run: |
25+
bundle config set without profilers libs
26+
bundle install
2527
- name: compile
26-
run: rake compile
28+
run: bundle exec rake compile

.gitignore

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,4 +19,10 @@ lib/**/*.bundle
1919
lib/**/*.so
2020
lib/**/*.dll
2121
doc/
22+
23+
include/rbs/constants.h
24+
include/rbs/ruby_objs.h
25+
src/constants.c
26+
src/ruby_objs.c
27+
2228
**/*.gem

.rubocop.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,17 @@ RBS/Lint:
2828
Exclude:
2929
- 'sig/**/*'
3030
- 'test/**/*'
31+
RBS/Lint/TopLevelInterface:
32+
Enabled: false
33+
RBS/Lint/TopLevelTypeAlias:
34+
Enabled: false
3135
RBS/Style:
3236
Enabled: false
3337
Exclude:
3438
- 'sig/**/*'
3539
- 'test/**/*'
40+
RBS/Style/EmptyArgument:
41+
Enabled: true
3642
RBS/Style/InitializeReturnType:
3743
Enabled: true
3844

Gemfile

Lines changed: 17 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -14,22 +14,29 @@ gem "rubocop-on-rbs" if Gem::Version.new(RUBY_VERSION) >= Gem::Version.new('3.1'
1414
gem "json"
1515
gem "json-schema"
1616
gem "goodcheck"
17-
gem "dbm"
1817
gem 'digest'
1918
gem 'tempfile'
2019
gem "rdoc"
21-
gem "bigdecimal"
22-
gem "abbrev"
23-
gem "base64"
24-
gem "mutex_m"
25-
gem "nkf"
2620
gem "fileutils"
2721
gem "raap"
22+
gem "activesupport"
2823

29-
# Performance profiling and benchmarking
30-
gem 'stackprof'
31-
gem 'memory_profiler'
32-
gem 'benchmark-ips'
24+
group :libs do
25+
# Libraries required for stdlib test
26+
gem "abbrev"
27+
gem "base64"
28+
gem "bigdecimal"
29+
gem "dbm"
30+
gem "mutex_m"
31+
gem "nkf"
32+
end
33+
34+
group :profilers do
35+
# Performance profiling and benchmarking
36+
gem 'stackprof'
37+
gem 'memory_profiler'
38+
gem 'benchmark-ips'
39+
end
3340

3441
# Test gems
3542
gem "rbs-amber", path: "test/assets/test-gem"

Gemfile.lock

Lines changed: 15 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
PATH
22
remote: .
33
specs:
4-
rbs (3.7.0.dev.0)
4+
rbs (3.7.0.dev.1)
55
logger
66

77
PATH
@@ -13,8 +13,9 @@ GEM
1313
remote: https://rubygems.org/
1414
specs:
1515
abbrev (0.1.2)
16-
activesupport (7.2.1)
16+
activesupport (8.0.0)
1717
base64
18+
benchmark (>= 0.3)
1819
bigdecimal
1920
concurrent-ruby (~> 1.0, >= 1.3.1)
2021
connection_pool (>= 2.2.5)
@@ -24,10 +25,12 @@ GEM
2425
minitest (>= 5.1)
2526
securerandom (>= 0.3)
2627
tzinfo (~> 2.0, >= 2.0.5)
28+
uri (>= 0.13.1)
2729
addressable (2.8.7)
2830
public_suffix (>= 2.0.2, < 7.0)
2931
ast (2.4.2)
3032
base64 (0.2.0)
33+
benchmark (0.4.0)
3134
benchmark-ips (2.14.0)
3235
bigdecimal (3.1.8)
3336
concurrent-ruby (1.3.4)
@@ -46,7 +49,7 @@ GEM
4649
strong_json (>= 1.1, < 2.2)
4750
i18n (1.14.6)
4851
concurrent-ruby (~> 1.0)
49-
json (2.7.2)
52+
json (2.8.2)
5053
json-schema (5.0.0)
5154
addressable (~> 2.8)
5255
language_server-protocol (3.17.0.3)
@@ -64,7 +67,7 @@ GEM
6467
net-protocol
6568
nkf (0.2.0)
6669
parallel (1.26.3)
67-
parser (3.3.5.0)
70+
parser (3.3.6.0)
6871
ast (~> 2.4.1)
6972
racc
7073
power_assert (2.0.3)
@@ -98,7 +101,7 @@ GEM
98101
diff-lcs (>= 1.2.0, < 2.0)
99102
rspec-support (~> 3.13.0)
100103
rspec-support (3.13.1)
101-
rubocop (1.66.1)
104+
rubocop (1.68.0)
102105
json (~> 2.3)
103106
language_server-protocol (>= 3.17.0)
104107
parallel (~> 1.10)
@@ -108,18 +111,18 @@ GEM
108111
rubocop-ast (>= 1.32.2, < 2.0)
109112
ruby-progressbar (~> 1.7)
110113
unicode-display_width (>= 2.4.0, < 3.0)
111-
rubocop-ast (1.32.3)
114+
rubocop-ast (1.36.1)
112115
parser (>= 3.3.1.0)
113-
rubocop-on-rbs (1.0.0)
116+
rubocop-on-rbs (1.2.0)
114117
rbs (~> 3.5)
115118
rubocop (~> 1.61)
116119
zlib
117120
rubocop-rubycw (0.1.6)
118121
rubocop (~> 1.0)
119122
ruby-progressbar (1.13.0)
120-
securerandom (0.3.1)
123+
securerandom (0.3.2)
121124
stackprof (0.2.26)
122-
steep (1.8.0)
125+
steep (1.8.3)
123126
activesupport (>= 5.1)
124127
concurrent-ruby (>= 1.1.10)
125128
csv (>= 3.0.9)
@@ -146,14 +149,16 @@ GEM
146149
tzinfo (2.0.6)
147150
concurrent-ruby (~> 1.0)
148151
unicode-display_width (2.6.0)
149-
zlib (3.1.1)
152+
uri (1.0.2)
153+
zlib (3.2.0)
150154

151155
PLATFORMS
152156
ruby
153157
x86_64-darwin-20
154158

155159
DEPENDENCIES
156160
abbrev
161+
activesupport
157162
base64
158163
benchmark-ips
159164
bigdecimal

Rakefile

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,15 @@ task :confirm_annotation do
4343
sh "git diff --exit-code core stdlib"
4444
end
4545

46+
task :templates do
47+
sh "bundle exec ruby templates/template.rb include/rbs/constants.h"
48+
sh "bundle exec ruby templates/template.rb include/rbs/ruby_objs.h"
49+
sh "bundle exec ruby templates/template.rb src/constants.c"
50+
sh "bundle exec ruby templates/template.rb src/ruby_objs.c"
51+
end
52+
4653
task :compile => "ext/rbs_extension/lexer.c"
54+
Rake::Task[:compile].prereqs.prepend :templates
4755

4856
task :test_doc do
4957
files = Dir.chdir(File.expand_path('..', __FILE__)) do
@@ -63,7 +71,12 @@ task :validate => :compile do
6371
# Skip RBS validation because Ruby CI runs without rubygems
6472
case skip_rbs_validation = ENV["SKIP_RBS_VALIDATION"]
6573
when nil
66-
libs << "rbs"
74+
begin
75+
Gem::Specification.find_by_name("rbs")
76+
libs << "rbs"
77+
rescue Gem::MissingSpecError
78+
STDERR.puts "🚨🚨🚨🚨 Skipping `rbs` gem because it's not found"
79+
end
6780
when "true"
6881
# Skip
6982
else
@@ -90,7 +103,7 @@ task :stdlib_test => :compile do
90103
if ENV["RANDOMIZE_STDLIB_TEST_ORDER"] == "true"
91104
test_files.shuffle!
92105
end
93-
106+
94107
sh "#{ruby} -Ilib #{bin}/test_runner.rb #{test_files.join(' ')}"
95108
# TODO: Ractor tests need to be run in a separate process
96109
sh "#{ruby} -Ilib #{bin}/test_runner.rb test/stdlib/Ractor_test.rb"

0 commit comments

Comments
 (0)