From eb233d4b5a196b06a599a9118944e39323c9c333 Mon Sep 17 00:00:00 2001 From: Benoit Daloze Date: Tue, 26 Sep 2023 05:12:22 +0200 Subject: [PATCH] Updates for TruffleRuby 23.1 (#294) * Use the latest truffleruby+graalvm release in CI * Update documentation to install GraalJS for TruffleRuby 23.1 --- .github/workflows/ci.yml | 4 ++-- lib/mini_racer/truffleruby.rb | 3 +-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 30eefc0c..1e8b1127 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -16,7 +16,7 @@ jobs: - "macos-12" - "ubuntu-20.04" ruby: - - "truffleruby+graalvm-head" + - "truffleruby+graalvm" name: ${{ matrix.os }} - ${{ matrix.ruby }} runs-on: ${{ matrix.os }} @@ -32,7 +32,7 @@ jobs: bundler: latest # to get this fix: https://github.com/rubygems/rubygems/issues/6165 bundler-cache: true - name: Install GraalVM JS component - run: gu install js + run: truffleruby-polyglot-get js - name: Compile run: bundle exec rake compile - name: Test diff --git a/lib/mini_racer/truffleruby.rb b/lib/mini_racer/truffleruby.rb index 3be48927..f4e7bba7 100644 --- a/lib/mini_racer/truffleruby.rb +++ b/lib/mini_racer/truffleruby.rb @@ -72,8 +72,7 @@ def init_unsafe(isolate, snapshot) unless Polyglot.languages.include? "js" raise "The language 'js' is not available, you likely need to `export TRUFFLERUBYOPT='--jvm --polyglot'`\n" \ - "You also need to install the 'js' component with 'gu install js' on GraalVM 22.2+\n" \ - "Note that you need TruffleRuby+GraalVM and not just the TruffleRuby standalone to use MiniRacer" + "You also need to install the 'js' component, see https://github.com/oracle/truffleruby/blob/master/doc/user/polyglot.md#installing-other-languages" end @context = Polyglot::InnerContext.new(on_cancelled: -> {