rbs
rbs copied to clipboard
Native extension use in Gemfile prevents bundling on JRuby
There are dependencies on some native extensions not supported by JRuby (or supported, but not in the standard gems):
- The
dbmnative extension library is not supported by JRuby, but it is a dependency in the stdlib tests section. - The
pathnamegem does not include native support for JRuby. We ship our own pure-Ruby pathname that has not been merged into the gem (https://github.com/ruby/pathname/issues/17). rubocop-on-rbsgem has a dependency onzlib, which does not currently ship JRuby's extension (https://github.com/ruby/zlib/issues/38).stackprofis a native extension specific to CRuby and not supported on JRuby.
Additionally, memory_profiler depends on CRuby-specific features and probably isn't useful on JRuby.
The following diff limits these gems to the ruby platform, but of course some tests fail when they are not available.
diff --git a/Gemfile b/Gemfile
index 095664ff..73cee00c 100644
--- a/Gemfile
+++ b/Gemfile
@@ -10,7 +10,7 @@ gem "test-unit"
gem "rspec"
gem "rubocop"
gem "rubocop-rubycw"
-gem "rubocop-on-rbs"
+gem "rubocop-on-rbs", platform: :ruby
gem "json"
gem "json-schema"
gem "goodcheck"
@@ -26,16 +26,16 @@ group :libs do
gem "abbrev"
gem "base64"
gem "bigdecimal"
- gem "dbm"
+ gem "dbm", platform: :ruby
gem "mutex_m"
gem "nkf"
- gem "pathname"
+ gem "pathname", platform: :ruby
end
group :profilers do
# Performance profiling and benchmarking
- gem 'stackprof'
- gem 'memory_profiler'
+ gem 'stackprof', platform: :ruby
+ gem 'memory_profiler', platform: :ruby
gem 'benchmark-ips'
gem "ruby_memcheck", platform: :ruby
end