-
-
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] mx clean and mx build work for JRuby #3813
Conversation
# java executable that is used we unfortunately need to append it to the PATH | ||
javaHome = os.getenv('JAVA_HOME') | ||
if javaHome: | ||
os.environ["PATH"] = os.environ["JAVA_HOME"] + '/bin' + os.pathsep + os.environ["PATH"] |
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.
Looks like something that should be done in run_maven
In general, overriding The recommended way of achieving this is to make the thing you want to build a An example of this is how HotSpot is build in the jvmci suite: in This doesn't really answer the question of the resulting distributions but i guess we'd need some kind of |
Regarding the distribution, i think we could add a |
Actually, I would be interested in compilation by |
Compilation with |
mx.run_maven(['-DskipTests', '-Dtruffle.version=' + truffle_commit], cwd=rubyDir) | ||
mx.run_maven(['-Pcomplete', '-DskipTests', '-Dtruffle.version=' + truffle_commit], cwd=rubyDir) | ||
# mx.run(['zip', '-d', 'maven/jruby-complete/target/jruby-complete-graal-vm.jar', 'META-INF/jruby.home/lib/*'], cwd=rubyDir) | ||
mx.run(['bin/jruby', 'bin/gem', 'install', 'bundler', '-v', '1.10.6'], cwd=rubyDir) |
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.
Why installing bundler here, on every build?
@jtulach Right, let's begin with delegating to Maven and then maybe progressively adopt |
@@ -23,14 +23,12 @@ | |||
|
|||
"jruby-truffle" : { | |||
"subDir" : "", | |||
"class" : "MavenProject", |
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.
The MavenProject
and MavenBuildTask
approach seems to be working quite well. The next step is to do something with the distribution. @gilles-duboscq, please push me in the right direction.
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.
Ok, for the distribution i'll add support for the class
attribute in mx for distribution and then you can do the same an create something that looks like a JARDistribution
that just copies the jar created by maven. I'll have a quick to see if it would help to make an abstract JARDistribution
that you can extend that has all the "consumption" aspects of JARDistribution
but none of the "creation" aspects.
The goal of this change is to create an |
], | ||
}, | ||
"libraries": { | ||
"RUBY_COMPLETE": { |
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 should be called JRUBY_CORE
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.
I've changed the path to jruby-complete JAR at the end.
The current version seems to work OK for my |
"truffle:TRUFFLE_API", | ||
"truffle:TRUFFLE_DEBUG", | ||
], | ||
}, |
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.
Indentation seems wrong 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.
OK. See next comment...
Looks good 👍, please address my comments. |
LGTM! |
Majority of Graal/Truffle projects is using
mx
build tool. JRuby is an exception. The goal of this pull request is to provide anmx
facade that delegates execution to existingmvn
goals, but behaves like a normalmx
from outside and thus simplifies including of JRuby in othermx
based projects.With the current changes I can run the build and it successfully connects Truffle with JRuby and builds both: