Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: jruby/jruby
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: e4c30551c72e
Choose a base ref
...
head repository: jruby/jruby
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 9827b5ad2d22
Choose a head ref

Commits on Apr 20, 2016

  1. Copy the full SHA
    1b85d93 View commit details

Commits on Apr 21, 2016

  1. Copy the full SHA
    8fd4bba View commit details
  2. Copy the full SHA
    f9d3ad3 View commit details

Commits on Apr 24, 2016

  1. Copy the full SHA
    3e5ecb3 View commit details

Commits on Apr 25, 2016

  1. Copy the full SHA
    ae1c2a3 View commit details
  2. Copy the full SHA
    d477355 View commit details
  3. Copy the full SHA
    5630261 View commit details
  4. Copy the full SHA
    3ce447f View commit details
  5. [Truffle] JS PE test.

    chrisseaton committed Apr 25, 2016
    Copy the full SHA
    783cda8 View commit details
  6. Copy the full SHA
    b0221ff View commit details
  7. Copy the full SHA
    5b907d1 View commit details
  8. Copy the full SHA
    33b10b3 View commit details
  9. Copy the full SHA
    87f1066 View commit details
  10. Copy the full SHA
    53109c5 View commit details

Commits on Apr 26, 2016

  1. Merge branch 'master' into truffle-head

    # Conflicts:
    #	truffle/pom.rb
    #	truffle/pom.xml
    chrisseaton committed Apr 26, 2016
    Copy the full SHA
    81f5776 View commit details
  2. Copy the full SHA
    131f64c View commit details

Commits on Apr 28, 2016

  1. Copy the full SHA
    6bb303c View commit details

Commits on May 2, 2016

  1. Copy the full SHA
    9a73369 View commit details

Commits on May 3, 2016

  1. Copy the full SHA
    011ee04 View commit details

Commits on May 5, 2016

  1. Copy the full SHA
    7424d6c View commit details
  2. Copy the full SHA
    4ac3165 View commit details
  3. Merge pull request #3813 from jtulach/mx

    [Truffle] mx clean and mx build work for JRuby
    eregon committed May 5, 2016
    Copy the full SHA
    4f5fa8e View commit details
  4. The Maven wrapper doesn't need any annotation processors

    Jaroslav Tulach authored and eregon committed May 5, 2016
    Copy the full SHA
    9181a92 View commit details
  5. Copy the full SHA
    c360308 View commit details

Commits on May 6, 2016

  1. Copy the full SHA
    52c2300 View commit details
  2. Copy the full SHA
    1e692f0 View commit details
  3. Copy the full SHA
    97c42cf View commit details
  4. Copy the full SHA
    9827b5a View commit details
Showing with 215 additions and 0 deletions.
  1. +3 −0 .gitignore
  2. +111 −0 mx.jruby/mx_jruby.py
  3. +101 −0 mx.jruby/suite.py
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -24,6 +24,9 @@
build
build.properties
build_graph.png
mx*/*pyc
mx*/env
mxbuild
core/src/main/java/org/jruby/runtime/Constants.java
dependency-reduced-pom.xml
dev_null
111 changes: 111 additions & 0 deletions mx.jruby/mx_jruby.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,111 @@
import mx
import os
from os.path import join, exists
import subprocess
import shutil

_suite = mx.suite('jruby')

class MavenProject(mx.Project):
def __init__(self, suite, name, deps, workingSets, theLicense, **args):
mx.Project.__init__(self, suite, name, "", [], deps, workingSets, _suite.dir, theLicense)
self.javaCompliance = "1.7"
self.build = hasattr(args, 'build')
self.prefix = args['prefix']

def source_dirs(self):
return []

def output_dir(self):
dir = os.path.join(_suite.dir, self.prefix)
return dir.rstrip('/')

def source_gen_dir(self):
return None

def getOutput(self, replaceVar=False):
return os.path.join(_suite.dir, "target")

def getResults(self, replaceVar=False):
return mx.Project.getResults(self, replaceVar=replaceVar)

def getBuildTask(self, args):
return MavenBuildTask(self, args, None, None)

def isJavaProject(self):
return True

def archive_prefix(self):
return self.prefix

def annotation_processors(self):
return []


class MavenBuildTask(mx.BuildTask):
def __init__(self, project, args, vmbuild, vm):
mx.BuildTask.__init__(self, project, args, 1)
self.vm = vm
self.vmbuild = vmbuild

