Skip to content

Conversation

@eregon
Copy link
Member

@eregon eregon commented May 6, 2025

@eregon eregon requested review from headius and kou May 6, 2025 10:15
@eregon eregon mentioned this pull request May 6, 2025
@eregon
Copy link
Member Author

eregon commented May 6, 2025

@headius @kou It's still failing
https://github.com/ruby/strscan/actions/runs/14857152857/job/41713119316?pr=155

 mkdir -p tmp/java/strscan
javac -target 1.8 -source 1.8 -Xlint -d tmp/java/strscan -cp D:/jruby-10.0.0.0/lib/jruby.jar ext/jruby/org/jruby/ext/strscan/RubyStringScanner.java ext/jruby/org/jruby/ext/strscan/StringScannerLibrary.java
ext\jruby\org\jruby\ext\strscan\RubyStringScanner.java:36: error: cannot access Ruby
import org.jruby.Ruby;
                ^
  bad class file: D:\jruby-10.0.0.0\lib\jruby.jar(org/jruby/Ruby.class)
    class file has wrong version 65.0, should be 52.0
    Please remove or make sure it appears in the correct subdirectory of the classpath.
rake aborted!
Command failed with status (1): [javac -target 1.8 -source 1.8 -Xlint -d tmp/java/strscan -cp D:/jruby-10.0.0.0/lib/jruby.jar ext/jruby/org/jruby/ext/strscan/RubyStringScanner.java ext/jruby/org/jruby/ext/strscan/StringScannerLibrary.java]
D:/a/strscan/strscan/vendor/bundle/jruby/3.4.0/gems/rake-compiler-1.3.0/lib/rake/javaextensiontask.rb:129:in 'block in define_compile_tasks'
org/jruby/ext/monitor/Monitor.java:85:in 'synchronize'
org/jruby/ext/monitor/Monitor.java:85:in 'synchronize'
org/jruby/ext/monitor/Monitor.java:85:in 'synchronize'
org/jruby/ext/monitor/Monitor.java:85:in 'synchronize'
org/jruby/ext/monitor/Monitor.java:85:in 'synchronize'
org/jruby/ext/monitor/Monitor.java:85:in 'synchronize'
D:/a/strscan/strscan/vendor/bundle/jruby/3.4.0/gems/rake-13.2.1/exe/rake:27:in '<main>'
D:\a\strscan\strscan\vendor\bundle\jruby\3.4.0\bin\rake:25:in '<main>'
Tasks: TOP => compile => compile:java => compile:strscan:java => copy:strscan:java => tmp/java/strscan/strscan.jar => tmp/java/strscan/.build
(See full trace by running task with --trace)

Maybe it's #151 (comment) (I don't have a Windows machine to check) or maybe it's the -target 1.8 -source 1.8 which sounds potentially problematic since JRuby 10 is Java 21+ (but then that should fail when setup-java is used too, so probably not the issue).

@eregon eregon marked this pull request as draft May 6, 2025 10:56
@kou
Copy link
Member

kou commented May 6, 2025

@headius Does JRuby on Windows have RbConfig::CONFIG["EXEEXT"] = ".exe"?

@eregon
Copy link
Member Author

eregon commented Dec 13, 2025

Probably it just failed due to rake-compiler/rake-compiler#247 (comment), reopening

@eregon eregon reopened this Dec 13, 2025
@eregon eregon marked this pull request as ready for review December 14, 2025 09:41
@eregon
Copy link
Member Author

eregon commented Dec 14, 2025

JRuby on Windows is green now, so this PR seems fine to merge.
The detection of JAVA_HOME/bin/javac.exe is working:
https://github.com/ruby/strscan/actions/runs/20196260145/job/57991847044?pr=155#step:4:13

 C:\hostedtoolcache\windows\Java_Temurin-Hotspot_jdk\21.0.9-10.0\x64/bin/javac.exe -target 1.8 ...

CRuby 2.5 on Ubuntu is failing for an unclear unrelated reason though: https://github.com/ruby/strscan/actions/runs/20196260145/job/57991847046?pr=155

@kou Could you merge this?

@kou kou merged commit 2a67ec4 into ruby:master Dec 15, 2025
107 of 114 checks passed
@kou
Copy link
Member

kou commented Dec 15, 2025

Thanks.

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.

2 participants