Skip to content

CI: Configure JRuby: use javac --release, JRUBY_OPTS=--debug, use Java 21 #60

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

Conversation

olleolleolle
Copy link
Contributor

@olleolleolle olleolleolle commented Apr 7, 2025

This PR changes the JRuby test situation.

First, I avoided some deprecation warnings. Then, I also changed the running Java version, which allowed jruby-head to build.

It avoids using --source 1.8 and --target 1.8, to side-step a build warning.

warning: [options] bootstrap class path not set in conjunction with -source 8

The result is:

  • the deprecation warning no longer shows, and --release=8 is used in the javac compilation command.
  • Truffleruby builds and runs tests all green
  • JRuby can build correctly, but it has issues when running tests (a red test run)
Details about: jruby-head test failures about no superclass method
===============================================================================
Error: test_cgi_escapeHTML:UTF-16(CGIUtilTest): NoMethodError: super: no superclass method '_escapeHTML' for class CGI
org/jruby/ext/cgi/escape/CGIEscape.java:404:in 'escapeHTML'
/home/runner/work/cgi/cgi/test/cgi/test_cgi_util.rb:213:in 'block in CGIUtilTest'
org/jruby/RubyKernel.java:1398:in 'catch'
org/jruby/RubyKernel.java:1393:in 'catch'
org/jruby/RubyArray.java:2077:in 'each'
org/jruby/RubyArray.java:2077:in 'each'
org/jruby/RubyKernel.java:1398:in 'catch'
org/jruby/RubyKernel.java:1393:in 'catch'
===============================================================================
===============================================================================
Error: test_cgi_escapeHTML:UTF-16BE(CGIUtilTest): NoMethodError: super: no superclass method '_escapeHTML' for class CGI
org/jruby/ext/cgi/escape/CGIEscape.java:404:in 'escapeHTML'
/home/runner/work/cgi/cgi/test/cgi/test_cgi_util.rb:213:in 'block in CGIUtilTest'
org/jruby/RubyKernel.java:1398:in 'catch'
org/jruby/RubyKernel.java:1393:in 'catch'
org/jruby/RubyArray.java:2077:in 'each'
org/jruby/RubyArray.java:2077:in 'each'
org/jruby/RubyKernel.java:1398:in 'catch'
org/jruby/RubyKernel.java:1393:in 'catch'
===============================================================================
===============================================================================
Error: test_cgi_escapeHTML:UTF-16LE(CGIUtilTest): NoMethodError: super: no superclass method '_escapeHTML' for class CGI
org/jruby/ext/cgi/escape/CGIEscape.java:404:in 'escapeHTML'
/home/runner/work/cgi/cgi/test/cgi/test_cgi_util.rb:213:in 'block in CGIUtilTest'
org/jruby/RubyKernel.java:1398:in 'catch'
org/jruby/RubyKernel.java:1393:in 'catch'
org/jruby/RubyArray.java:2077:in 'each'
org/jruby/RubyArray.java:2077:in 'each'
org/jruby/RubyKernel.java:1398:in 'catch'
org/jruby/RubyKernel.java:1393:in 'catch'
===============================================================================
===============================================================================
Error: test_cgi_escapeHTML:UTF-32(CGIUtilTest): NoMethodError: super: no superclass method '_escapeHTML' for class CGI
org/jruby/ext/cgi/escape/CGIEscape.java:404:in 'escapeHTML'
/home/runner/work/cgi/cgi/test/cgi/test_cgi_util.rb:213:in 'block in CGIUtilTest'
org/jruby/RubyKernel.java:1398:in 'catch'
org/jruby/RubyKernel.java:1393:in 'catch'
org/jruby/RubyArray.java:2077:in 'each'
org/jruby/RubyArray.java:2077:in 'each'
org/jruby/RubyKernel.java:1398:in 'catch'
org/jruby/RubyKernel.java:1393:in 'catch'
===============================================================================
===============================================================================
Error: test_cgi_escapeHTML:UTF-32BE(CGIUtilTest): NoMethodError: super: no superclass method '_escapeHTML' for class CGI
org/jruby/ext/cgi/escape/CGIEscape.java:404:in 'escapeHTML'
/home/runner/work/cgi/cgi/test/cgi/test_cgi_util.rb:213:in 'block in CGIUtilTest'
org/jruby/RubyKernel.java:1398:in 'catch'
org/jruby/RubyKernel.java:1393:in 'catch'
org/jruby/RubyArray.java:2077:in 'each'
org/jruby/RubyArray.java:2077:in 'each'
org/jruby/RubyKernel.java:1398:in 'catch'
org/jruby/RubyKernel.java:1393:in 'catch'
===============================================================================
===============================================================================
Error: test_cgi_escapeHTML:UTF-32LE(CGIUtilTest): NoMethodError: super: no superclass method '_escapeHTML' for class CGI
org/jruby/ext/cgi/escape/CGIEscape.java:404:in 'escapeHTML'
/home/runner/work/cgi/cgi/test/cgi/test_cgi_util.rb:213:in 'block in CGIUtilTest'
org/jruby/RubyKernel.java:1398:in 'catch'
org/jruby/RubyKernel.java:1393:in 'catch'
org/jruby/RubyArray.java:2077:in 'each'
org/jruby/RubyArray.java:2077:in 'each'
org/jruby/RubyKernel.java:1398:in 'catch'
org/jruby/RubyKernel.java:1393:in 'catch'
===============================================================================
===============================================================================
Error: test_cgi_unescapeHTML:UTF-16(CGIUtilTest): NoMethodError: super: no superclass method '_unescapeHTML' for class CGI
org/jruby/ext/cgi/escape/CGIEscape.java:422:in 'unescapeHTML'
/home/runner/work/cgi/cgi/test/cgi/test_cgi_util.rb:216:in 'block in CGIUtilTest'
org/jruby/RubyKernel.java:1398:in 'catch'
org/jruby/RubyKernel.java:1393:in 'catch'
org/jruby/RubyArray.java:2077:in 'each'
org/jruby/RubyArray.java:2077:in 'each'
org/jruby/RubyKernel.java:1398:in 'catch'
org/jruby/RubyKernel.java:1393:in 'catch'
===============================================================================
===============================================================================
Error: test_cgi_unescapeHTML:UTF-16BE(CGIUtilTest): NoMethodError: super: no superclass method '_unescapeHTML' for class CGI
org/jruby/ext/cgi/escape/CGIEscape.java:422:in 'unescapeHTML'
/home/runner/work/cgi/cgi/test/cgi/test_cgi_util.rb:216:in 'block in CGIUtilTest'
org/jruby/RubyKernel.java:1398:in 'catch'
org/jruby/RubyKernel.java:1393:in 'catch'
org/jruby/RubyArray.java:2077:in 'each'
org/jruby/RubyArray.java:2077:in 'each'
org/jruby/RubyKernel.java:1398:in 'catch'
org/jruby/RubyKernel.java:1393:in 'catch'
===============================================================================
===============================================================================
Error: test_cgi_unescapeHTML:UTF-16LE(CGIUtilTest): NoMethodError: super: no superclass method '_unescapeHTML' for class CGI
org/jruby/ext/cgi/escape/CGIEscape.java:422:in 'unescapeHTML'
/home/runner/work/cgi/cgi/test/cgi/test_cgi_util.rb:216:in 'block in CGIUtilTest'
org/jruby/RubyKernel.java:1398:in 'catch'
org/jruby/RubyKernel.java:1393:in 'catch'
org/jruby/RubyArray.java:2077:in 'each'
org/jruby/RubyArray.java:2077:in 'each'
org/jruby/RubyKernel.java:1398:in 'catch'
org/jruby/RubyKernel.java:1393:in 'catch'
===============================================================================
===============================================================================
Error: test_cgi_unescapeHTML:UTF-32(CGIUtilTest): NoMethodError: super: no superclass method '_unescapeHTML' for class CGI
org/jruby/ext/cgi/escape/CGIEscape.java:422:in 'unescapeHTML'
/home/runner/work/cgi/cgi/test/cgi/test_cgi_util.rb:216:in 'block in CGIUtilTest'
org/jruby/RubyKernel.java:1398:in 'catch'
org/jruby/RubyKernel.java:1393:in 'catch'
org/jruby/RubyArray.java:2077:in 'each'
org/jruby/RubyArray.java:2077:in 'each'
org/jruby/RubyKernel.java:1398:in 'catch'
org/jruby/RubyKernel.java:1393:in 'catch'
===============================================================================
===============================================================================
Error: test_cgi_unescapeHTML:UTF-32BE(CGIUtilTest): NoMethodError: super: no superclass method '_unescapeHTML' for class CGI
org/jruby/ext/cgi/escape/CGIEscape.java:422:in 'unescapeHTML'
/home/runner/work/cgi/cgi/test/cgi/test_cgi_util.rb:216:in 'block in CGIUtilTest'
org/jruby/RubyKernel.java:1398:in 'catch'
org/jruby/RubyKernel.java:1393:in 'catch'
org/jruby/RubyArray.java:2077:in 'each'
org/jruby/RubyArray.java:2077:in 'each'
org/jruby/RubyKernel.java:1398:in 'catch'
org/jruby/RubyKernel.java:1393:in 'catch'
===============================================================================
===============================================================================
Error: test_cgi_unescapeHTML:UTF-32LE(CGIUtilTest): NoMethodError: super: no superclass method '_unescapeHTML' for class CGI
org/jruby/ext/cgi/escape/CGIEscape.java:422:in 'unescapeHTML'
/home/runner/work/cgi/cgi/test/cgi/test_cgi_util.rb:216:in 'block in CGIUtilTest'
org/jruby/RubyKernel.java:1398:in 'catch'
org/jruby/RubyKernel.java:1393:in 'catch'
org/jruby/RubyArray.java:2077:in 'each'
org/jruby/RubyArray.java:2077:in 'each'
org/jruby/RubyKernel.java:1398:in 'catch'
org/jruby/RubyKernel.java:1393:in 'catch'
===============================================================================
Finished in 14.668465000000001 seconds.
469 tests, 1012 assertions, 0 failures, 12 errors, 0 pendings, 0 omissions, 0 notifications

Fixes #59

@olleolleolle olleolleolle changed the title JRuby extension: use --release CI: Configure JRuby: use javac --release, JRUBY_OPTS=--debug, use Java 21 Apr 7, 2025
@olleolleolle olleolleolle marked this pull request as ready for review April 8, 2025 08:26
@olleolleolle olleolleolle requested a review from hsbt April 8, 2025 08:26
@olleolleolle
Copy link
Contributor Author

@hsbt This repairs the build issue for JRuby. I spoke to @headius and he noted that the way that alias + super + remove_method is used in tests may uncover something funky in JRuby itself.

@olleolleolle
Copy link
Contributor Author

This is fixed upstream! Closing.

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

Successfully merging this pull request may close these issues.

CI: JRuby test suite fails to compile
1 participant