-
-
Notifications
You must be signed in to change notification settings - Fork 925
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
[Truffle] add app/gem runner #3298
Conversation
This looks like really good work and should be a great step forward in testing gems. I can't figure out exactly how I'm supposed to use it though. How do I install the gem? Using my dev version of JRuby? How would it get onto my path? I tried a couple of commands like this (without installing) and it didn't work:
Could you post a complete example of use for Active Support? |
@@ -0,0 +1,270 @@ | |||
require 'optparse' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Anything more substantial than a simple configuration file must begin with our standard copyright header - so the JRuby people are clear what we're putting into their repository if nothing else.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed
s.platform = Gem::Platform::RUBY | ||
s.authors = ['Petr Chalupa'] | ||
s.email = ['git@pitr.ch'] | ||
s.homepage = 'http://github.com/jruby/jruby' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
May as well make this 'https' and avoid the redirect.
Ah sorry, last minute changes strike again :(. |
57030a6
to
a93c8ce
Compare
To run the executable, I either do
|
Regarding usage for activesupport:
|
test: ['-t', '--test', 'Do not use Truffle use plain JRuby', assign_new_value, false], | ||
debug: ['-d', '--debug', 'JVM remote debugging', assign_new_value, false], | ||
require: ['-r', '--require FILE', 'Files to require, same as Ruby\'s -r', add_to_array, []], | ||
load_path: ['-l', '--load-path LOAD_PATH', 'Paths to add to load path, same as Ruby\'s -I', add_to_array, []], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can the shorthand be -I as well?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah probably better.
Looks great, and it also raises the question what launcher do we want for testing/user/dev and I think it make sense to have sth slightly different for some of them. |
#!/usr/bin/env ruby | ||
|
||
require_relative '../lib/jruby_truffle_runner.rb' | ||
JRubyTruffleRunner.new |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is not executable by default, can you chmod and commit that?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It should be renamed I think to match with the gem name.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done;
I am not sure, jruby_truffle_runner
executable is quite long :/
f6cf8f1
to
b4de35f
Compare
TODO:
|
Can we merge this and then keep working on master? It's already very useful. |
Please check the last commit if you agree with the new names. After that we can merge. |
Looks good to me. |
How to try with
activesupport
:truffle --help
to see the helptruffle --verbose setup
(uses default bundled activesupport configuration) and sets the environmenttruffle -v run test/core_ext/integer_ext_test.rb
We can add config files for libraries we test, plus we get the same environment locally when testing.
The bad path of the bundle issue is solved by symlink, https://github.com/jruby/jruby/pull/3298/files#diff-ebd53ce24fc30c47574135956e30702cR229.