Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/master' into Ractor-Local-GC-v…
Browse files Browse the repository at this point in the history
…ersion-2
  • Loading branch information
rm155 committed Mar 25, 2024
2 parents aa6cc3e + a31ca35 commit 5c54b74
Show file tree
Hide file tree
Showing 163 changed files with 2,858 additions and 3,189 deletions.
4 changes: 2 additions & 2 deletions .github/actions/setup/directories/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ runs:
path: ${{ inputs.srcdir }}
fetch-depth: ${{ inputs.fetch-depth }}

- uses: actions/cache@ab5e6d0c87105b4c9c2047343972218f562e4319 # v4.0.1
- uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4.0.2
with:
path: ${{ inputs.srcdir }}/.downloaded-cache
key: downloaded-cache
Expand Down Expand Up @@ -164,7 +164,7 @@ runs:
echo final='rmdir ${{ inputs.builddir }}' >> $GITHUB_OUTPUT
- name: clean
uses: gacts/run-and-post-run@674528335da98a7afc80915ff2b4b860a0b3553a # v1.4.0
uses: gacts/run-and-post-run@7aec950f3b114c4fcf6012070c3709ecff0eb6f8 # v1.4.0
with:
working-directory:
post: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/annocheck.yml
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ jobs:
builddir: build
makeup: true

- uses: ruby/setup-ruby@d4526a55538b775af234ba4af27118ed6f8f6677 # v1.172.0
- uses: ruby/setup-ruby@5f19ec79cedfadb78ab837f95b87734d0003c899 # v1.173.0
with:
ruby-version: '3.0'
bundler: none
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/baseruby.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ jobs:
- ruby-3.3

steps:
- uses: ruby/setup-ruby@d4526a55538b775af234ba4af27118ed6f8f6677 # v1.172.0
- uses: ruby/setup-ruby@5f19ec79cedfadb78ab837f95b87734d0003c899 # v1.173.0
with:
ruby-version: ${{ matrix.ruby }}
bundler: none
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/check_dependencies.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ jobs:

- uses: ./.github/actions/setup/directories

- uses: ruby/setup-ruby@d4526a55538b775af234ba4af27118ed6f8f6677 # v1.172.0
- uses: ruby/setup-ruby@5f19ec79cedfadb78ab837f95b87734d0003c899 # v1.173.0
with:
ruby-version: '3.0'
bundler: none
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ jobs:
os: ubuntu-latest
# ruby analysis used large memory. We need to use a larger runner.
- language: ruby
os: ${{ github.repository == 'ruby/ruby' && 'macos-arm-oss' || 'macos-14' }}
os: ${{ github.repository == 'ruby/ruby' && 'macos-arm-oss' || 'ubuntu-latest' }}

steps:
- name: Checkout repository
Expand All @@ -80,15 +80,15 @@ jobs:
run: sudo rm /usr/lib/ruby/vendor_ruby/rubygems/defaults/operating_system.rb

- name: Initialize CodeQL
uses: github/codeql-action/init@05963f47d870e2cb19a537396c1f668a348c7d8f # v3.24.8
uses: github/codeql-action/init@1b1aada464948af03b950897e5eb522f92603cc2 # v3.24.9
with:
languages: ${{ matrix.language }}

- name: Autobuild
uses: github/codeql-action/autobuild@05963f47d870e2cb19a537396c1f668a348c7d8f # v3.24.8
uses: github/codeql-action/autobuild@1b1aada464948af03b950897e5eb522f92603cc2 # v3.24.9

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@05963f47d870e2cb19a537396c1f668a348c7d8f # v3.24.8
uses: github/codeql-action/analyze@1b1aada464948af03b950897e5eb522f92603cc2 # v3.24.9
with:
category: '/language:${{ matrix.language }}'
upload: False
Expand Down Expand Up @@ -118,7 +118,7 @@ jobs:
continue-on-error: true

- name: Upload SARIF
uses: github/codeql-action/upload-sarif@05963f47d870e2cb19a537396c1f668a348c7d8f # v3.24.8
uses: github/codeql-action/upload-sarif@1b1aada464948af03b950897e5eb522f92603cc2 # v3.24.9
with:
sarif_file: sarif-results/${{ matrix.language }}.sarif
continue-on-error: true
2 changes: 1 addition & 1 deletion .github/workflows/compilers.yml
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,7 @@ jobs:
if: ${{ (matrix.entry.static-exts || '') != '' }}

- name: Clean up ext/Setup
uses: gacts/run-and-post-run@674528335da98a7afc80915ff2b4b860a0b3553a # v1.4.0
uses: gacts/run-and-post-run@7aec950f3b114c4fcf6012070c3709ecff0eb6f8 # v1.4.0
with:
shell: bash
working-directory: build
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/dependabot_automerge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:

steps:
- name: Dependabot metadata
uses: dependabot/fetch-metadata@c9c4182bf1b97f5224aee3906fd373f6b61b4526 # v1.6.0
uses: dependabot/fetch-metadata@0fb21704c18a42ce5aa8d720ea4b912f5e6babef # v2.0.0
id: metadata

- name: Wait for status checks
Expand Down
16 changes: 6 additions & 10 deletions .github/workflows/macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,26 +24,22 @@ jobs:
make:
strategy:
matrix:
test_task: ['check']
test_opts: ['']
os:
- macos-12
- macos-13
- ${{ github.repository == 'ruby/ruby' && 'macos-arm-oss' || 'macos-14' }}
include:
- test_task: check
- test_task: test-all
test_opts: --repeat-count=2
os: ${{ github.repository == 'ruby/ruby' && 'macos-arm-oss' || 'macos-14' }}
- test_task: test-bundler-parallel
os: ${{ github.repository == 'ruby/ruby' && 'macos-arm-oss' || 'macos-14' }}
- test_task: test-bundled-gems
os: ${{ github.repository == 'ruby/ruby' && 'macos-arm-oss' || 'macos-14' }}
- test_task: check
os: macos-12
- test_task: check
os: macos-13
fail-fast: false

env:
GITPULLOPTIONS: --no-tags origin ${{ github.ref }}

runs-on: ${{ matrix.os }}
runs-on: ${{ matrix.os || (github.repository == 'ruby/ruby' && 'macos-arm-oss' || 'macos-14')}}

