diff --git a/.github/PULL_REQUEST_TEMPLATE/pull_request_template.md b/.github/PULL_REQUEST_TEMPLATE/pull_request_template.md index 6cc4b78c167..5566c082cb6 100644 --- a/.github/PULL_REQUEST_TEMPLATE/pull_request_template.md +++ b/.github/PULL_REQUEST_TEMPLATE/pull_request_template.md @@ -4,13 +4,11 @@ Thank you for submitting a pull request to the JRuby project! Your help means a Please make sure you are targeting the correct branch: -* Most bug fixes should target `jruby-9.4` as that is our current maintenance release JRuby 9.4. -* Ruby 3.2, 3.3, or 3.4 compatibility fixes should target `master`, which is the branch for JRuby 10. Most performance fixes should also go to `master`. -* We will accept fixes for JRuby 9.3 (branch `jruby-9.3`) but that version is EOL and may not get new releases. +* Most **bug fixes** should target the `jruby-10.0` branch as that is our current maintenance release JRuby 10.0.x. +* Ruby 4.0 **compatibility fixes** should target `master`, which is the branch for JRuby 10.1.x. Most **performance fixes** should also go to `master`. +* We will accept fixes for JRuby 9.4 (branch `jruby-9.4`) but that version is EOL and may not get new releases. -All branches are merged forward to the next major release (e.g. 9.4 is merged to master/10) as needed for releases. - -If you have questions, please just submit as best you can and we will assist. +All branches are merged forward to the next major release (e.g. jruby-10.0 is merged to master/10.1) as needed for releases. We also request that current users of JRuby add themselves to our user list by submitting a pull request to the following file: @@ -20,6 +18,8 @@ list by submitting a pull request to the following file: This helps the JRuby community grow and share best practices and new ideas for how to apply JRuby to JVM and Ruby apps around the world. +If you have questions, please just submit as best you can and we will assist. + Replace this text with your pull request details. --> diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b95c83ee3ff..ed2abbeb271 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -16,29 +16,56 @@ jobs: strategy: matrix: target: ['test:jruby:int', 'spec:ruby:fast', 'spec:ji', 'spec:ffi', 'test:mri:core:jit', 'test:mri:extra', 'spec:ruby:fast:jit', 'test:mri:stdlib', 'spec:ruby:slow', 'spec:ruby:debug', 'test:jruby:aot', 'test:slow_suites', 'spec:compiler', 'spec:regression', 'spec:jrubyc', 'spec:profiler'] - java-version: ['21', '25'] + java-version: ['21', '25', '26'] fail-fast: false name: rake ${{ matrix.target }} (Java ${{ matrix.java-version }}) steps: - name: checkout - uses: actions/checkout@v3 + uses: actions/checkout@v6 - name: remove default java except 21 run: sudo apt remove temurin-8-jdk temurin-11-jdk temurin-17-jdk - name: set up java ${{ matrix.java-version }} - uses: actions/setup-java@v3 + uses: actions/setup-java@v5 with: distribution: 'zulu' java-version: ${{ matrix.java-version }} cache: 'maven' - name: bootstrap - run: mvn -ntp -Pbootstrap clean package + run: ./mvnw -ntp -Pbootstrap clean package - name: bundle install run: bin/jruby --dev -S bundle install - name: rake ${{ matrix.target }} run: bin/jruby -S rake ${{ matrix.target }} + # This job is a fast-fail all-interp run of test:mri:code to give early indication if the jitted runs will pass. + rake-test-mri-fast: + name: rake test:mri:core:int (Java 26, fast fail) + + runs-on: ubuntu-latest + + env: + JRUBY_OPTS: '--dev' + + steps: + - name: checkout + uses: actions/checkout@v6 + - name: remove old java installs + run: sudo apt remove temurin-8-jdk temurin-11-jdk temurin-17-jdk + - name: set up java 26 + uses: actions/setup-java@v5 + with: + distribution: 'zulu' + java-version: 26 + cache: 'maven' + - name: bootstrap + run: ./mvnw -ntp -Pbootstrap clean package + - name: bundle install + run: bin/jruby --dev -S bundle install + - name: rake test:mri:core:int + run: bin/jruby -S rake test:mri:core:int + rake-test-multiplatform: runs-on: ${{ matrix.platform }} @@ -46,22 +73,22 @@ jobs: matrix: target: ['spec:jruby'] platform: ['ubuntu-latest', 'macos-latest'] - java-version: ['21', '25'] + java-version: ['21', '25', '26'] fail-fast: false name: rake ${{ matrix.target }} (Java ${{ matrix.java-version }}) steps: - name: checkout - uses: actions/checkout@v3 + uses: actions/checkout@v6 - name: set up java ${{ matrix.java-version }} - uses: actions/setup-java@v3 + uses: actions/setup-java@v5 with: distribution: 'zulu' java-version: ${{ matrix.java-version }} cache: 'maven' - name: bootstrap - run: mvn -ntp -Pbootstrap clean package + run: ./mvnw -ntp -Pbootstrap clean package - name: bundle install run: bin/jruby --dev -S bundle install - name: rake ${{ matrix.target }} @@ -70,24 +97,21 @@ jobs: repeat-specs: runs-on: ubuntu-latest - strategy: - fail-fast: false - name: run specs repeatedly to test optimizations steps: - name: checkout - uses: actions/checkout@v3 + uses: actions/checkout@v6 - name: remove default java except 21 run: sudo apt remove temurin-8-jdk temurin-11-jdk temurin-17-jdk - name: set up java 21 - uses: actions/setup-java@v3 + uses: actions/setup-java@v5 with: distribution: 'zulu' java-version: 21 cache: 'maven' - name: bootstrap - run: mvn -ntp -Pbootstrap clean package + run: ./mvnw -ntp -Pbootstrap clean package - name: bundle install run: bin/jruby --dev -S bundle install - name: run specs @@ -98,25 +122,22 @@ jobs: jruby-tests-dev: runs-on: ubuntu-latest - strategy: - fail-fast: false - env: JRUBY_OPTS: '--dev' steps: - name: checkout - uses: actions/checkout@v3 + uses: actions/checkout@v6 - name: remove default java except 21 run: sudo apt remove temurin-8-jdk temurin-11-jdk temurin-17-jdk - name: set up java 21 - uses: actions/setup-java@v3 + uses: actions/setup-java@v5 with: distribution: 'temurin' java-version: 21 cache: 'maven' - name: bootstrap - run: mvn -ntp -Pbootstrap clean package + run: ./mvnw -ntp -Pbootstrap clean package - name: bundle install run: bin/jruby --dev -S bundle install - name: rake test:jruby @@ -128,7 +149,7 @@ jobs: strategy: matrix: target: ['test:mri:core:jit', 'test:jruby:jit', 'spec:compiler', 'spec:ruby:fast:jit', 'spec:ji'] - java-version: ['21', '25'] + java-version: ['21', '25', '26'] fail-fast: false name: rake ${{ matrix.target }} (Java ${{ matrix.java-version }} -indy) @@ -138,17 +159,17 @@ jobs: steps: - name: checkout - uses: actions/checkout@v3 + uses: actions/checkout@v6 - name: remove default java except 21 run: sudo apt remove temurin-8-jdk temurin-11-jdk temurin-17-jdk - name: set up java ${{ matrix.java-version }} - uses: actions/setup-java@v3 + uses: actions/setup-java@v5 with: distribution: 'zulu' java-version: ${{ matrix.java-version }} cache: 'maven' - name: bootstrap - run: mvn -ntp -Pbootstrap clean package + run: ./mvnw -ntp -Pbootstrap clean package - name: bundle install run: bin/jruby --dev -S bundle install - name: rake ${{ matrix.target }} @@ -167,17 +188,17 @@ jobs: steps: - name: checkout - uses: actions/checkout@v3 + uses: actions/checkout@v6 - name: remove default java except 21 run: sudo apt remove temurin-8-jdk temurin-11-jdk temurin-17-jdk - name: set up java ${{ matrix.java-version }} - uses: actions/setup-java@v3 + uses: actions/setup-java@v5 with: distribution: 'zulu' java-version: ${{ matrix.java-version }} cache: 'maven' - name: bootstrap - run: mvn -ntp -Pbootstrap clean package + run: ./mvnw -ntp -Pbootstrap clean package - name: bundle install run: bin/jruby --dev -S bundle install - name: mvn package ${{ matrix.package-flags }} @@ -199,17 +220,17 @@ jobs: steps: - name: checkout - uses: actions/checkout@v3 + uses: actions/checkout@v6 - name: remove default java except 21 run: sudo apt remove temurin-8-jdk temurin-11-jdk temurin-17-jdk - name: set up java ${{ matrix.java-version }} - uses: actions/setup-java@v3 + uses: actions/setup-java@v5 with: distribution: temurin java-version: ${{ matrix.java-version }} cache: 'maven' - name: bootstrap - run: mvn -ntp -Pbootstrap clean package + run: ./mvnw -ntp -Pbootstrap clean package - name: bundle install run: bin/jruby --dev -S bundle install - name: mvn package ${{ matrix.package-flags }} @@ -220,25 +241,22 @@ jobs: regression-specs-jit: runs-on: ubuntu-latest - strategy: - fail-fast: false - env: JRUBY_OPTS: '-Xjit.threshold=0' steps: - name: checkout - uses: actions/checkout@v3 + uses: actions/checkout@v6 - name: remove default java except 21 run: sudo apt remove temurin-8-jdk temurin-11-jdk temurin-17-jdk - name: set up java 21 - uses: actions/setup-java@v3 + uses: actions/setup-java@v5 with: distribution: 'zulu' java-version: 21 cache: 'maven' - name: bootstrap - run: mvn -ntp -Pbootstrap clean package + run: ./mvnw -ntp -Pbootstrap clean package - name: bundle install run: bin/jruby --dev -S bundle install - name: rake spec:regression @@ -247,9 +265,6 @@ jobs: mvn-test-windows: runs-on: windows-latest - strategy: - fail-fast: false - name: mvn -Ptest, rake test:jruby (Windows, Java 21) env: @@ -258,15 +273,15 @@ jobs: steps: - name: checkout - uses: actions/checkout@v3 + uses: actions/checkout@v6 - name: set up java 21 - uses: actions/setup-java@v3 + uses: actions/setup-java@v5 with: distribution: 'zulu' java-version: 21 cache: 'maven' - name: bootstrap - run: mvn -ntp -Pbootstrap clean package + run: ./mvnw -ntp -Pbootstrap clean package - name: bundle install run: bin/jruby --dev -S bundle install - name: rake test:jruby @@ -274,13 +289,38 @@ jobs: env: JRUBY_OPTS: '' - name: mvn -P test - run: ./mvnw package -B -Ptest + run: ./mvnw -ntp package -Ptest - spec-ruby-language-windows: + spec-ruby-prism-wasm: runs-on: windows-latest strategy: fail-fast: false + matrix: + rubyspec-target: ['language', 'core'] + + name: ${{ matrix.rubyspec-target }} specs (WASM Prism parser, Java 21) + + steps: + - name: checkout + uses: actions/checkout@v3 + - name: set up java 21 + uses: actions/setup-java@v3 + with: + distribution: 'zulu' + java-version: 21 + cache: 'maven' + - name: bootstrap + run: mvn -ntp -Pbootstrap clean package + - name: bundle install + run: bin/jruby --dev -S bundle install + - name: ${{ matrix.rubyspec-target }} specs + run: bin/jruby spec/mspec/bin/mspec ci :${{ matrix.rubyspec-target }} + env: + JRUBY_OPTS: -Xparser.prism -Xparser.prism.wasm + + spec-ruby-language-windows: + runs-on: windows-latest name: language specs (Windows, Java 21) @@ -290,15 +330,15 @@ jobs: steps: - name: checkout - uses: actions/checkout@v3 + uses: actions/checkout@v6 - name: set up java 21 - uses: actions/setup-java@v3 + uses: actions/setup-java@v5 with: distribution: 'zulu' java-version: 21 cache: 'maven' - name: bootstrap - run: mvn -ntp -Pbootstrap clean package + run: ./mvnw -ntp -Pbootstrap clean package - name: bundle install run: bin/jruby --dev -S bundle install - name: language specs interpreted @@ -311,9 +351,6 @@ jobs: spec-ruby-core-windows: runs-on: windows-latest - strategy: - fail-fast: false - name: core specs (Windows, Java 21) env: @@ -322,15 +359,15 @@ jobs: steps: - name: checkout - uses: actions/checkout@v3 + uses: actions/checkout@v6 - name: set up java 21 - uses: actions/setup-java@v3 + uses: actions/setup-java@v5 with: distribution: 'zulu' java-version: 21 cache: 'maven' - name: bootstrap - run: mvn -ntp -Pbootstrap clean package + run: ./mvnw -ntp -Pbootstrap clean package - name: bundle install run: bin/jruby --dev -S bundle install - name: core specs interpreted @@ -340,6 +377,72 @@ jobs: env: JRUBY_OPTS: -Xjit.threshold=0 + spec-ruby-freebsd: + runs-on: ubuntu-latest + + strategy: + fail-fast: false + matrix: + rubyspec-target: ['language', 'core'] + + name: ${{ matrix.rubyspec-target }} specs (FreeBSD, Java 21) + + steps: + - name: checkout + uses: actions/checkout@v3 + - name: set up java 21 + uses: actions/setup-java@v5 + with: + distribution: 'zulu' + java-version: 21 + cache: 'maven' + - name: pre-build JRuby + run: | + ./mvnw -ntp -Pbootstrap clean package + bin/jruby --dev -S bundle install + - name: run in FreeBSD + uses: vmactions/freebsd-vm@v1 + with: + prepare: | + pkg install -y openjdk21 + run: | + export JAVA_HOME="/usr/local/openjdk21" + export TZ="America/Chicago" + bin/jruby spec/mspec/bin/mspec ci :${{ matrix.rubyspec-target }} + + spec-ruby-openbsd: + runs-on: ubuntu-latest + + strategy: + fail-fast: false + matrix: + rubyspec-target: ['language', 'core'] + + name: ${{ matrix.rubyspec-target }} specs (OpenBSD, Java 21) + + steps: + - name: checkout + uses: actions/checkout@v3 + - name: set up java 21 + uses: actions/setup-java@v5 + with: + distribution: 'zulu' + java-version: 21 + cache: 'maven' + - name: pre-build JRuby + run: | + ./mvnw -ntp -Pbootstrap clean package + bin/jruby --dev -S bundle install + - name: run in OpenBSD + uses: vmactions/openbsd-vm@v1 + with: + prepare: | + pkg_add jdk--%21 + run: | + export JAVA_HOME="/usr/local/jdk-21" + export TZ="America/Chicago" + bin/jruby spec/mspec/bin/mspec ci :${{ matrix.rubyspec-target }} + dependency-check: runs-on: ubuntu-latest @@ -347,11 +450,11 @@ jobs: steps: - name: checkout - uses: actions/checkout@v3 + uses: actions/checkout@v6 - name: remove default java except 21 run: sudo apt remove temurin-8-jdk temurin-11-jdk temurin-17-jdk - name: set up java 21 - uses: actions/setup-java@v3 + uses: actions/setup-java@v5 with: distribution: 'zulu' java-version: '21' @@ -364,17 +467,14 @@ jobs: test-versions: runs-on: ubuntu-latest - strategy: - fail-fast: false - name: Verify build artifacts steps: - name: checkout - uses: actions/checkout@v3 + uses: actions/checkout@v6 - name: remove default java except 21 run: sudo apt remove temurin-8-jdk temurin-11-jdk temurin-17-jdk - name: set up java 21 - uses: actions/setup-java@v3 + uses: actions/setup-java@v5 with: distribution: 'zulu' java-version: 21 @@ -387,9 +487,6 @@ jobs: sequel: runs-on: ubuntu-latest - strategy: - fail-fast: false - services: postgres: image: postgres:latest @@ -414,17 +511,17 @@ jobs: steps: - name: checkout - uses: actions/checkout@v3 + uses: actions/checkout@v6 - name: remove default java except 21 run: sudo apt remove temurin-8-jdk temurin-11-jdk temurin-17-jdk - name: set up java 21 - uses: actions/setup-java@v3 + uses: actions/setup-java@v5 with: distribution: 'temurin' java-version: 21 cache: 'maven' - name: bootstrap - run: mvn -ntp -Pbootstrap clean package + run: ./mvnw -ntp -Pbootstrap clean package - name: bundle install run: bin/jruby --dev -S bundle install - name: sequel @@ -433,22 +530,19 @@ jobs: concurrent-ruby: runs-on: ubuntu-latest - strategy: - fail-fast: false - steps: - name: checkout - uses: actions/checkout@v3 + uses: actions/checkout@v6 - name: remove default java except 21 run: sudo apt remove temurin-8-jdk temurin-11-jdk temurin-17-jdk - name: set up java 21 - uses: actions/setup-java@v3 + uses: actions/setup-java@v5 with: distribution: 'temurin' java-version: 21 cache: 'maven' - name: bootstrap - run: mvn -ntp -Pbootstrap clean package + run: ./mvnw -ntp -Pbootstrap clean package - name: bundle install run: bin/jruby --dev -S bundle install - name: concurrent-ruby @@ -468,9 +562,9 @@ jobs: # # steps: # - name: checkout -# uses: actions/checkout@v3 +# uses: actions/checkout@v6 # - name: set up java ${{ matrix.java-version }} -# uses: actions/setup-java@v3 +# uses: actions/setup-java@v5 # with: # distribution: 'zulu' # java-version: ${{ matrix.java-version }} @@ -499,7 +593,7 @@ jobs: # with: # java-version: 21 # - name: set up java ${{ matrix.java-version }} -# uses: actions/setup-java@v3 +# uses: actions/setup-java@v5 # with: # distribution: 'zulu' # java-version: ${{ matrix.java-version }} @@ -516,17 +610,17 @@ jobs: steps: - name: checkout - uses: actions/checkout@v3 + uses: actions/checkout@v6 - name: remove default java except 21 run: sudo apt remove temurin-8-jdk temurin-11-jdk temurin-17-jdk - name: set up java ${{ matrix.java-version }} - uses: actions/setup-java@v3 + uses: actions/setup-java@v5 with: distribution: 'semeru' java-version: '21' cache: 'maven' - name: bootstrap - run: mvn -ntp -Pbootstrap clean package + run: ./mvnw -ntp -Pbootstrap clean package - name: bundle install run: bin/jruby -S bundle install - name: test profile @@ -541,7 +635,7 @@ jobs: steps: - name: checkout - uses: actions/checkout@v3 + uses: actions/checkout@v6 - name: install shellcheck run: sudo apt install shellcheck - name: run shellcheck @@ -552,7 +646,7 @@ jobs: contents: read if: ${{ github.ref == 'refs/heads/master' && github.repository == 'jruby/jruby' }} needs: [mvn-test, mvn-test-extended, mvn-test-windows, dependency-check, rake-test, rake-test-indy-off, rake-test, test-versions, sequel, concurrent-ruby, jruby-tests-dev, regression-specs-jit] - uses: jruby/jruby/.github/workflows/snapshot-publish.yml@46678ce513443c231ce91c7782ad72b886aed5b4 + uses: ./.github/workflows/snapshot-publish.yml with: javaLevel: 21 secrets: diff --git a/.github/workflows/dist-verification-ci.yml b/.github/workflows/dist-verification-ci.yml new file mode 100644 index 00000000000..23a5394b6b4 --- /dev/null +++ b/.github/workflows/dist-verification-ci.yml @@ -0,0 +1,189 @@ +name: Dist Verification CI + +on: [push, pull_request] + +env: + JAVA_OPTS: '-XX:+TieredCompilation -XX:TieredStopAtLevel=1 -Xms60M -Xmx1G -XX:InitialCodeCacheSize=40M -XX:ReservedCodeCacheSize=120M' + +permissions: + contents: read + +jobs: + build-dist: + + strategy: + matrix: + java-version: ['21'] + fail-fast: false + + runs-on: ubuntu-latest + + name: Build JRuby release artifacts + + steps: + - name: checkout + uses: actions/checkout@v6 + - name: set up java 21 + uses: actions/setup-java@v5 + with: + distribution: 'zulu' + java-version: 21 + cache: 'maven' + - name: build dist archive + run: | + ./mvnw -ntp clean package -Pall + mv maven/jruby-dist/target/jruby-dist*-bin.tar.gz jruby-dist-bin.tar.gz + mv maven/jruby-dist/target/jruby-dist*-src.tar.gz jruby-dist-src.tar.gz + mv maven/jruby-complete/target/jruby-complete*.jar jruby-complete.jar + - name: cache dist bin + uses: actions/upload-artifact@v7 + with: + path: jruby-dist-bin.tar.gz + retention-days: 1 + archive: false + - name: cache dist src + uses: actions/upload-artifact@v7 + with: + path: jruby-dist-src.tar.gz + retention-days: 1 + archive: false + - name: cache jruby-complete + uses: actions/upload-artifact@v7 + with: + path: jruby-complete.jar + retention-days: 1 + archive: false + + rails-verification: + + needs: build-dist + + strategy: + matrix: + java-version: ['21', '25'] + runs-on: [windows-latest, macos-latest, ubuntu-latest] + fail-fast: false + + runs-on: ${{ matrix.runs-on }} + + name: rails verification on ${{ matrix.runs-on }} (Java ${{ matrix.java-version }}) + + steps: + - name: checkout + uses: actions/checkout@v6 + with: + path: jruby-src + - name: set up java ${{ matrix.java-version }} + uses: actions/setup-java@v5 + with: + distribution: 'zulu' + java-version: ${{ matrix.java-version }} + - name: download cached dist bin + uses: actions/download-artifact@v8 + with: + name: jruby-dist-bin.tar.gz + - name: unpack dist + run: tar xzf jruby-dist-bin.tar.gz --strip-components=1 + - name: dist verification (Windows) + if: matrix.runs-on == 'windows-latest' + run: echo "${{ github.workspace }}\bin" | Out-File -Append -FilePath $env:GITHUB_PATH -Encoding utf8 + - name: set up dist path (Unix) + if: matrix.runs-on != 'windows-latest' + run: echo "$(pwd)/bin" >> $GITHUB_PATH + - name: rails verification + run: jruby jruby-src/tool/rails_runner + + src-verification: + + needs: build-dist + + strategy: + matrix: + java-version: ['21', '25'] + runs-on: [windows-latest, macos-latest, ubuntu-latest] + fail-fast: false + + runs-on: ${{ matrix.runs-on }} + + name: src verification on ${{ matrix.runs-on }} (Java ${{ matrix.java-version }}) + + steps: + - name: set up java ${{ matrix.java-version }} + uses: actions/setup-java@v5 + with: + distribution: 'zulu' + java-version: ${{ matrix.java-version }} + - name: download cached dist src + uses: actions/download-artifact@v8 + with: + name: jruby-dist-src.tar.gz + - name: test compilation of dist src + run: | + mkdir jruby-dist-src + cd jruby-dist-src + tar xzf ../jruby-dist-src.tar.gz --strip-components=1 + ./mvnw -ntp clean install -Pdist + cd .. + + jruby-complete-verification: + + needs: build-dist + + strategy: + matrix: + java-version: ['21', '25'] + runs-on: [windows-latest, macos-latest, ubuntu-latest] + fail-fast: false + + runs-on: ${{ matrix.runs-on }} + + name: jruby-complete verification on ${{ matrix.runs-on }} (Java ${{ matrix.java-version }}) + + steps: + - name: set up java ${{ matrix.java-version }} + uses: actions/setup-java@v5 + with: + distribution: 'zulu' + java-version: ${{ matrix.java-version }} + - name: download cached jruby-complete + uses: actions/download-artifact@v8 + with: + name: jruby-complete.jar + - name: confirm rubygems works with jruby-complete + run: java -jar jruby-complete.jar -S gem list + + misc-verification: + + needs: build-dist + + strategy: + matrix: + java-version: ['21', '25'] + runs-on: [windows-latest, macos-latest, ubuntu-latest] + fail-fast: false + + runs-on: ${{ matrix.runs-on }} + + name: misc verification on ${{ matrix.runs-on }} (Java ${{ matrix.java-version }}) + + steps: + - name: set up java ${{ matrix.java-version }} + uses: actions/setup-java@v5 + with: + distribution: 'zulu' + java-version: ${{ matrix.java-version }} + - name: download cached dist bin + uses: actions/download-artifact@v8 + with: + name: jruby-dist-bin.tar.gz + - name: unpack dist + run: tar xzf jruby-dist-bin.tar.gz --strip-components=1 + - name: dist verification (Windows) + if: matrix.runs-on == 'windows-latest' + run: echo "${{ github.workspace }}\bin" | Out-File -Append -FilePath $env:GITHUB_PATH -Encoding utf8 + - name: set up dist path (Unix) + if: matrix.runs-on != 'windows-latest' + run: echo "$(pwd)/bin" >> $GITHUB_PATH + - name: syslog verification (Unix) + if: matrix.runs-on != 'windows-latest' + run: jruby -rsyslog -e 1 diff --git a/.github/workflows/manual-snapshot-publish-21.yml b/.github/workflows/manual-snapshot-publish-21.yml index 944e56259d9..ed8050003a7 100644 --- a/.github/workflows/manual-snapshot-publish-21.yml +++ b/.github/workflows/manual-snapshot-publish-21.yml @@ -8,7 +8,7 @@ jobs: publish: permissions: contents: read - uses: jruby/jruby/.github/workflows/snapshot-publish.yml@659a649a802bafb69c5d216f6fbc4160c749d454 + uses: ./.github/workflows/snapshot-publish.yml with: javaLevel: 21 secrets: diff --git a/.github/workflows/manual-snapshot-publish.yml b/.github/workflows/manual-snapshot-publish.yml index 5f33944a4ac..25c6e5efe63 100644 --- a/.github/workflows/manual-snapshot-publish.yml +++ b/.github/workflows/manual-snapshot-publish.yml @@ -8,7 +8,7 @@ jobs: publish: permissions: contents: read - uses: jruby/jruby/.github/workflows/snapshot-publish.yml@659a649a802bafb69c5d216f6fbc4160c749d454 + uses: ./.github/workflows/snapshot-publish.yml with: javaLevel: 8 secrets: diff --git a/.github/workflows/nightly-snapshot-publish-21.yml b/.github/workflows/nightly-snapshot-publish-21.yml index 25db07a32a5..941837f0871 100644 --- a/.github/workflows/nightly-snapshot-publish-21.yml +++ b/.github/workflows/nightly-snapshot-publish-21.yml @@ -15,7 +15,7 @@ jobs: permissions: contents: read if: ${{ github.ref == 'refs/heads/master' && github.repository == 'jruby/jruby' }} - uses: jruby/jruby/.github/workflows/snapshot-publish.yml@659a649a802bafb69c5d216f6fbc4160c749d454 + uses: ./.github/workflows/snapshot-publish.yml with: javaLevel: 21 secrets: diff --git a/.github/workflows/nightly-snapshot-publish.yml b/.github/workflows/nightly-snapshot-publish.yml index a0ab4b5bc22..4dfa431412f 100644 --- a/.github/workflows/nightly-snapshot-publish.yml +++ b/.github/workflows/nightly-snapshot-publish.yml @@ -15,7 +15,7 @@ jobs: permissions: contents: read if: ${{ github.ref == 'refs/heads/jruby-9.4' && github.repository == 'jruby/jruby' }} - uses: jruby/jruby/.github/workflows/snapshot-publish.yml@659a649a802bafb69c5d216f6fbc4160c749d454 + uses: ./.github/workflows/snapshot-publish.yml with: javaLevel: 8 secrets: diff --git a/.github/workflows/snapshot-publish.yml b/.github/workflows/snapshot-publish.yml index cc262263f5b..90d6d20e0e2 100644 --- a/.github/workflows/snapshot-publish.yml +++ b/.github/workflows/snapshot-publish.yml @@ -23,9 +23,9 @@ jobs: steps: - name: checkout - uses: actions/checkout@v3 + uses: actions/checkout@v6 - name: set up Java - uses: actions/setup-java@v2 + uses: actions/setup-java@v5 with: distribution: 'zulu' java-version: ${{ inputs.javaLevel }} @@ -33,14 +33,13 @@ jobs: server-username: MAVEN_USERNAME server-password: MAVEN_PASSWORD - name: Publish package - run: ./mvnw -B clean deploy -Psnapshots + run: ./mvnw -ntp clean deploy -Psnapshots env: MAVEN_USERNAME: ${{ secrets.SONATYPE_USERNAME }} MAVEN_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }} - name: Archive non-Maven artifacts - uses: actions/upload-artifact@v4 + uses: actions/upload-artifact@v7 with: - name: jruby-jars gem - path: | - maven/jruby-jars/pkg/jruby-jars-*.SNAPSHOT.gem + path: maven/jruby-jars/pkg/jruby-jars-*.SNAPSHOT.gem + archive: false diff --git a/.github/workflows/windows-verification-ci.yml b/.github/workflows/windows-verification-ci.yml deleted file mode 100644 index aef588ea0e0..00000000000 --- a/.github/workflows/windows-verification-ci.yml +++ /dev/null @@ -1,40 +0,0 @@ -name: JRuby CI - -on: [push, pull_request] - -env: - JAVA_OPTS: '-XX:+TieredCompilation -XX:TieredStopAtLevel=1 -Xms60M -Xmx1G -XX:InitialCodeCacheSize=40M -XX:ReservedCodeCacheSize=120M' - -permissions: - contents: read - -jobs: - - rake-test: - runs-on: windows-latest - - strategy: - matrix: - java-version: ['21', '25'] - fail-fast: false - - name: windows verification (Java ${{ matrix.java-version }}) - - steps: - - name: checkout - uses: actions/checkout@v3 - - name: set up java ${{ matrix.java-version }} - uses: actions/setup-java@v3 - with: - distribution: 'zulu' - java-version: ${{ matrix.java-version }} - cache: 'maven' - - name: bootstrap - run: mvn -ntp -Pbootstrap clean package - - name: bundle install - run: bin/jruby --dev -S bundle install - - name: jruby rails_runner - shell: cmd - run: | - set PATH=%CD%\bin;%PATH% - jruby tool/rails_runner diff --git a/.gitignore b/.gitignore index 953cd8c0edd..5bff5a3083e 100644 --- a/.gitignore +++ b/.gitignore @@ -58,7 +58,6 @@ lib/ruby/stdlib/*.jar lib/ruby/stdlib/ant* lib/ruby/stdlib/benchmark* lib/ruby/stdlib/bundler* -lib/ruby/stdlib/cgi* lib/ruby/stdlib/debug* lib/ruby/stdlib/delegate* lib/ruby/stdlib/did_you_mean* @@ -125,6 +124,7 @@ lib/ruby/stdlib/un* lib/ruby/stdlib/uri* lib/ruby/stdlib/yaml* lib/ruby/stdlib/weakref* +lib/ruby/stdlib/win32/registry.rb release.properties share diff --git a/.mvn/wrapper/maven-wrapper.jar b/.mvn/wrapper/maven-wrapper.jar deleted file mode 100644 index cb28b0e37c7..00000000000 Binary files a/.mvn/wrapper/maven-wrapper.jar and /dev/null differ diff --git a/.mvn/wrapper/maven-wrapper.properties b/.mvn/wrapper/maven-wrapper.properties index f5ed32693d9..c595b0093af 100644 --- a/.mvn/wrapper/maven-wrapper.properties +++ b/.mvn/wrapper/maven-wrapper.properties @@ -1,18 +1,3 @@ -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.9.11/apache-maven-3.9.11-bin.zip -wrapperUrl=https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.3.4/maven-wrapper-3.3.4.jar +wrapperVersion=3.3.4 +distributionType=only-script +distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.9.14/apache-maven-3.9.14-bin.zip diff --git a/BUILDING.md b/BUILDING.md index 72b5fbadca4..b63f9bd66a0 100644 --- a/BUILDING.md +++ b/BUILDING.md @@ -5,7 +5,6 @@ Prerequisites: * A [Java 21-compatible (or higher) Java development kit (JDK)](http://www.oracle.com/technetwork/java/javase/downloads/index.html). * If `JAVA_HOME` is not set on Mac OS X: `export JAVA_HOME=$(/usr/libexec/java_home)` -* [Maven](https://maven.apache.org/download.cgi) 3.3.0+ (Maven Wrapper provided with `./mvnw`) For running tests, you will need Ant: @@ -25,7 +24,7 @@ command to execute is: ./mvnw ``` -This will run the default "install" goal (`mvn install`) and will do all of the following: +This will run the default "install" goal (`./mvnw install`) and will do all of the following: * Compile JRuby * Build `lib/jruby.jar`, needed for running at command line @@ -33,13 +32,11 @@ This will run the default "install" goal (`mvn install`) and will do all of the The environment is now suitable for running Ruby applications. -If you have Maven installed in your PATH, you can just use `mvn` instead of `./mvnw`. - Incremental Builds ------------------ When working on JRuby sources, it is helpful to incrementally rebuild only the `lib/jruby.jar` file rather than also -re-assembling the standard library. You can add `-Dcore` to the `mvn` command line to speed up incremental builds: +re-assembling the standard library. You can add `-Dcore` to the `./mvnw` command line to speed up incremental builds: ``` ./mvnw -Dcore @@ -92,7 +89,7 @@ environment. This will do the following: needed to run integration tests. ``` -mvn -Pbootstrap +./mvnw -Pbootstrap ``` In case there is a problem with installing the jruby-launcher (due to missing compiler or so) use @@ -110,7 +107,7 @@ After changing Java code, you can recompile quickly by running one of the jar files by ``` -mvn -pl core +./mvnw -pl core ``` ### Day to Day Testing @@ -160,7 +157,7 @@ Most of the specs under the spec/ directory are written for rspec, and can be ru The notable exception is the "Ruby specs" under spec/ruby, which are run with mspec as described later in this document. -rspec will be installed with `mvn package -Pbootstrap` or you can install it manually. +rspec will be installed with `./mvnw package -Pbootstrap` or you can install it manually. ``` ./bin/jruby -S rspec spec/path/to/spec @@ -193,7 +190,7 @@ If you are making changes that would affect JRuby's core runtime or embedding APIs, you should run JRuby's Java-based unit tests via ``` -mvn -Ptest +./mvnw -Ptest ``` #### Tests for other ways of deploying and packaging JRuby @@ -201,9 +198,9 @@ mvn -Ptest There are some maven integration tests (i.e. consistency test if all gems are included, osgi test, etc) for the various distributions of JRuby which can be invoked with ``` -mvn -Pmain -Dinvoker.skip=false -mvn -Pcomplete -Dinvoker.skip=false -mvn -Pdist -Dinvoker.skip=false +./mvnw -Pmain -Dinvoker.skip=false +./mvnw -Pcomplete -Dinvoker.skip=false +./mvnw -Pdist -Dinvoker.skip=false ``` #### Just Like CI @@ -224,18 +221,18 @@ maven/jruby-dist/src/it To trigger the tests with the build: ``` -mvn -Pmain -Dinvoker.skip=false -mvn -Pcomplete -Dinvoker.skip=false -mvn -Pdist -Dinvoker.skip=false -mvn -Pjruby-jars -Dinvoker.skip=false +./mvnw -Pmain -Dinvoker.skip=false +./mvnw -Pcomplete -Dinvoker.skip=false +./mvnw -Pdist -Dinvoker.skip=false +./mvnw -Pjruby-jars -Dinvoker.skip=false ``` To pick a particular test, add the name of the directory inside the respective *src/it* folder, like (wildcards are possible): ``` -mvn -Pmain -Dinvoker.skip=false -Dinvoker.test=integrity -mvn -Pmain -Dinvoker.skip=false -Dinvoker.test=j2ee* -mvn -Pmain -Dinvoker.skip=false -Dinvoker.test=osgi* +./mvnw -Pmain -Dinvoker.skip=false -Dinvoker.test=integrity +./mvnw -Pmain -Dinvoker.skip=false -Dinvoker.test=j2ee* +./mvnw -Pmain -Dinvoker.skip=false -Dinvoker.test=osgi* ``` Clean Build @@ -244,7 +241,7 @@ Clean Build To clean the build it is important to use the same profile for the clean as what you want to build. The best way to clean build something is, i.e. jruby-jars ``` -mvn clean install -Pjruby-jars +./mvnw clean install -Pjruby-jars ``` This first cleans everything and then starts the new build in one go! @@ -253,12 +250,12 @@ Cleaning the build may be necessary after switching to a different version of JRuby (for example, after switching git branches) to ensure that everything is rebuilt properly. -NOTE: `mvn clean` just cleans the **jruby-core** artifact and the **./lib/jruby.jar**! +NOTE: `./mvnw clean` just cleans the **jruby-core** artifact and the **./lib/jruby.jar**! Clean everything: ``` -mvn -Pclean +./mvnw -Pclean ``` Distribution Packages diff --git a/USERS.md b/USERS.md index 16462f5bf62..3236045d8de 100644 --- a/USERS.md +++ b/USERS.md @@ -72,38 +72,30 @@ AsciiDoc content to HTML 5, PDF and other formats That is implemented in Ruby. Additional content in the [JRuby Success Stories](https://github.com/jruby/jruby/wiki/SuccessStories#substitutealert-inc) wiki page. * **Desc:** We make SubAlert, the top rated substitute teacher app in the U.S. and Canada. - * **Usage:** JRuby is used for scaling this highly parallel application in ways that CRuby can't match. Java integration with the Firebase library allows sending Android notifications, even though there's no official support for Ruby. The JRuby team has been amazingly responsive and we are really happy using JRuby for over 12 years at the time of this writing! 🎉 - * **Since:** 2013 - * **Links:** [https://www.subalert.com](https://www.subalert.com), [iPhone App](https://apps.apple.com/us/app/subalert-for-frontline-ed/id557785741), [Android App](https://play.google.com/store/apps/details?id=com.substitutealert) - -* **Contact:** @mohamedhafez83 +* **Contact:** @mohamedhafez83 ### eazyBI * **Desc:** eazyBI is a Business Intelligence application for creating reports, charts, and dashboards from many different data sources. eazyBI's most popular integration is with Atlassian Jira and other Jira apps. It is one of the top-selling third-party apps on the Atlassian Marketplace. - * **Usage:** eazyBI is a Ruby on Rails application that runs on JRuby. JRuby allows embedding a Java-based Mondrian OLAP engine, integrating with Apache POI and Batik libraries, as well as packaging eazyBI as a Jira Data Center plugin (Java jar file). eazyBI is deployed both in the cloud as well as installed on thousands of customer servers running Linux or Windows and connecting to PostgreSQL, MySQL, Oracle, and Microsoft SQL Server databases. One of the eazyBI core components is [mondrian-olap](https://github.com/rsim/mondrian-olap) which provides JRuby DSL for using the Mondrian OLAP engine. - * **Since:** 2011 - * **Links:** [eazyBI](https://eazybi.com) - * **Contact:** @rsim ### GoCD (Go Continuous Delivery) * **Desc:** GoCD is an open-source self-hostable continuous delivery / integration automation server, automating the software build-test-release cycle to enable frequent and reliable -software builds & deployments. It helps teams visualise and streamline complex development workflows +software builds & deployments. It helps teams visualise and streamline complex development workflows by allowing teams to visualize their entire delivery process through "pipelines as code" ensuring that software can be released at any time. -* **Usage:** While originally used more widely within GoCD, JRuby/Rails/[JRuby-Rack](https://github.com/jruby/jruby-rack) is still used -via [Jetty](https://jetty.org/) for server-side rendering of various interfaces for users to interact with their pipeline job runs +* **Usage:** While originally used more widely within GoCD, JRuby/Rails/[JRuby-Rack](https://github.com/jruby/jruby-rack) is still used +via [Jetty](https://jetty.org/) for server-side rendering of various interfaces for users to interact with their pipeline job runs and interoperate with the rest of the Java-based server. * **Since:** 2007 * **Links:** [gocd.org](https://www.gocd.org/), [source](https://github.com/gocd/gocd), [docs](https://docs.gocd.org/current/) @@ -112,5 +104,12 @@ and interoperate with the rest of the Java-based server. ### Zendesk * **Desc**: Zendesk is a leading customer support SaaS solution. -* **Usage**: We use JRuby for the search indexer of our core support product to fetch data from different data stores and push it to our search engine. JRuby was chosen due to its multithreading capabilities and the Java library ecosystem. +* **Usage**: We use JRuby for the search indexer of our core support product to fetch data from different data stores and push it to our search engine. JRuby was chosen due to its multithreading capabilities and the Java library ecosystem. * **Link**: [Presentation slides with more context](https://www.slideshare.net/slideshow/50-000-processed-records-per-second-a-cruby-jruby-story/278760878) + +### openHAB + +* **Description**: A vendor and technology agnostic open-source home automation platform written in Java. +* **Usage**: Leverages JRuby as one of several scripting engines (alongside JavaScript and Python) for its OSGi-based architecture, allowing users to write complex automation rules and logic via a [dedicated JRuby scripting add-on](https://github.com/openhab/openhab-addons/tree/main/bundles/org.openhab.automation.jrubyscripting). +* **Since**: 2020 +* **Link**: [openHAB](https://www.openhab.org/) diff --git a/VERSION b/VERSION index 66ffcfa55e9..27e366ae64f 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -10.1.0.0-SNAPSHOT +10.1.1.0-SNAPSHOT diff --git a/antlib/extra.xml b/antlib/extra.xml deleted file mode 100644 index 0af003b8a82..00000000000 --- a/antlib/extra.xml +++ /dev/null @@ -1,517 +0,0 @@ - - - - - - - - -build jruby maven artifact - - - - - - -build jruby-complete.jar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/bin/.jruby.release b/bin/.jruby.release index 6b9f48136b5..4a34399e6cd 100644 --- a/bin/.jruby.release +++ b/bin/.jruby.release @@ -1,3 +1,3 @@ -JRUBY_VERSION=10.1.0.0-SNAPSHOT +JRUBY_VERSION=10.1.1.0-SNAPSHOT JRUBY_MAIN=org.jruby.main.Main JRUBY_MINIMUM_JAVA_VERSION=21 diff --git a/bin/ast b/bin/ast index 2ce305c077f..a1e1e9cd4cd 100755 --- a/bin/ast +++ b/bin/ast @@ -151,14 +151,14 @@ module DotGraph end end -root = JRuby.parse(options[:expression]) +root = JRuby.parse_result(options[:expression]) if options[:print_ast] if options[:dot_format] DotGraph.print_graph(root) else print "AST:" - puts indent(root.to_string) + puts indent(root.get_ast.to_string) puts end end @@ -191,7 +191,7 @@ def ir_setup(root) JRuby::IR.compiler_debug = true - builder = org.jruby.ir.builder.IRBuilderAST + builder = org.jruby.ir.builder.IRBuilder scope = builder.build_root(manager, root).scope scope.prepare_for_compilation diff --git a/bin/jruby.sh b/bin/jruby.sh index 0bf0966d811..d35f61e0052 100755 --- a/bin/jruby.sh +++ b/bin/jruby.sh @@ -849,7 +849,15 @@ JAVA_OPTS="$JAVA_OPTS ${JAVA_MEM-} ${JAVA_STACK-}" JFFI_OPTS="-Djffi.boot.library.path=$JRUBY_HOME/lib/jni" -CLASSPATH="${CP-}${CP_DELIMITER}${CLASSPATH-}" +if [ -n "${CP-}" ]; then + if [ -n "${CLASSPATH-}" ]; then + CLASSPATH="${CP-}${CP_DELIMITER}${CLASSPATH-}" + else + CLASSPATH="${CP-}" + fi +else + CLASSPATH="${CLASSPATH-}" +fi # ----- Module and Class Data Sharing flags for Java 9+ ----------------------- @@ -989,17 +997,22 @@ fi prepend java_args "$JAVACMD" +classpath_value=$CLASSPATH if $NO_BOOTCLASSPATH || $VERIFY_JRUBY; then if $use_modules; then # Use module path instead of classpath for the jruby libs - append java_args --module-path "$JRUBY_CP" -classpath "$CLASSPATH" + append java_args --module-path "$JRUBY_CP" else - append java_args -classpath "$JRUBY_CP$CP_DELIMITER$CLASSPATH" + classpath_value="$JRUBY_CP$CP_DELIMITER$classpath_value" + # Trim extra delimiter we might have appended + classpath_value="${classpath_value%"$CP_DELIMITER"}" fi else append java_args -Xbootclasspath/a:"$JRUBY_CP" - append java_args -classpath "$CLASSPATH" - append java_args -Djruby.home="$JRUBY_HOME" +fi + +if [ -n "$classpath_value" ]; then + append java_args -classpath "$classpath_value" fi append java_args -Djruby.home="$JRUBY_HOME" \ diff --git a/core/pom.rb b/core/pom.rb index b05d52b3c61..d39e520b858 100644 --- a/core/pom.rb +++ b/core/pom.rb @@ -45,16 +45,16 @@ # exclude jnr-ffi to avoid problems with shading and relocation of the asm packages jar 'com.github.jnr:jnr-netdb:1.2.0', exclusions: ['com.github.jnr:jnr-ffi'] - jar 'com.github.jnr:jnr-enxio:0.32.19', exclusions: ['com.github.jnr:jnr-ffi'] - jar 'com.github.jnr:jnr-unixsocket:0.38.24', exclusions: ['com.github.jnr:jnr-ffi'] - jar 'com.github.jnr:jnr-posix:3.1.21', exclusions: ['com.github.jnr:jnr-ffi'] + jar 'com.github.jnr:jnr-enxio:0.32.20', exclusions: ['com.github.jnr:jnr-ffi'] + jar 'com.github.jnr:jnr-unixsocket:0.38.25', exclusions: ['com.github.jnr:jnr-ffi'] + jar 'com.github.jnr:jnr-posix:3.1.22', exclusions: ['com.github.jnr:jnr-ffi'] jar 'com.github.jnr:jnr-constants:0.10.4', exclusions: ['com.github.jnr:jnr-ffi'] - jar 'com.github.jnr:jnr-ffi:2.2.18' + jar 'com.github.jnr:jnr-ffi:2.2.19' jar 'com.github.jnr:jffi:${jffi.version}' jar 'com.github.jnr:jffi:${jffi.version}:native' - jar 'org.jruby.joni:joni:2.2.6' - jar 'org.jruby.jcodings:jcodings:1.0.63' + jar 'org.jruby.joni:joni:2.2.7' + jar 'org.jruby.jcodings:jcodings:1.0.64' jar 'org.jruby:dirgra:0.5' jar 'com.headius:invokebinder:1.14' @@ -80,6 +80,10 @@ jar 'org.crac:crac:1.5.0' + jar 'org.jruby:jruby-prism:2.0.2' + + jar 'ch.randelshofer:fastdoubleparser:2.0.1' + plugin_management do plugin('org.eclipse.m2e:lifecycle-mapping:1.0.0', lifecycleMappingMetadata: { diff --git a/core/pom.xml b/core/pom.xml index 37ec6972d21..74a106370ab 100644 --- a/core/pom.xml +++ b/core/pom.xml @@ -12,7 +12,7 @@ DO NOT MODIFY - GENERATED CODE org.jruby jruby-parent - 10.1.0.0-SNAPSHOT + 10.1.1.0-SNAPSHOT jruby-base JRuby Base @@ -55,9 +55,9 @@ DO NOT MODIFY - GENERATED CODE ${build.dir}/test-results provided 2019c - 3.4.5 - 3.4 - 5 + 4.0.0 + 4.0 + 0 @@ -89,7 +89,7 @@ DO NOT MODIFY - GENERATED CODE com.github.jnr jnr-enxio - 0.32.19 + 0.32.20 com.github.jnr @@ -100,7 +100,7 @@ DO NOT MODIFY - GENERATED CODE com.github.jnr jnr-unixsocket - 0.38.24 + 0.38.25 com.github.jnr @@ -111,7 +111,7 @@ DO NOT MODIFY - GENERATED CODE com.github.jnr jnr-posix - 3.1.21 + 3.1.22 com.github.jnr @@ -133,7 +133,7 @@ DO NOT MODIFY - GENERATED CODE com.github.jnr jnr-ffi - 2.2.18 + 2.2.19 com.github.jnr @@ -149,12 +149,12 @@ DO NOT MODIFY - GENERATED CODE org.jruby.joni joni - 2.2.6 + 2.2.7 org.jruby.jcodings jcodings - 1.0.63 + 1.0.64 org.jruby @@ -237,6 +237,16 @@ DO NOT MODIFY - GENERATED CODE crac 1.5.0 + + org.jruby + jruby-prism + 2.0.2 + + + ch.randelshofer + fastdoubleparser + 2.0.1 + package @@ -701,7 +711,7 @@ DO NOT MODIFY - GENERATED CODE org.jruby jruby-base - 10.1.0.0-SNAPSHOT + 10.1.1.0-SNAPSHOT diff --git a/core/src/main/java/org/jruby/IncludedModule.java b/core/src/main/java/org/jruby/IncludedModule.java index c5908f27f92..949193f2cef 100644 --- a/core/src/main/java/org/jruby/IncludedModule.java +++ b/core/src/main/java/org/jruby/IncludedModule.java @@ -45,12 +45,6 @@ public RubyModule getOrigin() { return origin; } - @Deprecated(since = "9.3.0.0") - @Override - public RubyModule getNonIncludedClass() { - return origin; - } - @Deprecated(since = "10.0.3.0") @Override public IRubyObject id() { diff --git a/core/src/main/java/org/jruby/IncludedModuleWrapper.java b/core/src/main/java/org/jruby/IncludedModuleWrapper.java index b5945d373ab..340e55c1bde 100644 --- a/core/src/main/java/org/jruby/IncludedModuleWrapper.java +++ b/core/src/main/java/org/jruby/IncludedModuleWrapper.java @@ -73,24 +73,6 @@ public IncludedModuleWrapper(Ruby runtime, RubyClass superClass, RubyModule orig methods = methodsHolder.getMethodsForWrite(); } - /** - * Overridden newIncludeClass implementation to allow attaching future includes to the correct module - * (i.e. the one to which this is attached) - * - * @see org.jruby.RubyModule#newIncludeClass(RubyClass) - */ - @Override - @Deprecated(since = "1.1.5") - public IncludedModuleWrapper newIncludeClass(RubyClass superClass) { - var context = getCurrentContext(); - IncludedModuleWrapper includedModule = new IncludedModuleWrapper(context.runtime, superClass, getOrigin()); - - // include its parent (and in turn that module's parents) - if (getSuperClass() != null) includedModule.includeModule(context, getSuperClass()); - - return includedModule; - } - public RubyModule getDelegate() { return origin; } diff --git a/core/src/main/java/org/jruby/MetaClass.java b/core/src/main/java/org/jruby/MetaClass.java index c778f8c3c64..3d261052cd2 100644 --- a/core/src/main/java/org/jruby/MetaClass.java +++ b/core/src/main/java/org/jruby/MetaClass.java @@ -41,11 +41,6 @@ public final class MetaClass extends RubyClass { - @Deprecated(since = "9.2.1.0") - public MetaClass(Ruby runtime, RubyClass superClass, IRubyObject attached) { - this(runtime, superClass, (RubyBasicObject) attached); - } - /** * rb_class_boot for meta classes ({@link #makeMetaClass(ThreadContext, RubyClass)}) */ diff --git a/core/src/main/java/org/jruby/NativeException.java b/core/src/main/java/org/jruby/NativeException.java index c967c593b02..0cfb0ad129d 100644 --- a/core/src/main/java/org/jruby/NativeException.java +++ b/core/src/main/java/org/jruby/NativeException.java @@ -82,11 +82,6 @@ public final IRubyObject cause() { return Java.getInstance(getRuntime(), getCause()); } - @Deprecated(since = "9.1.0.0") - public final IRubyObject cause(Block unusedBlock) { - return cause(); - } - @Override public final IRubyObject backtrace() { IRubyObject rubyTrace = super.backtrace(); @@ -134,45 +129,6 @@ private static RubyArray joinedBacktrace(final Ruby runtime, final RubyArray rTr return RubyArray.newArrayMayCopy(runtime, trace); } - @Deprecated(since = "9.1.0.0") // not used - public void trimStackTrace(Member target) { - Throwable t = new Throwable(); - StackTraceElement[] origStackTrace = cause.getStackTrace(); - StackTraceElement[] currentStackTrace = t.getStackTrace(); - int skip = 0; - for (int i = 1; - i <= origStackTrace.length && i <= currentStackTrace.length; - ++i) { - StackTraceElement a = origStackTrace[origStackTrace.length - i]; - StackTraceElement b = currentStackTrace[currentStackTrace.length - i]; - if (a.equals(b)) { - skip += 1; - } else { - break; - } - } - // If we know what method was being called, strip everything - // before the call. This hides the JRuby and reflection internals. - if (target != null) { - String className = target.getDeclaringClass().getName(); - String methodName = target.getName(); - for (int i = origStackTrace.length - skip - 1; i >= 0; --i) { - StackTraceElement frame = origStackTrace[i]; - if (frame.getClassName().equals(className) && - frame.getMethodName().equals(methodName)) { - skip = origStackTrace.length - i - 1; - break; - } - } - } - if (skip > 0) { - final int len = origStackTrace.length - skip; - StackTraceElement[] newStackTrace = new StackTraceElement[len]; - System.arraycopy(origStackTrace, 0, newStackTrace, 0, len); - cause.setStackTrace(newStackTrace); - } - } - @Override public final IRubyObject getMessage() { if (message == null) { diff --git a/core/src/main/java/org/jruby/PrependedModule.java b/core/src/main/java/org/jruby/PrependedModule.java index 8334c0003e3..80b4e8edd42 100644 --- a/core/src/main/java/org/jruby/PrependedModule.java +++ b/core/src/main/java/org/jruby/PrependedModule.java @@ -137,12 +137,6 @@ public RubyModule getDelegate() { return origin; } - @Deprecated(since = "9.3.0.0") - @Override - public RubyModule getNonIncludedClass() { - return origin; - } - @Deprecated(since = "10.0.3.0") @Override public IRubyObject id() { diff --git a/core/src/main/java/org/jruby/Ruby.java b/core/src/main/java/org/jruby/Ruby.java index 229a4878225..c62a2051e85 100644 --- a/core/src/main/java/org/jruby/Ruby.java +++ b/core/src/main/java/org/jruby/Ruby.java @@ -50,6 +50,7 @@ import org.jruby.exceptions.LocalJumpError; import org.jruby.exceptions.SystemExit; import org.jruby.ext.jruby.JRubyUtilLibrary; +import org.jruby.ext.set.RubySet; import org.jruby.ext.thread.ConditionVariable; import org.jruby.ext.thread.Mutex; import org.jruby.ext.thread.Queue; @@ -497,12 +498,12 @@ private Ruby(RubyInstanceConfig config) { producerClass = null; } - continuationClass = initContinuation(context); - TracePoint.createTracePointClass(context, objectClass); warningCategories = config.getWarningCategories(); warningModule = RubyWarnings.createWarningModule(context); + warningBufferClass = RubyWarnings.createWarningBufferClass(context, warningModule); + warnings = new RubyWarnings(this, warningBufferClass); // Initialize exceptions initExceptions(context); @@ -518,6 +519,8 @@ private Ruby(RubyInstanceConfig config) { dataClass = RubyData.createDataClass(context, objectClass); + setClass = RubySet.createSetClass(context, objectClass, enumerableModule); + // everything booted, so SizedQueue should be available; set up root fiber ThreadFiber.initRootFiber(context, context.getThread()); @@ -602,6 +605,8 @@ private void initBootLibraries(ThreadContext context) { loadService.provide("thread.rb"); loadService.provide("fiber.rb"); loadService.provide("ruby2_keywords.rb"); + loadService.provide("set.rb"); + loadService.provide("pathname.rb"); // Load preludes initRubyPreludes(); @@ -865,7 +870,7 @@ public IRubyObject evalScriptlet(String script) { */ public IRubyObject evalScriptlet(String script, DynamicScope scope) { ThreadContext context = getCurrentContext(); - RootNode rootNode = (RootNode) getParserManager().parseEval("',cgi.script) - assert_equal('',cgi.script('bar')) - assert_equal('',cgi.script{'foo'}) - assert_equal('',cgi.script('bar'){'foo'}) - assert_equal('

