-
Notifications
You must be signed in to change notification settings - Fork 172
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
asciidoctorj-diagram 1.3.0 does not work on Windows with JRuby 1.7.22 #401
Comments
Problem does also not occur on OS X. |
I'm sure I've seen something similar like this on an older version of JRuby in the asciidoctor-gradle-plugin. An on this note, are we not going to use JRuby 9.x? (or is that a 1.6.0 thing). |
This looks a lot like a process error in JRuby. They were making a lot of changes in that area of the code and capabilities went in and out for several releases. Does it work with JRuby 9000? There were also fixes to Asciidoctor Diagram 1.3.1 for Windows, so it could be related to that as well. asciidoctor/asciidoctor-diagram@835bcd1 |
@ysb33r We are shipping AsciidoctorJ with JRuby 1.7 by default (in the dep tree), but we are recommending everyone switch to JRuby 9000 now. No one should be using JRuby 1.7 unless they absolutely must because frankly it was showing a lot of problems in the later releases. |
Just to correct something. It was not in asciidoctor-gradle-plugin where I saw it, but jruby-gradle/jruby-gradle-plugin#83. Remember this @mojavelinux? It also involved the asciidoctor-diagram GEM but seems to have been fixed in 1.7.17. Not exactly the same error, but quite coincidental that it was asciidoctor-diagram involved again. |
Asciidoctor Diagram does some pretty advanced tty stuff, so it's not unlikely that if we are going to hit bugs, that it will scare them out. |
This still leaves the problem with the full asciidoctorj distribution, which would bundle 1.7.22. Should we not rather just downgrade it to 1.7.21 for thie point release? (Still thinking though that as from 1.6.0 we should bundle 9k as the default). |
Sounds like a wise plan. We should verify that actually solves the problem. Is there any other reason we need 1.7.22 (security?)
That's a certainty. |
The funny thing is that the test case does not fail! I'm also for downgrading to 1.7.21, I just chose the newest version. I am a bit reluctant to jump on JRuby 9000 with a 1.5.3 release because it also means that we raise the runtime requirements from Java 6 to 7.
|
Agreed. It's definitely a 1.6.0 thing. But we can still recommend to users that they use JRuby 9000 by setting the dependency explicitly. |
Crazy! But keep in mind, we never released AsciidoctorJ Diagram before, so this could be the first time we're evening trying to run it. That could be why it surprised us. |
I am seeing a similar error when I try to execute asciidoctorj-pdf on a windows system through Cygwin (#402: the same code executed on a linux system):
I am also packaging this in a fat-jar... I will try it in an unpackaged jar and see if it doesn't fail. |
@johncarl81 If you packaged the fat jar with jruby-gradle, it is worth discussing this on Gitter on loggin and issue with the jruby-gradle project. |
Ok, this looks similar.
|
Downgrading (specifying JRuby) 1.7.21 worked on windows. Interestingly I'm seeing another error in linux (posting in #402) |
@ysb33r, I am using maven's assembly plugin to build the fat-jar. |
Same problem here (WIndows 8), looks like this JRuby issue still exists: jruby/jruby#2944 |
Thanks for finding that reference, @atomfrede! |
Seems like I have to play around with different JRuby versions. |
I updated jruby to |
Could you turn on stacktraces so we can see where that's getting triggered? |
Rendering also crashes with asciidoctor-diagram 1.3.1 on Win with JRuby 1.7.22. Also works with 9.0.3.0 on my machine (Win7 Enterprise) (I know, "works on my machine" is a no-no...) |
The real key will be getting this to happen on AppVeyor. Though, before you try that, it's probably best to understand what triggers the errors or otherwise you'll be waiting for builds for hours :) |
I remember a previous time where we could not reproduce the error on Appveyor at all, but relatively easy with a modern.ie image. I still don't know enough about Appveyor Windows images to explain that. |
Very likely differences in Windows itself. Unfortunately, we can't run Win7 on AppVeyor, only Windows Server. |
@mojavelinux My stacktrace:
|
I wonder if this is the "compiled with Java 8, running with Java 7" error. It seems really strange that it wouldn't be able to find a core JRuby type. |
Using asciidoctorj-diagram on Win 10 also fails with JRuby 1.7.22. Nevertheless I also see this warning with 1.7.21:
|
As long as it's just a warning, we shouldn't worry about it too much. But if it causes a failure down the line, then of course it's a real concern. |
Fixed by going down to JRuby 1.7.21 |
+1 !
|
Filed issue jruby/jruby#3466 for this problem. |
asciidoctorj-diagram works with the last release jruby 1.7.23. |
we have no CI for windows for jruby, so it looks any windows fix we have another regression somewhere. jruby-9k works better because it does not use those jar-url paths and goes through the classloader instead which does not need to handle OS specific paths at all !!! so best would be to set GEM_PATH to
assuming you guys use jruby-gradle-plugin to embed those gems into the jar: unfortunately the current version of the jruby-gradle-plugin does not produce a jar which works on jruby-1.7 due to jruby-gradle/jruby-gradle-plugin#258 |
We actually only use the Base plugin (http://jruby-gradle.org/base/) as the Jar plugin does not exactly do what we want. |
The JRubyJar stuff have changed a lot. I have been meaning to look at upgrading the 1.6.0 build to see if the new jruby-gradle functionality works for asciidoctor as I would have hoped. |
oh - I see. the jar-plugin is far from useful for asciidoctorj :( happy to help here to get it working here. |
It would be great if we could use that! |
Why not setup AppVeyor. It's just as easy to get setup as Travis CI. We use it for AsciidoctorJ. It doesn't catch everything, but it at least gives us some idea of what to expect. |
@mojavelinux AppVeyor is actually on its way but there are tons of tests which will not work on windows and needs to be excluded and probably loads to work to get test parity between windows and *nix |
Understood. |
When trying to render the test document from the asciidoctorj-diagram on Win7 via the distribution rendering fails with an exception:
So what actually fails is this line in
blockdiag.rb
:But a
version.rb
exists next to theblockdiag.rb
!I can't reproduce that on Linux (in a Docker container) nor in the test cases on Win that also render this document.
Funny thing is that it works if I use another JRuby like 1.7.21 or lower.
Or maybe I just have a bad karma today...
The text was updated successfully, but these errors were encountered: