Skip to content

Upgrade to jruby-base 9.3.3.0 #5

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
ctrueden opened this issue Feb 19, 2022 · 0 comments
Open

Upgrade to jruby-base 9.3.3.0 #5

ctrueden opened this issue Feb 19, 2022 · 0 comments

Comments

@ctrueden
Copy link
Member

I tried to upgrade this component to the new jruby-base, which has proper dependencies with no uber-JARs (see jruby/jruby#6205 for details).

Here is the patch I tried
diff --git a/pom.xml b/pom.xml
index 840d79a..31198db 100644
--- a/pom.xml
+++ b/pom.xml
@@ -93,8 +93,8 @@ Institute of Molecular Cell Biology and Genetics.</license.copyrightOwners>
                <!-- NB: Deploy releases to the SciJava Maven repository. -->
                <releaseProfiles>sign,deploy-to-scijava</releaseProfiles>
 
-               <jruby.version>9.1.17.0</jruby.version>
-               <jruby-core.version>${jruby.version}</jruby-core.version>
+               <jruby.version>9.3.3.0</jruby.version>
+               <jruby-base.version>${jruby.version}</jruby-base.version>
                <jruby-stdlib.version>${jruby.version}</jruby-stdlib.version>
        </properties>
 
@@ -108,8 +108,8 @@ Institute of Molecular Cell Biology and Genetics.</license.copyrightOwners>
                <!-- Third-party dependencies -->
                <dependency>
                        <groupId>org.jruby</groupId>
-                       <artifactId>jruby-core</artifactId>
-                       <version>${jruby-core.version}</version>
+                       <artifactId>jruby-base</artifactId>
+                       <version>${jruby-base.version}</version>
                </dependency>
                <dependency>
                        <groupId>org.jruby</groupId>

Unfortunately, the tests then fail as follows:

org.jruby.exceptions.NoMethodError: (NoMethodError) undefined method `getLanguageByName' for nil:NilClass
	at RUBY.<main>(hello.rb:3)
[ERROR] Tests run: 3, Failures: 2, Errors: 0, Skipped: 0, Time elapsed: 2.524 s <<< FAILURE! - in org.scijava.plugins.scripting.jruby.JRubyTest
[ERROR] testParameters(org.scijava.plugins.scripting.jruby.JRubyTest)  Time elapsed: 0.132 s  <<< FAILURE!
java.lang.AssertionError: expected:<Ruby> but was:<null>
	at org.scijava.plugins.scripting.jruby.JRubyTest.testParameters(JRubyTest.java:97)

[ERROR] testLocals(org.scijava.plugins.scripting.jruby.JRubyTest)  Time elapsed: 0.007 s  <<< FAILURE!
java.lang.AssertionError: expected:<17> but was:<null>
	at org.scijava.plugins.scripting.jruby.JRubyTest.testLocals(JRubyTest.java:77)
Here are the dependency changes this update causes
diff --git a/before b/after
index c4aca19..ae41d51 100644
--- a/before
+++ b/after
@@ -1,26 +1,31 @@
-com.github.jnr jffi jar 1.2.16 compile
-com.github.jnr jffi jar native 1.2.16 compile
-com.github.jnr jnr-constants jar 0.9.9 compile
-com.github.jnr jnr-enxio jar 0.16 compile
-com.github.jnr jnr-netdb jar 1.1.6 compile
-com.github.jnr jnr-posix jar 3.0.44 compile
-com.github.jnr jnr-unixsocket jar 0.17 compile
+com.github.jnr jffi jar 1.3.9 compile
+com.github.jnr jffi jar native 1.3.9 compile
+com.github.jnr jnr-a64asm jar 1.0.0 compile
+com.github.jnr jnr-constants jar 0.10.3 compile
+com.github.jnr jnr-enxio jar 0.32.13 compile
+com.github.jnr jnr-ffi jar 2.2.11 compile
+com.github.jnr jnr-netdb jar 1.2.0 compile
+com.github.jnr jnr-posix jar 3.1.15 compile
+com.github.jnr jnr-unixsocket jar 0.38.17 compile
 com.github.jnr jnr-x86asm jar 1.0.2 compile
-com.headius invokebinder jar 1.10 compile
-com.headius modulator jar 1.0 compile
-com.headius options jar 1.4 compile
-com.headius unsafe-fences jar 1.0 compile
+com.headius backport9 jar 1.12 compile
+com.headius invokebinder jar 1.12 compile
+com.headius options jar 1.6 compile
 com.jcraft jzlib jar 1.1.3 compile
-com.martiansoftware nailgun-server jar 0.9.1 compile
 joda-time joda-time jar 2.10.1 compile
 junit junit jar 4.12 test
+me.qmx.jitescript jitescript jar 0.4.1 compile
 org.bushe eventbus jar 1.4 compile
 org.hamcrest hamcrest-core jar 1.3 test
-org.jruby.extras bytelist jar 1.0.15 compile
-org.jruby.jcodings jcodings jar 1.0.27 compile
-org.jruby.joni joni jar 2.1.15 compile
+org.jruby.jcodings jcodings jar 1.0.55 compile
+org.jruby.joni joni jar 2.1.40 compile
 org.jruby dirgra jar 0.3 compile
-org.jruby jruby-core jar 9.1.17.0 compile
-org.jruby jruby-stdlib jar 9.1.17.0 compile
+org.jruby jruby-base jar 9.3.3.0 compile
+org.jruby jruby-stdlib jar 9.3.3.0 compile
+org.ow2.asm asm-analysis jar 9.2 compile
+org.ow2.asm asm-commons jar 9.2 compile
+org.ow2.asm asm-tree jar 9.2 compile
+org.ow2.asm asm-util jar 9.2 compile
+org.ow2.asm asm jar 9.2 compile
 org.scijava parsington jar 1.0.4 compile
 org.scijava scijava-common jar 2.77.0 compile

I also tried with jruby-core 9.3.3.0 (i.e. not switching to jruby-base), and the same problem occurs. Dependency-wise though, the newer jruby-core bundles more things internally, so the dependency list becomes quite short in that case.

It must be a change in the behavior of JRuby. Maybe a new bug, or maybe something we need to adjust for. Further investigation needed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant