Skip to content

Commit

Permalink
Merge branch 'master' into ruby-2.3+socket
Browse files Browse the repository at this point in the history
headius committed May 9, 2016
2 parents c3323ab + 26e790f commit 4bb3dc9
Showing 1,720 changed files with 47,466 additions and 39,178 deletions.
9 changes: 9 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -14,6 +14,8 @@
*.zip
*~
*.tokens
*.su
*.ll

.DS_Store
.debug.properties
@@ -22,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
@@ -49,6 +54,8 @@ lib/ruby/stdlib/jar*
lib/ruby/stdlib/jline
lib/ruby/stdlib/jopenssl*
lib/ruby/stdlib/krypt*
lib/ruby/stdlib/net-telnet.rb
lib/ruby/stdlib/net/telnet*
lib/ruby/stdlib/openssl*
lib/ruby/stdlib/org/
lib/ruby/stdlib/readline/*readline*.jar
@@ -71,6 +78,7 @@ test/prawn
test/rails
test/testapp/testapp
test/truffle/*.methods
test/truffle/integration/gem-testing
tool/nailgun/Makefile
tool/nailgun/config.log
tool/nailgun/config.status
@@ -79,6 +87,7 @@ reference.txt
rubyspec_temp
.polyglot.pom.rb
tool/truffle/jruby_truffle_runner/jruby+truffle_runner-*.gem
test/truffle/cexts/**/Makefile

# binaries
!bin/gem
2 changes: 1 addition & 1 deletion .mvn/extensions.xml
Original file line number Diff line number Diff line change
@@ -3,6 +3,6 @@
<extension>
<groupId>io.takari.polyglot</groupId>
<artifactId>polyglot-ruby</artifactId>
<version>0.1.11</version>
<version>0.1.15</version>
</extension>
</extensions>
51 changes: 34 additions & 17 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -6,11 +6,14 @@ sudo: false
# directories:
# - $HOME/.m2

before_script:
before_install:
- export MAVEN_SKIP_RC=true
- export MAVEN_OPTS="-Xmx512m -XX:MaxPermSize=512m"
- mvn -Xmx32M -v | grep 1.7.0; if [ $? = 0 ]; then export MAVEN_OPTS="-XX:MaxPermSize=240M"; else export MAVEN_OPTS="-XX:MaxMetaspaceSize=240M -XX:CompressedClassSpaceSize=240M"; fi
- export MAVEN_OPTS="-Xmx512M $MAVEN_OPTS"

before_script:
- unset GEM_PATH GEM_HOME IRBRC JRUBY_OPTS
- "export PATH=`pwd`/bin:$PATH"
- export PATH="`pwd`/bin:$PATH"
- echo $HOME

jdk:
@@ -22,10 +25,9 @@ os:

env:
global:
- JAVA_OPTS="-XX:+TieredCompilation -XX:TieredStopAtLevel=1"
- JAVA_OPTS="-XX:+TieredCompilation -XX:TieredStopAtLevel=1 -Xmn48M -Xmx512M"
- MALLOC_ARENA_MAX=2
matrix:
- JTRCI='lib/ruby/truffle/jruby+truffle/gem_ci/travis.txt'
- PHASE='-Ptest'
- PHASE='-Prake -Dtask=test:jruby'
- PHASE='-Prake -Dtask=test:jruby:fullint'
@@ -44,11 +46,6 @@ env:
- PHASE='-Prake -Dtask=spec:jruby'
- PHASE='-Prake -Dtask=spec:jrubyc'
- PHASE='-Prake -Dtask=spec:profiler'
- JT='test specs :language'
- JT='test specs :core'
- JT='test specs :library'
- JT='test specs :truffle'
- JT='test integration'

matrix:
include:
@@ -74,18 +71,30 @@ matrix:
jdk: oraclejdk8
- env: COMMAND=test/check_versions.sh
jdk: oraclejdk8
#- env: JT=check_ambiguous_arguments
# jdk: oraclejdk8
# JRuby+Truffle needs Java 8
- env: JT='test specs :command_line'
jdk: oraclejdk8
- env: JT='test specs :language'
jdk: oraclejdk8
- env: JT='test specs :core'
jdk: oraclejdk8
- env: JT='test specs :library'
jdk: oraclejdk8
- env: JT='test specs :truffle'
jdk: oraclejdk8
- env: JT='test integration fast'
jdk: oraclejdk8
- env: JT='test integration long' JAVA_OPTS="$JAVA_OPTS -Xmx512m" HAS_REDIS=true
jdk: oraclejdk8
- env: JT=check_ambiguous_arguments SKIP_BUILD=true
jdk: oraclejdk8
allow_failures:
- env: PHASE='-Prake -Dtask=test:mri:fullint'
- env: JT=check_ambiguous_arguments
jdk: oraclejdk8
- env: JT='test mri'
- env: JTRCI='lib/ruby/truffle/jruby+truffle/gem_ci/travis.txt'
- env: PHASE='-Pmain'
jdk: oraclejdk8
- env: PHASE='-Pj2ee'
jdk: oraclejdk7
- env: JT='test integration long' JAVA_OPTS="$JAVA_OPTS -Xmx512m" HAS_REDIS=true
# NOTE: build seems to never start (waited for any to finish for more than a day) - probably a travis-ci bug
#- env: PHASE='-Pmain'
# sudo: required
@@ -103,7 +112,12 @@ branches:
- ruby-2.3

script: tool/travis_runner.sh
install: travis_retry ./mvnw -Pbootstrap clean install -B -Dinvoker.skip -Dmaven.test.skip
install: |
if [[ -n "$PHASE" && $JAVA_HOME == *"java-8"* ]]; then
travis_retry ./mvnw package -B --projects '!truffle' -Dinvoker.skip -Dmaven.test.skip;
else
if [ -z "$SKIP_BUILD" ]; then travis_retry ./mvnw package -B -Dinvoker.skip -Dmaven.test.skip; fi
fi
notifications:
irc:
@@ -122,3 +136,6 @@ notifications:
# we are on a branch
on_success: always
on_failure: never

services:
- redis-server
4 changes: 2 additions & 2 deletions COPYING
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
JRuby is Copyright (c) 2007-2015 The JRuby project, and is released
JRuby is Copyright (c) 2007-2016 The JRuby project, and is released
under a tri EPL/GPL/LGPL license. You can use it, redistribute it
and/or modify it under the terms of the:

