[Truffle] mx clean and mx build work for JRuby#3813
[Truffle] mx clean and mx build work for JRuby#3813eregon merged 1 commit intojruby:truffle-headfrom jtulach:mx
Conversation
mx.jruby/mx_jruby.py
Outdated
| # 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.
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.jruby/mx_jruby.py
Outdated
| 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.
Why installing bundler here, on every build?
|
@jtulach Right, let's begin with delegating to Maven and then maybe progressively adopt |
mx.jruby/suite.py
Outdated
|
|
||
| "jruby-truffle" : { | ||
| "subDir" : "", | ||
| "class" : "MavenProject", |
There was a problem hiding this comment.
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.
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 |
mx.jruby/suite.py
Outdated
| ], | ||
| }, | ||
| "libraries": { | ||
| "RUBY_COMPLETE": { |
There was a problem hiding this comment.
This should be called JRUBY_CORE
There was a problem hiding this comment.
I've changed the path to jruby-complete JAR at the end.
|
The current version seems to work OK for my |
mx.jruby/suite.py
Outdated
| "truffle:TRUFFLE_API", | ||
| "truffle:TRUFFLE_DEBUG", | ||
| ], | ||
| }, |
There was a problem hiding this comment.
OK. See next comment...
|
Looks good 👍, please address my comments. |
|
LGTM! |
Majority of Graal/Truffle projects is using
mxbuild tool. JRuby is an exception. The goal of this pull request is to provide anmxfacade that delegates execution to existingmvngoals, but behaves like a normalmxfrom outside and thus simplifies including of JRuby in othermxbased projects.With the current changes I can run the build and it successfully connects Truffle with JRuby and builds both: