-
-
Notifications
You must be signed in to change notification settings - Fork 1k
Add TruffleRuby to rvm #4406
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
Add TruffleRuby to rvm #4406
Conversation
* TruffleRuby 1.0.0-rc2 contains an Array as a RbConfig::CONFIG value.
* Uses JRuby as model for the install steps.
* Best effort, I have no way to check if it actually works on so many platforms.
| .RS 4 | ||
| TruffleRuby, a high performance implementation of Ruby built on GraalVM\&. | ||
| .RE | ||
| .PP |
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.
Note: I updated rvm.1.gz with gzip -k rvm.1.
| else | ||
| __rvm_ruby_string_autodetect | ||
| case "${rvm_ruby_string}" in | ||
| # Should truffleruby-* be added here? |
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.
Should truffleruby-* be added here? It's not clear to me.
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.
no need
| __rvm_ruby_package_file() | ||
| { | ||
| # What's this? Is it just for binary rubies? Do we need to change something for TruffleRuby? | ||
| # We already set rvm_ruby_package_file in __rvm_select_interpreter_truffleruby(). |
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.
What's this function?
Is it just for binary rubies?
Do we need to change something for TruffleRuby?
Note that we already set rvm_ruby_package_file in __rvm_select_interpreter_truffleruby().
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 would make sense if we install TruffleRuby, prepare binary for it, upload it to RVM binaries and then people download them, I'm not sure this would work with TruffleRuby license, but still could be used for multiserver deploys in private environment.
I guess we can add this in separate PR.
| fi | ||
| } | ||
|
|
||
| # Should we add an entry for truffleruby here? What's the purpose of this function? |
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.
Should I add an entry for truffleruby here?
What's the purpose of this function?
Is it for guessing a good name based on the URL/archive given to mount?
rvm mount -r 'https://github.com/oracle/truffleruby/releases/download/vm-1.0.0-rc2/truffleruby-1.0.0-rc2-linux-amd64.tar.gz' seems to choose truffleruby-1.0.0-rc2-linux-amd64 as the name currently.
It's mostly fine, except we might want to drop the -linux-amd64.
OTOH, it would then conflict with the normal name from rvm install truffleruby, which I'm not sure is a good idea.
Maybe it should have some prefix or suffix when rvm mount-ed?
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.
see the comment in scripts/functions/utility_system
|
I think it would be nice to test installing TruffleRuby with rvm in Travis CI. |
| else | ||
| __rvm_ruby_string_autodetect | ||
| case "${rvm_ruby_string}" in | ||
| # Should truffleruby-* be added here? |
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.
no need
| __rvm_ruby_package_file() | ||
| { | ||
| # What's this? Is it just for binary rubies? Do we need to change something for TruffleRuby? | ||
| # We already set rvm_ruby_package_file in __rvm_select_interpreter_truffleruby(). |
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 would make sense if we install TruffleRuby, prepare binary for it, upload it to RVM binaries and then people download them, I'm not sure this would work with TruffleRuby license, but still could be used for multiserver deploys in private environment.
I guess we can add this in separate PR.
| fi | ||
| } | ||
|
|
||
| # Should we add an entry for truffleruby here? What's the purpose of this function? |
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.
see the comment in scripts/functions/utility_system
|
merged in 70ff3d0 I have left comments about mounting binary rubies, we can address this in separate PR. |
|
btw. great job! |
|
@mpapis Thank you for the review and merging! |
|
There should be no licence issue with modifying the TruffleRuby distribution by doing things such as precompiling C extensions. The standalone Ruby distribution contains only open-source code under simple licenses (BSD, GPL, etc). |
Hello,
Here is a PR to add TruffleRuby to rvm. It fixes issue #4297.
I tried to keep the logic simple, and to update all relevant places mentioning other implementations.
I tested
rvm install trufflerubylocally and it seems to work well.This is a fully open-source version of TruffleRuby, corresponding to a subset of the Community Edition of GraalVM (see http://www.graalvm.org/downloads/)
It includes the
nativeconfiguration only, not theJVMconfiguration, so there is no JVM involved.I have a few questions, which I'll point in the diff, as well as the more general question of should it be considered a "binary ruby", mentioned in #4297 (comment).
Please review carefully, I'm not familiar with the RVM code base and I can't say I have a very good understanding of it (it's quite large and complex).
cc @mpapis @havenwood