@@ -12,7 +12,7 @@ bytelist (http://github.com/jruby/bytelist),
yydebug (http://svn.codehaus.org/jruby/trunk/jay/yydebug)
are released under the same copyright/license.

The Truffle component is copyright (c) 2013-2015 Oracle and/or its
The Truffle component is copyright (c) 2013-2016 Oracle and/or its
affiliates and is released under the same licenses.

Some additional libraries distributed with JRuby are not covered by
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
9.1.0.0-SNAPSHOT
9.1.0.0
53 changes: 53 additions & 0 deletions bin/jruby-cext-c
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
#!/usr/bin/env jruby

# Copyright (c) 2016 Oracle and/or its affiliates. All rights reserved.
# This code is released under a tri EPL/GPL/LGPL license. You can use it,
# redistribute it and/or modify it under the terms of the:
#
# Eclipse Public License version 1.0
# GNU General Public License version 2
# GNU Lesser General Public License version 2.1

# A compiler for JRuby+Truffle C extensions

require 'yaml'

SULONG_DIR = ENV['SULONG_DIR']

unless SULONG_DIR
abort 'You need to set SULONG_DIR to the location of a built checkout of the Sulong repository'
end

def mx(command, *args)
command = "mx -p #{SULONG_DIR} --vm server #{command} #{args.join(' ')}"
puts "$ #{command}"
`#{command}`
end

CEXT_DIR = ARGV[0]

unless CEXT_DIR
abort 'You need to pass the directory of a C extension so I can build it'
end

CONFIG_FILE = File.join(CEXT_DIR, '.jruby-cext-build.yml')

unless File.exist?(CONFIG_FILE)
abort "There is no .jruby-cext-build.yml in this C extension at the moment - I don't know how to build it"
end

CONFIG = YAML.load_file(CONFIG_FILE)

SRC = Dir[File.join(CEXT_DIR, CONFIG['src'])]
OUT = File.join(CEXT_DIR, CONFIG['out'])

LL = []

SRC.each do |src|
ll = File.join(File.dirname(src), File.basename(src, '.*') + '.ll')
mx 'su-clang', "-I#{SULONG_DIR}/include", '-Ilib/ruby/truffle/cext', '-S', '-emit-llvm', src, '-o', ll
mx 'su-opt', '-S', '-mem2reg', ll, '-o', ll
LL.push ll
end

mx 'su-link', '-o', OUT, *LL
6 changes: 1 addition & 5 deletions bin/jruby.bash
Original file line number Diff line number Diff line change
@@ -91,10 +91,6 @@ if [ -z "$JAVACMD" ] ; then
fi
fi

if [ -z "$JAVA_MEM" ] ; then
JAVA_MEM=-Xmx500m
fi

if [ -z "$JAVA_STACK" ] ; then
JAVA_STACK=-Xss2048k
fi
@@ -247,11 +243,11 @@ do
# Pass -X... and -X? search options through
-X*\.\.\.|-X*\?)
ruby_args=("${ruby_args[@]}" "$1") ;;
# Match -Xa.b.c=d to translate to -Da.b.c=d as a java option
-X+T)
JRUBY_CP="$JRUBY_CP$CP_DELIMITER$JRUBY_HOME/lib/jruby-truffle.jar"
ruby_args=("${ruby_args[@]}" "-X+T")
;;
# Match -Xa.b.c=d to translate to -Da.b.c=d as a java option
-X*)
val=${1:2}
if expr "$val" : '.*[.]' > /dev/null; then
2 changes: 1 addition & 1 deletion bin/jruby.sh
Original file line number Diff line number Diff line change
@@ -196,11 +196,11 @@ do
# Pass -X... and -X? search options through
-X*\.\.\.|-X*\?)
ruby_args="${ruby_args} $1" ;;
# Match -Xa.b.c=d to translate to -Da.b.c=d as a java option
-X+T)
JRUBY_CP="$JRUBY_CP$CP_DELIMITER$JRUBY_HOME/lib/jruby-truffle.jar"
ruby_args="${ruby_args} -X+T"
;;
# Match -Xa.b.c=d to translate to -Da.b.c=d as a java option
-X*)
val=${1:2}
if expr "$val" : '.*[.]' > /dev/null; then
5 changes: 2 additions & 3 deletions bin/rake
Original file line number Diff line number Diff line change
@@ -8,7 +8,7 @@

require 'rubygems'

version = ">= 0"
version = ">= 0.a"

if ARGV.first
str = ARGV.first
@@ -19,5 +19,4 @@ if ARGV.first
end
end

gem 'rake', version
load Gem.bin_path('rake', 'rake', version)
load Gem.activate_bin_path('rake', 'rake', version)
5 changes: 2 additions & 3 deletions bin/rdoc
Original file line number Diff line number Diff line change
@@ -8,7 +8,7 @@

require 'rubygems'

version = ">= 0"
version = ">= 0.a"

if ARGV.first
str = ARGV.first
@@ -19,5 +19,4 @@ if ARGV.first
end
end

gem 'rdoc', version
load Gem.bin_path('rdoc', 'rdoc', version)
load Gem.activate_bin_path('rdoc', 'rdoc', version)
5 changes: 2 additions & 3 deletions bin/ri
Original file line number Diff line number Diff line change
@@ -8,7 +8,7 @@

require 'rubygems'

version = ">= 0"
version = ">= 0.a"

if ARGV.first
str = ARGV.first
@@ -19,5 +19,4 @@ if ARGV.first
end
end

gem 'rdoc', version
load Gem.bin_path('rdoc', 'ri', version)
load Gem.activate_bin_path('rdoc', 'ri', version)
38 changes: 38 additions & 0 deletions ci.hocon
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
java7: {name: oraclejdk, version: "8u66", platformspecific: true}

common: {
packages: {
git : ">=1.8.3"
maven : ">=3.3.9"
ruby : ">=2.1.0"
}

downloads: {
JAVA_HOME: ${java7}
}

environment: {
PATH: "$JAVA_HOME/bin:$PATH"
}

setup: [
[ruby, "tool/jt.rb", build]
]

timelimit: "30:00"
}

gate_caps: {
capabilities: [linux, amd64, gate]
}

jt: [ruby, "tool/jt.rb"]

builds = [
{name: "ruby-test-fast"} ${common} ${gate_caps} {run: [${jt} [test, fast]]},
{name: "ruby-test-specs-command-line"} ${common} ${gate_caps} {run: [${jt} [test, specs, ":command_line"]]},
{name: "ruby-test-specs-language"} ${common} ${gate_caps} {run: [${jt} [test, specs, ":language"]]},
{name: "ruby-test-specs-core"} ${common} ${gate_caps} {run: [${jt} [test, specs, ":core"]]},
{name: "ruby-test-specs-library"} ${common} ${gate_caps} {run: [${jt} [test, specs, ":library"]]},
{name: "ruby-test-specs-truffle"} ${common} ${gate_caps} {run: [${jt} [test, specs, ":truffle"]]}
]
18 changes: 15 additions & 3 deletions core/pom.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
version = File.read( File.join( basedir, '..', 'VERSION' ) ).strip
version = ENV['JRUBY_VERSION'] ||
File.read( File.join( basedir, '..', 'VERSION' ) ).strip

project 'JRuby Core' do

model_version '4.0.0'
@@ -11,7 +13,7 @@
'tzdata.version' => '2013d',
'tzdata.scope' => 'provided',

'unsafe.version' => '8.0',
'unsafe.version' => '8.92.1',
'unsafe.jar' => '${settings.localRepository}/com/headius/unsafe-mock/${unsafe.version}/unsafe-mock-${unsafe.version}.jar',

'maven.build.timestamp.format' => 'yyyy-MM-dd',
@@ -46,7 +48,7 @@
jar 'com.github.jnr:jnr-x86asm:1.0.2', :exclusions => ['com.github.jnr:jnr-ffi']
jar 'com.github.jnr:jnr-unixsocket:0.12', :exclusions => ['com.github.jnr:jnr-ffi']
jar 'com.github.jnr:jnr-posix:3.0.29', :exclusions => ['com.github.jnr:jnr-ffi']
jar 'com.github.jnr:jnr-constants:0.9.1', :exclusions => ['com.github.jnr:jnr-ffi']
jar 'com.github.jnr:jnr-constants:0.9.2', :exclusions => ['com.github.jnr:jnr-ffi']
jar 'com.github.jnr:jnr-ffi:2.0.9'
jar 'com.github.jnr:jffi:${jffi.version}'
jar 'com.github.jnr:jffi:${jffi.version}:native'
@@ -73,6 +75,10 @@
jar 'org.jruby:joda-timezones:${tzdata.version}', :scope => '${tzdata.scope}'
jar 'joda-time:joda-time:${joda.time.version}'

# SLF4J only used within SLF4JLogger (JRuby logger impl) class
jar 'org.slf4j:slf4j-api:1.7.12', :scope => 'provided', :optional => true
jar 'org.slf4j:slf4j-simple:1.7.12', :scope => 'test'

plugin_management do
plugin( 'org.eclipse.m2e:lifecycle-mapping:1.0.0',
'lifecycleMappingMetadata' => {
@@ -245,6 +251,12 @@
target_path '${project.build.sourceDirectory}'
filtering 'true'
end

resource do
directory '${project.basedir}/..'
includes [ 'BSDL', 'COPYING', 'LEGAL', 'LICENSE.RUBY' ]
target_path '${project.build.outputDirectory}/META-INF/'
end
end


Loading

0 comments on commit 4bb3dc9

Please sign in to comment.