',cgi.h1) - assert_equal('

',cgi.h1('bar')) - assert_equal('

foo

',cgi.h1{'foo'}) - assert_equal('

foo

',cgi.h1('bar'){'foo'}) - assert_equal('

',cgi.h2) - assert_equal('

',cgi.h2('bar')) - assert_equal('

foo

',cgi.h2{'foo'}) - assert_equal('

foo

',cgi.h2('bar'){'foo'}) - assert_equal('

',cgi.h3) - assert_equal('

',cgi.h3('bar')) - assert_equal('

foo

',cgi.h3{'foo'}) - assert_equal('

foo

',cgi.h3('bar'){'foo'}) - assert_equal('

',cgi.h4) - assert_equal('

',cgi.h4('bar')) - assert_equal('

foo

',cgi.h4{'foo'}) - assert_equal('

foo

',cgi.h4('bar'){'foo'}) - assert_equal('
',cgi.h5) - assert_equal('
',cgi.h5('bar')) - assert_equal('
foo
',cgi.h5{'foo'}) - assert_equal('
foo
',cgi.h5('bar'){'foo'}) - assert_equal('
',cgi.h6) - assert_equal('
',cgi.h6('bar')) - assert_equal('
foo
',cgi.h6{'foo'}) - assert_equal('
foo
',cgi.h6('bar'){'foo'}) - assert_match(/^