Skip to content
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

JRUBY_OPTS gives misleading warning #3620

Closed
chrisseaton opened this issue Jan 27, 2016 · 3 comments
Closed

JRUBY_OPTS gives misleading warning #3620

chrisseaton opened this issue Jan 27, 2016 · 3 comments
Labels
Milestone

Comments

@chrisseaton
Copy link
Contributor

Either I don't understand how JRUBY_OPTS is supposed to work, or it gives misleading warnings:

$ JRUBY_OPTS='-J-ea' bin/jruby -e 1
warning: -J-ea argument ignored (launched in same VM?)

We haven't launched a sub-JRuby there, and I think the argument isn't ignored:

$ JRUBY_OPTS='-J-version' bin/jruby -e 1
java version "1.8.0_66"
Java(TM) SE Runtime Environment (build 1.8.0_66-b17)
Java HotSpot(TM) 64-Bit Server VM (build 25.66-b17, mixed mode)
@enebo
Copy link
Member

enebo commented Jan 27, 2016

I don't know the answer to your question but I can say why it is a warning...ArgumentProcessor is seeing this and you are already running the JVM so it is trying to point out we cannot enable ea at that point. I wonder if in the past we had not passed JRUBY_OPTS env into the JVM (but appropriately setting up the Java command-line) and somenoe realized not doing that would break sub-invokes of JRuby or something like that?

@chrisseaton
Copy link
Contributor Author

At the very least the warning is simply wrong; the argument wasn't ignored.

@enebo
Copy link
Member

enebo commented Jan 27, 2016

Yeah. So if we cannot tell if assertionas are enabled progrmatically we should probably disable the warning altogether. I think at one time this warning worked as expected but it appears like it must not any more.

@enebo enebo added this to the JRuby 9.1.0.0 milestone Apr 14, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants