cgi
cgi copied to clipboard
CI: JRuby test suite fails to compile
This is a sign-post issue. jruby-head does not currently build right.
The setup-ruby step say this:
Modifying JAVA_HOME for JRuby
attempting to run with existing JAVA_HOME
/usr/lib/jvm/temurin-17-jdk-amd64/bin/java -jar /home/runner/.rubies/jruby-head/lib/jruby.jar --version
Error: LinkageError occurred while loading main class org.jruby.Main
java.lang.UnsupportedClassVersionError: org/jruby/Main has been compiled by a more recent version of the Java Runtime (class file version 65.0), this version of the Java Runtime only recognizes class file versions up to 61.0
mkdir -p tmp/java/escape
javac -target 1.8 -source 1.8 -Xlint -d tmp/java/escape -cp /home/runner/.rubies/jruby-head/lib/jruby.jar ext/java/org/jruby/ext/cgi/escape/CGIEscape.java
warning: [options] bootstrap class path not set in conjunction with -source 8
ext/java/org/jruby/ext/cgi/escape/CGIEscape.java:35: error: cannot access Ruby
import org.jruby.Ruby;
^
bad class file: /home/runner/.rubies/jruby-head/lib/jruby.jar(/org/jruby/Ruby.class)
class file has wrong version 65.0, should be 61.0
Please remove or make sure it appears in the correct subdirectory of the classpath.
ext/java/org/jruby/ext/cgi/escape/CGIEscape.java:36: error: cannot access RubyClass
import org.jruby.RubyClass;
^
bad class file: /home/runner/.rubies/jruby-head/lib/jruby.jar(/org/jruby/RubyClass.class)
class file has wrong version 65.0, should be 61.0
Please remove or make sure it appears in the correct subdirectory of the classpath.
ext/java/org/jruby/ext/cgi/escape/CGIEscape.java:37: error: cannot access RubyEncoding
import org.jruby.RubyEncoding;
^
bad class file: /home/runner/.rubies/jruby-head/lib/jruby.jar(/org/jruby/RubyEncoding.class)
class file has wrong version 65.0, should be 61.0
Please remove or make sure it appears in the correct subdirectory of the classpath.
ext/java/org/jruby/ext/cgi/escape/CGIEscape.java:38: error: cannot access RubyModule
import org.jruby.RubyModule;
^
bad class file: /home/runner/.rubies/jruby-head/lib/jruby.jar(/org/jruby/RubyModule.class)
class file has wrong version 65.0, should be 61.0
Please remove or make sure it appears in the correct subdirectory of the classpath.
ext/java/org/jruby/ext/cgi/escape/CGIEscape.java:39: error: cannot access RubyString
import org.jruby.RubyString;
^
bad class file: /home/runner/.rubies/jruby-head/lib/jruby.jar(/org/jruby/RubyString.class)
class file has wrong version 65.0, should be 61.0
Please remove or make sure it appears in the correct subdirectory of the classpath.
ext/java/org/jruby/ext/cgi/escape/CGIEscape.java:40: error: cannot access JRubyMethod
import org.jruby.anno.JRubyMethod;
^
bad class file: /home/runner/.rubies/jruby-head/lib/jruby.jar(/org/jruby/anno/JRubyMethod.class)
class file has wrong version 65.0, should be 61.0
Please remove or make sure it appears in the correct subdirectory of the classpath.
ext/java/org/jruby/ext/cgi/escape/CGIEscape.java:41: error: cannot access Block
import org.jruby.runtime.Block;
^
bad class file: /home/runner/.rubies/jruby-head/lib/jruby.jar(/org/jruby/runtime/Block.class)
class file has wrong version 65.0, should be 61.0
symbol: variable RubyString
location: class CGIEscape
ext/java/org/jruby/ext/cgi/escape/CGIEscape.java:329: error: cannot find symbol
RubyString dest = null;
^
symbol: class RubyString
location: class CGIEscape
ext/java/org/jruby/ext/cgi/escape/CGIEscape.java:333: error: cannot find symbol
Encoding origenc, encidx = EncodingUtils.rbToEncoding(context, encoding);
^
symbol: variable EncodingUtils
location: class CGIEscape
ext/java/org/jruby/ext/cgi/escape/CGIEscape.java:336: error: cannot find symbol
ByteList byteList = str.getByteList();
^
symbol: class ByteList
location: class CGIEscape
ext/java/org/jruby/ext/cgi/escape/CGIEscape.java:341: error: cannot find symbol
Ruby runtime = context.runtime;
^
symbol: class Ruby
location: class CGIEscape
ext/java/org/jruby/ext/cgi/escape/CGIEscape.java:360: error: cannot find symbol
dest = RubyString.newStringLight(runtime, len);
^
symbol: variable RubyString
location: class CGIEscape
ext/java/org/jruby/ext/cgi/escape/CGIEscape.java:373: error: cannot find symbol
cr = StringSupport.CR_UNKNOWN;
^
symbol: variable StringSupport
location: class CGIEscape
ext/java/org/jruby/ext/cgi/escape/CGIEscape.java:381: error: cannot find symbol
if (StringSupport.encCoderangeClean(dest.getCodeRange()) == 0) {
^
symbol: variable StringSupport
location: class CGIEscape
ext/java/org/jruby/ext/cgi/escape/CGIEscape.java:383: error: cannot find symbol
if (cr != StringSupport.CR_UNKNOWN)
^
symbol: variable StringSupport
location: class CGIEscape
ext/java/org/jruby/ext/cgi/escape/CGIEscape.java:399: error: cannot find symbol
RubyString str = _str.convertToString();
^
symbol: class RubyString
location: class CGIEscape
ext/java/org/jruby/ext/cgi/escape/CGIEscape.java:404: error: cannot find symbol
return Helpers.invokeSuper(context, self, _str, Block.NULL_BLOCK);
^
symbol: variable Block
location: class CGIEscape
ext/java/org/jruby/ext/cgi/escape/CGIEscape.java:404: error: cannot find symbol
return Helpers.invokeSuper(context, self, _str, Block.NULL_BLOCK);
^
symbol: variable Helpers
location: class CGIEscape
ext/java/org/jruby/ext/cgi/escape/CGIEscape.java:417: error: cannot find symbol
RubyString str = _str.convertToString();
^
symbol: class RubyString
location: class CGIEscape
ext/java/org/jruby/ext/cgi/escape/CGIEscape.java:422: error: cannot find symbol
return Helpers.invokeSuper(context, self, _str, Block.NULL_BLOCK);
^
symbol: variable Block
location: class CGIEscape
ext/java/org/jruby/ext/cgi/escape/CGIEscape.java:422: error: cannot find symbol
return Helpers.invokeSuper(context, self, _str, Block.NULL_BLOCK);
^
symbol: variable Helpers
location: class CGIEscape
100 errors
1 warning
only showing the first 100 errors, of 119 total; use -Xmaxerrs if you would like to see more
rake aborted!
Command failed with status (1): [javac -target 1.8 -source 1.8 -Xlint -d tmp/java/escape -cp /home/runner/.rubies/jruby-head/lib/jruby.jar ext/java/org/jruby/ext/cgi/escape/CGIEscape.java]
Now it compiles but the tests fails with NoMethodError.
Error: test_cgi_escapeHTML:CP50221(CGIUtilTest): NoMethodError: super: no superclass method '_escapeHTML' for class CGI
org/jruby/ext/cgi/escape/CGIEscape.java:404:in 'escapeHTML'
Error: test_cgi_unescapeHTML:ISO-2022-JP(CGIUtilTest): NoMethodError: super: no superclass method '_unescapeHTML' for class CGI
org/jruby/ext/cgi/escape/CGIEscape.java:422:in 'unescapeHTML'
```
===============================================================================
Error: test_cgi_escapeHTML:CP50221(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:1397:in 'catch'
org/jruby/RubyKernel.java:1392:in 'catch'
org/jruby/RubyArray.java:2079:in 'each'
org/jruby/RubyArray.java:2079:in 'each'
org/jruby/RubyKernel.java:1397:in 'catch'
org/jruby/RubyKernel.java:1392:in 'catch'
===============================================================================
===============================================================================
Error: test_cgi_escapeHTML:IBM037(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:1397:in 'catch'
org/jruby/RubyKernel.java:1392:in 'catch'
org/jruby/RubyArray.java:2079:in 'each'
org/jruby/RubyArray.java:2079:in 'each'
org/jruby/RubyKernel.java:1397:in 'catch'
org/jruby/RubyKernel.java:1392:in 'catch'
===============================================================================
===============================================================================
Error: test_cgi_escapeHTML:ISO-2022-JP(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:1397:in 'catch'
org/jruby/RubyKernel.java:1392:in 'catch'
org/jruby/RubyArray.java:2079:in 'each'
org/jruby/RubyArray.java:2079:in 'each'
org/jruby/RubyKernel.java:1397:in 'catch'
org/jruby/RubyKernel.java:1392:in 'catch'
===============================================================================
===============================================================================
Error: test_cgi_escapeHTML:ISO-2022-JP-KDDI(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:1397:in 'catch'
org/jruby/RubyKernel.java:1392:in 'catch'
Error: test_cgi_unescapeHTML:ISO-2022-JP(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:1397:in 'catch'
org/jruby/RubyKernel.java:1392:in 'catch'
org/jruby/RubyArray.java:2079:in 'each'
org/jruby/RubyArray.java:2079:in 'each'
org/jruby/RubyKernel.java:1397:in 'catch'
org/jruby/RubyKernel.java:1392:in 'catch'
===============================================================================
===============================================================================
Error: test_cgi_unescapeHTML:ISO-2022-JP-KDDI(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:1397:in 'catch'
org/jruby/RubyKernel.java:1392:in 'catch'
org/jruby/RubyArray.java:2079:in 'each'
org/jruby/RubyArray.java:2079:in 'each'
org/jruby/RubyKernel.java:1397:in 'catch'
org/jruby/RubyKernel.java:1392: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:1397:in 'catch'
org/jruby/RubyKernel.java:1392:in 'catch'
org/jruby/RubyArray.java:2079:in 'each'
org/jruby/RubyArray.java:2079:in 'each'
org/jruby/RubyKernel.java:1397:in 'catch'
org/jruby/RubyKernel.java:1392: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:1397:in 'catch'
org/jruby/RubyKernel.java:1392:in 'catch'
org/jruby/RubyArray.java:2079:in 'each'
org/jruby/RubyArray.java:2079:in 'each'
org/jruby/RubyKernel.java:1397:in 'catch'
org/jruby/RubyKernel.java:1392:in 'catch'
===============================================================================
```