Skip to content

Commit a505972

Browse files
committed
👷 Support JRuby in CI; ruby/rbs#2067
1 parent ef84866 commit a505972

File tree

8 files changed

+72
-2
lines changed

8 files changed

+72
-2
lines changed

Appraisals

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,17 +36,41 @@ appraise "head" do
3636
eval_gemfile "modular/x_std_libs.gemfile"
3737
end
3838

39+
appraise "head-jruby" do
40+
platforms :jruby do
41+
# Why is gem "cgi" here? See: https://github.com/vcr/vcr/issues/1057
42+
# gem "cgi", ">= 0.5"
43+
gem "benchmark", "~> 0.4", ">= 0.4.1"
44+
eval_gemfile "modular/jruby.gemfile"
45+
eval_gemfile "modular/x_std_libs.gemfile"
46+
end
47+
end
48+
3949
# Used for current releases of ruby, truffleruby, and jruby.
4050
# Split into discrete appraisals if one of them needs a dependency locked discretely.
4151
appraise "current" do
4252
eval_gemfile "modular/x_std_libs.gemfile"
4353
end
4454

55+
appraise "current-jruby" do
56+
platforms :jruby do
57+
eval_gemfile "modular/jruby.gemfile"
58+
eval_gemfile "modular/x_std_libs.gemfile"
59+
end
60+
end
61+
4562
# Test current Rubies against head versions of runtime dependencies
4663
appraise "dep-heads" do
4764
eval_gemfile "modular/runtime_heads.gemfile"
4865
end
4966

67+
appraise "dep-heads-jruby" do
68+
platforms :jruby do
69+
eval_gemfile "modular/jruby.gemfile"
70+
eval_gemfile "modular/runtime_heads.gemfile"
71+
end
72+
end
73+
5074
appraise "ruby-3-2" do
5175
eval_gemfile "modular/x_std_libs/r3/libs.gemfile"
5276
end

Gemfile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ git_source(:gitlab) { |repo_name| "https://gitlab.com/#{repo_name}" }
88
# Specify your gem's dependencies in psych-merge.gemspec
99
gemspec
1010

11+
eval_gemfile "gemfiles/modular/jruby.gemfile"
12+
1113
eval_gemfile "gemfiles/modular/debug.gemfile"
1214
eval_gemfile "gemfiles/modular/coverage.gemfile"
1315
eval_gemfile "gemfiles/modular/style.gemfile"

Gemfile.lock

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ PATH
1515
specs:
1616
rbs-merge (1.0.0)
1717
ast-merge (~> 1.0)
18-
rbs (>= 3.0)
18+
rbs (>= 1.6)
1919
version_gem (~> 1.1, >= 1.1.9)
2020

2121
GEM
@@ -334,6 +334,7 @@ DEPENDENCIES
334334
kramdown-parser-gfm (~> 1.1)
335335
mutex_m (~> 0.2)
336336
rake (~> 13.0)
337+
rbs (< 1.7)
337338
rbs-merge!
338339
rdoc (~> 6.11)
339340
reek (~> 6.5)

gemfiles/current_jruby.gemfile

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# This file was generated by Appraisal2
2+
3+
source "https://gem.coop"
4+
5+
platforms :jruby do
6+
eval_gemfile("modular/jruby.gemfile")
7+
8+
eval_gemfile("modular/x_std_libs.gemfile")
9+
end
10+
11+
gemspec path: "../"

gemfiles/dep_heads_jruby.gemfile

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# This file was generated by Appraisal2
2+
3+
source "https://gem.coop"
4+
5+
platforms :jruby do
6+
eval_gemfile("modular/jruby.gemfile")
7+
8+
eval_gemfile("modular/runtime_heads.gemfile")
9+
end
10+
11+
gemspec path: "../"

gemfiles/head_jruby.gemfile

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# This file was generated by Appraisal2
2+
3+
source "https://gem.coop"
4+
5+
platforms :jruby do
6+
gem "benchmark", "~> 0.4", ">= 0.4.1"
7+
8+
eval_gemfile("modular/jruby.gemfile")
9+
10+
eval_gemfile("modular/x_std_libs.gemfile")
11+
end
12+
13+
gemspec path: "../"

gemfiles/modular/jruby.gemfile

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# We must constrain some gems on JRuby.
2+
3+
platform "jruby" do
4+
# JRuby does not yet support RBS 1.7+, which was refactored to use a C extension to replace the native Ruby racc
5+
# https://github.com/ruby/rbs/issues/2067
6+
# https://github.com/ruby/rbs/pull/788
7+
gem "rbs", "< 1.7"
8+
end

rbs-merge.gemspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ Gem::Specification.new do |spec|
8282
spec.executables = []
8383

8484
# Parser and AST infrastructure
85-
spec.add_dependency("rbs", ">= 3.0") # ruby >= 2.6.0
85+
spec.add_dependency("rbs", ">= 1.6") # ruby >= 2.6.0
8686

8787
# Shared merge infrastructure
8888
spec.add_dependency("ast-merge", "~> 1.0") # ruby >= 3.2.0

0 commit comments

Comments
 (0)