def __str__(self):
return 'Building Maven for {}'.format(self.subject)

def needsBuild(self, newestInput):
return (True, 'Let us re-build everytime')

def newestOutput(self):
return None

def build(self):
if not self.subject.build:
mx.log("...skip build of {}".format(self.subject))
return
mx.log('...perform build of {}'.format(self.subject))

rubyDir = _suite.dir

# HACK: since the maven executable plugin does not configure the
# 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"]

mx.logv('Setting PATH to {}'.format(os.environ["PATH"]))
mx.logv('Calling java -version')
mx.run(['java', '-version'])

# Truffle version

truffle = mx.suite('truffle')
truffle_commit = truffle.vc.parent(truffle.dir)

mx.run_mx(['maven-install'], suite=truffle)

open(join(rubyDir, 'VERSION'), 'w').write('graal-vm\n')

# Build jruby-truffle and

mx.run(['find', '.'], nonZeroIsFatal=False, cwd=rubyDir)
mx.run_maven(['--version'], nonZeroIsFatal=False, cwd=rubyDir)

mx.log('Building without tests')

mx.run_maven(['-DskipTests', '-X', '-Dtruffle.version=' + truffle_commit], cwd=rubyDir)

mx.log('Building complete version')

mx.run_maven(['-Pcomplete', '-X', '-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)
# shutil.rmtree(os.path.join(_suite.dir, "lib", "target"), True)
# shutil.rmtree(os.path.join(_suite.dir, 'lib', 'lib', 'jni'), True)
# shutil.copytree(os.path.join(_suite.dir, 'lib', 'jni'), os.path.join(_suite.dir, 'lib', 'lib', 'jni'))
# shutil.rmtree(os.path.join(_suite.dir, 'lib', 'jni'), True)

def clean(self, forBuild=False):
if forBuild:
return
rubyDir = _suite.dir
mx.run_maven(['clean'], nonZeroIsFatal=False, cwd=rubyDir)

101 changes: 101 additions & 0 deletions mx.jruby/suite.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,101 @@
suite = {
"mxversion": "5.6.6",
"name": "jrubytruffle",
"defaultLicense": "EPL",

"imports": {
"suites": [
{
"name": "truffle",
"version": "9c16d110f3aa63a17e3e2cf1b857e039c507078a",
"urls": [
{"url": "https://github.com/graalvm/truffle.git",
"kind": "git"},
{"url": "https://curio.ssw.jku.at/nexus/content/repositories/snapshots", "kind": "binary"},
]
},
],
},
"libraries": {
"RUBY_COMPLETE": {
"path": "maven/jruby-complete/target/jruby-complete-graal-vm.jar",
"sha1": "NOCHECK",
"optional":"true",
"license": "EPL"
},
"RUBY_TRUFFLE": {
"path": "lib/jruby-truffle.jar",
"sha1": "NOCHECK",
"optional":"true",
"license": "EPL"
},
},
"projects": {

# ------------- Projects -------------

"jruby-ruby": {
"subDir": "lib/ruby",
"class": "MavenProject",
"build": "true",
"prefix": "lib/ruby/",
"dependencies": [
"truffle:TRUFFLE_API",
"truffle:TRUFFLE_DEBUG",
],
},
"jruby-lib-jni": {
"subDir": "lib/jni",
"class": "MavenProject",
"prefix": "lib/jni/",
"dependencies": [
"truffle:TRUFFLE_API",
"truffle:TRUFFLE_DEBUG",
],
},
},
"licenses": {
"EPL": {
"name": "EPL",
"url": "https://opensource.org/licenses/EPL-1.0",
},
},
"distributions": {

# ------------- Distributions -------------

"RUBY": {
"mainClass": "org.jruby.Main",
"dependencies": [
"RUBY_COMPLETE",
"RUBY_TRUFFLE"
],
"exclude": [
"truffle:JLINE",
],
"distDependencies": [
"RUBY-ZIP",
"truffle:TRUFFLE_API",
"truffle:TRUFFLE_DEBUG",
],
"description": "JRuby+Truffle",
"license": "EPL"
},
"RUBY-ZIP": {
"dependencies": [
"jruby-ruby",
"jruby-lib-jni",
],
"exclude": [
"truffle:JLINE",
],
"distDependencies": [
"truffle:TRUFFLE_API",
"truffle:TRUFFLE_DEBUG",
],
"description": "JRuby+Truffle Native Libs",
"license": "EPL"
},

},
}