JRuby extension fails to build on Windows
Opened this issue · 3 comments
The build on Windows appears to have trouble locating the JRuby jar file, resulting in many missing classes during the extension build.
https://github.com/flori/json/actions/runs/4360822114/jobs/7624157859
The classpath gets set to a path to the JRuby jar file, but it does not appear to be correct:
javac -classpath java/src:D:/jruby-9.4.1.0/lib/jruby.jar -source 1.6 -target 1.6 java/src/json/ext/ByteListTranscoder.java
warning: [options] bootstrap class path not set in conjunction with -source 1.6
java\src\json\ext\ByteListTranscoder.java:8: error: package org.jruby.exceptions does not exist
import org.jruby.exceptions.RaiseException;
^
java\src\json\ext\ByteListTranscoder.java:9: error: package org.jruby.runtime does not exist
import org.jruby.runtime.ThreadContext;
^
java\src\json\ext\ByteListTranscoder.java:10: error: package org.jruby.util does not exist
import org.jruby.util.ByteList;
^
...
This probably never worked, since we usually just build the extension once on Linux or MacOS and release it for all platforms that way. We'll need to make sure the classpath is getting set properly for the extension build when running on Windows.
@headius Should we stop the build and test with Windows platform?
We can build jar file at linux or macOS, and upload artifact with https://github.com/actions/upload-artifact, after that download it with https://github.com/actions/download-artifact, test it on Windows.
How about it?
This may be a bug in rake-compiler but I'll have to refresh my memory and see if it is still broken.