if: >-
${{!(false
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/mingw.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ jobs:
steps:
- name: Set up Ruby & MSYS2
uses: ruby/setup-ruby@d4526a55538b775af234ba4af27118ed6f8f6677 # v1.172.0
uses: ruby/setup-ruby@5f19ec79cedfadb78ab837f95b87734d0003c899 # v1.173.0
with:
ruby-version: ${{ matrix.baseruby }}

Expand Down
14 changes: 7 additions & 7 deletions .github/workflows/prism.yml
Original file line number Diff line number Diff line change
Expand Up @@ -95,13 +95,13 @@ jobs:
RUBY_TESTOPTS: '-q --tty=no --excludes-dir="../src/test/.excludes-prism" --exclude="test_ast.rb" --exclude="test_regexp.rb" --exclude="error_highlight/test_error_highlight.rb" --exclude="prism/encoding_test.rb"'
RUN_OPTS: ${{ matrix.run_opts }}

# - name: make test-spec
# run: |
# $SETARCH make -s test-spec RUN_OPTS="$RUN_OPTS"
# timeout-minutes: 10
# env:
# GNUMAKEFLAGS: ''
# RUN_OPTS: ${{ matrix.run_opts }}
- name: make test-prism-spec
run: |
$SETARCH make -s test-prism-spec SPECOPTS="$SPECOPTS"
timeout-minutes: 10
env:
GNUMAKEFLAGS: ''
SPECOPTS: "-T -W:no-experimental -T --parser=prism"

- uses: ./.github/actions/slack
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/rjit-bindgen.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ jobs:
steps:
- name: Set up Ruby
uses: ruby/setup-ruby@d4526a55538b775af234ba4af27118ed6f8f6677 # v1.172.0
uses: ruby/setup-ruby@5f19ec79cedfadb78ab837f95b87734d0003c899 # v1.173.0
with:
ruby-version: '3.1'

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/scorecards.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,6 @@ jobs:

# Upload the results to GitHub's code scanning dashboard.
- name: 'Upload to code-scanning'
uses: github/codeql-action/upload-sarif@05963f47d870e2cb19a537396c1f668a348c7d8f # v2.1.27
uses: github/codeql-action/upload-sarif@1b1aada464948af03b950897e5eb522f92603cc2 # v2.1.27
with:
sarif_file: results.sarif
2 changes: 1 addition & 1 deletion .github/workflows/spec_guards.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ jobs:
steps:
- uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2

- uses: ruby/setup-ruby@d4526a55538b775af234ba4af27118ed6f8f6677 # v1.172.0
- uses: ruby/setup-ruby@5f19ec79cedfadb78ab837f95b87734d0003c899 # v1.173.0
with:
ruby-version: ${{ matrix.ruby }}
bundler: none
Expand Down
18 changes: 6 additions & 12 deletions .github/workflows/ubuntu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,32 +24,26 @@ jobs:
make:
strategy:
matrix:
os: [ubuntu-22.04, ubuntu-20.04]
test_task: [check]
arch: ['']
configure: ['cppflags=-DVM_CHECK_MODE']
# specifying other jobs with `include` to avoid redundant tests
include:
- test_task: check
configure: 'cppflags=-DVM_CHECK_MODE'
- test_task: check
arch: i686
os: ubuntu-22.04
- test_task: check
configure: '--disable-yjit'
os: ubuntu-22.04
- test_task: check
configure: '--enable-shared --enable-load-relative'
os: ubuntu-22.04
- test_task: test-bundler-parallel
os: ubuntu-22.04
- test_task: test-bundled-gems
os: ubuntu-22.04
- test_task: check
os: ubuntu-20.04
fail-fast: false

env:
GITPULLOPTIONS: --no-tags origin ${{ github.ref }}
RUBY_DEBUG: ci

runs-on: ${{ matrix.os }}
runs-on: ${{ matrix.os || 'ubuntu-22.04' }}

if: >-
${{!(false
Expand All @@ -71,7 +65,7 @@ jobs:
with:
arch: ${{ matrix.arch }}

- uses: ruby/setup-ruby@d4526a55538b775af234ba4af27118ed6f8f6677 # v1.172.0
- uses: ruby/setup-ruby@5f19ec79cedfadb78ab837f95b87734d0003c899 # v1.173.0
with:
ruby-version: '3.0'
bundler: none
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/wasm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ jobs:
run: |
echo "WASI_SDK_PATH=/opt/wasi-sdk" >> $GITHUB_ENV
- uses: ruby/setup-ruby@d4526a55538b775af234ba4af27118ed6f8f6677 # v1.172.0
- uses: ruby/setup-ruby@5f19ec79cedfadb78ab837f95b87734d0003c899 # v1.173.0
with:
ruby-version: '3.0'
bundler: none
Expand All @@ -120,7 +120,7 @@ jobs:
--host wasm32-unknown-wasi \
--with-baseruby=$PWD/../baseruby/install/bin/ruby \
--with-static-linked-ext \
--with-ext=bigdecimal,cgi/escape,continuation,coverage,date,dbm,digest/bubblebabble,digest,digest/md5,digest/rmd160,digest/sha1,digest/sha2,etc,fcntl,fiber,gdbm,json,json/generator,json/parser,nkf,objspace,pathname,racc/cparse,rbconfig/sizeof,ripper,stringio,strscan,monitor \
--with-ext=cgi/escape,continuation,coverage,date,digest/bubblebabble,digest,digest/md5,digest/rmd160,digest/sha1,digest/sha2,etc,fcntl,json,json/generator,json/parser,objspace,pathname,rbconfig/sizeof,ripper,stringio,strscan,monitor \
LDFLAGS=" \
-Xlinker --stack-first \
-Xlinker -z -Xlinker stack-size=16777216 \
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -91,21 +91,21 @@ jobs:
${{ steps.find-tools.outputs.needs }}
if: ${{ steps.find-tools.outputs.needs != '' }}

- uses: ruby/setup-ruby@d4526a55538b775af234ba4af27118ed6f8f6677 # v1.172.0
- uses: ruby/setup-ruby@5f19ec79cedfadb78ab837f95b87734d0003c899 # v1.173.0
with:
ruby-version: '3.0'
bundler: none
windows-toolchain: none

- uses: actions/cache@ab5e6d0c87105b4c9c2047343972218f562e4319 # v4.0.1
- uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4.0.2
with:
path: C:\vcpkg\downloads
key: ${{ runner.os }}-vcpkg-download-${{ env.OS_VER }}-${{ github.sha }}
restore-keys: |
${{ runner.os }}-vcpkg-download-${{ env.OS_VER }}-
${{ runner.os }}-vcpkg-download-
- uses: actions/cache@ab5e6d0c87105b4c9c2047343972218f562e4319 # v4.0.1
- uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4.0.2
with:
path: C:\vcpkg\installed
key: ${{ runner.os }}-vcpkg-installed-${{ env.OS_VER }}-${{ github.sha }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/yjit-ubuntu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ jobs:
if: ${{ matrix.rust_version }}
run: rustup install ${{ matrix.rust_version }} --profile minimal

- uses: ruby/setup-ruby@d4526a55538b775af234ba4af27118ed6f8f6677 # v1.172.0
- uses: ruby/setup-ruby@5f19ec79cedfadb78ab837f95b87734d0003c899 # v1.173.0
with:
ruby-version: '3.0'
bundler: none
Expand Down
1 change: 1 addition & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,7 @@ matrix:
fast_finish: true

before_script:
- lscpu
- ./autogen.sh
- mkdir build
- cd build
Expand Down
11 changes: 7 additions & 4 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Note that each entry is kept to a minimum, see links for details.
as if they were frozen. If they are mutated a deprecation warning is emited.
These warnings can be enabled with `-W:deprecated` or by setting `Warning[:deprecated] = true`.
To disable this change you can run Ruby with the `--disable-frozen-string-literal` command line
argument. [Feature #20205]
argument. [[Feature #20205]]

* `it` is added to reference a block parameter. [[Feature #18980]]

Expand All @@ -31,7 +31,7 @@ Note: We're only listing outstanding class updates.
* Exception

* Exception#set_backtrace now accepts arrays of `Thread::Backtrace::Location`.
`Kernel#raise`, `Thread#raise` and `Fiber#raise` also accept this new format. [Feature #13557]
`Kernel#raise`, `Thread#raise` and `Fiber#raise` also accept this new format. [[Feature #13557]]

## Stdlib updates

Expand All @@ -45,7 +45,8 @@ The following default gems are updated.
* irb 1.12.0
* net-http 0.4.1
* prism 0.24.0
* reline 0.5.0.pre.1
* rdoc 6.6.3.1
* reline 0.5.0
* resolv 0.4.0
* stringio 3.1.1
* strscan 3.1.1
Expand Down Expand Up @@ -74,7 +75,7 @@ The following bundled gems are promoted from default gems.
* drb 2.2.1
* nkf 0.2.0
* syslog 0.1.2
* csv 3.2.8
* csv 3.3.0

See GitHub releases like [GitHub Releases of Logger](https://github.com/ruby/logger/releases) or changelog for details of the default gems or bundled gems.

Expand Down Expand Up @@ -108,11 +109,13 @@ See GitHub releases like [GitHub Releases of Logger](https://github.com/ruby/log

## JIT

[Feature #13557]: https://bugs.ruby-lang.org/issues/13557
[Feature #16495]: https://bugs.ruby-lang.org/issues/16495
[Feature #18980]: https://bugs.ruby-lang.org/issues/18980
[Feature #19117]: https://bugs.ruby-lang.org/issues/19117
[Bug #19918]: https://bugs.ruby-lang.org/issues/19918
[Bug #20064]: https://bugs.ruby-lang.org/issues/20064
[Feature #20182]: https://bugs.ruby-lang.org/issues/20182
[Feature #20205]: https://bugs.ruby-lang.org/issues/20205
[Bug #20218]: https://bugs.ruby-lang.org/issues/20218
[Feature #20265]: https://bugs.ruby-lang.org/issues/20265
11 changes: 9 additions & 2 deletions common.mk
Original file line number Diff line number Diff line change
Expand Up @@ -471,8 +471,6 @@ ruby.imp: $(COMMONOBJS)
$(Q){ \
$(NM) -Pgp $(COMMONOBJS) | \
awk 'BEGIN{print "#!"}; $$2~/^[A-TV-Z]$$/&&$$1!~/^$(SYMBOL_PREFIX)(Init_|InitVM_|ruby_static_id_|.*_threadptr_|rb_ec_)|^\./{print $$1}'; \
($(CHDIR) $(srcdir) && \
exec sed -n '/^RJIT_FUNC_EXPORTED/!d;N;s/.*\n\(rb_[a-zA-Z_0-9]*\).*/$(SYMBOL_PREFIX)\1/p' cont.c gc.c thread*c vm*.c) \
} | \
sort -u -o $@

Expand Down Expand Up @@ -1007,6 +1005,15 @@ yes-test-spec: yes-test-spec-precheck
$(ACTIONS_ENDGROUP)
no-test-spec:

test-prism-spec: $(TEST_RUNNABLE)-test-prism-spec
yes-test-prism-spec: yes-test-spec-precheck
$(ACTIONS_GROUP)
$(gnumake_recursive)$(Q) \
$(RUNRUBY) -r./$(arch)-fake -r$(tooldir)/rubyspec_temp \
$(srcdir)/spec/mspec/bin/mspec run -B $(srcdir)/spec/default.mspec -B $(srcdir)/spec/prism.mspec $(MSPECOPT) $(SPECOPTS)
$(ACTIONS_ENDGROUP)
no-test-prism-spec:

check: $(DOT_WAIT) test-spec

RUNNABLE = $(LIBRUBY_RELATIVE:no=un)-runnable
Expand Down
Loading

0 comments on commit 5c54b74

Please sign in to comment.