You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
FYI I have fixed this by simply changing the Windows line ending to Unix, but it is an interesting corner case I thought you should know about.
Basically I have a developer working in Windows environment who forgot to change her line endings to unix (as per our developer guidelines).
We perform our centralised build on a linux system and the jruby compile phase swallows the windows line endings and includes them in the string-literals used to represent the ruby in the generated java class.
Environment
Using jruby-complete-9.0.4.0.jar
Development using Windows 10
Build using CentOS Linux release 7.1.1503 3.10.0-229.20.1.el7.x86_64
java version "1.7.0_80"
Expected Behavior
I think that I would expect that DOS CRLF would be converted to newlines appropriate for java.
Actual Behavior
Javac stage of jruby compile complains about invalid characters.
My Ruby source (snippet):
require 'java'
require_relative 'LocalModule' if __FILE__ == $0
java_import 'some.package'
class MyRubyClass
FYI I have fixed this by simply changing the Windows line ending to Unix, but it is an interesting corner case I thought you should know about.
Basically I have a developer working in Windows environment who forgot to change her line endings to unix (as per our developer guidelines).
We perform our centralised build on a linux system and the jruby compile phase swallows the windows line endings and includes them in the string-literals used to represent the ruby in the generated java class.
Environment
Using jruby-complete-9.0.4.0.jar
Development using Windows 10
Build using CentOS Linux release 7.1.1503 3.10.0-229.20.1.el7.x86_64
java version "1.7.0_80"
Expected Behavior
I think that I would expect that DOS CRLF would be converted to newlines appropriate for java.
Actual Behavior
Javac stage of jruby compile complains about invalid characters.
My Ruby source (snippet):
etc etc
Compiled using
java
Ant task:Produces this java source (vi output):
Notice
^M
line-feed characters, which I believe are illegal in Java string literals.Which results in the following output from my build-script:
The text was updated successfully, but these errors were encountered: