From 751b6c8a957773f8cce705950a414b3b456705af Mon Sep 17 00:00:00 2001 From: Sam Saffron Date: Wed, 4 Sep 2024 16:13:48 +1000 Subject: [PATCH 01/20] stop pinning the version of mini_racer in CI --- .github/workflows/build.yml | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 4e3dee4..6c248b8 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -338,10 +338,6 @@ jobs: export BUNDLE_FORCE_RUBY_PLATFORM=y git clone https://github.com/rubyjs/mini_racer.git test/mini_racer --depth 1 cd test/mini_racer - git fetch origin refs/pull/299/head - git checkout FETCH_HEAD - git reset --hard - git clean -f -d -x ruby -i -ne '$_ =~ /^\s+LIBV8_NODE_VERSION/ ? print(" LIBV8_NODE_VERSION = \"${{ needs.build-ruby.outputs.GEM_VERSION }}\"\n") : print' lib/mini_racer/version.rb ruby -i -ne '$_ =~ /spec.required_ruby_version/ ? "" : print' mini_racer.gemspec bundle install @@ -374,10 +370,6 @@ jobs: run: | git clone https://github.com/rubyjs/mini_racer.git test/mini_racer --depth 1 cd test/mini_racer - git fetch origin refs/pull/299/head - git checkout FETCH_HEAD - git reset --hard - git clean -f -d -x ruby -i -ne '$_ =~ /^\s+LIBV8_NODE_VERSION/ ? print(" LIBV8_NODE_VERSION = \"${{ needs.build-darwin.outputs.GEM_VERSION }}\"\n") : print' lib/mini_racer/version.rb ruby -i -ne '$_ =~ /spec.required_ruby_version/ ? "" : print' mini_racer.gemspec bundle install @@ -458,10 +450,6 @@ jobs: run: | git clone https://github.com/rubyjs/mini_racer.git test/mini_racer --depth 1 cd test/mini_racer - git fetch origin refs/pull/299/head - git checkout FETCH_HEAD - git reset --hard - git clean -f -d -x ruby -i -ne '$_ =~ /^\s+LIBV8_NODE_VERSION/ ? print(" LIBV8_NODE_VERSION = \"${{ needs.build-linux.outputs.GEM_VERSION }}\"\n") : print' lib/mini_racer/version.rb ruby -i -ne '$_ =~ /spec.required_ruby_version/ ? "" : print' mini_racer.gemspec docker exec -w "${PWD}" ${{ steps.container.outputs.id }} bundle install From 07f3beb3eaf3512d2ce5ec24e9429290b38eb55c Mon Sep 17 00:00:00 2001 From: Ben Noordhuis Date: Thu, 5 Sep 2024 10:15:47 +0200 Subject: [PATCH 02/20] Disable incremental and concurrent marking Test if a segfault that shows up in production is the result of incremental marking at an inopportune time. --- libexec/extract-node | 1 + patch/v8-disable-marking.patch | 22 ++++++++++++++++++++++ 2 files changed, 23 insertions(+) create mode 100644 patch/v8-disable-marking.patch diff --git a/libexec/extract-node b/libexec/extract-node index d2bd205..3c62fb7 100755 --- a/libexec/extract-node +++ b/libexec/extract-node @@ -35,6 +35,7 @@ cd "${src}/node-v${version}" patch -p1 < "${top}"/patch/v8-no-assert-trivially-copyable.patch patch -p1 < "${top}"/patch/v8-disable-madv-dontfork.patch patch -p1 < "${top}"/patch/v8-disable-pkey.patch +patch -p1 < "${top}"/patch/v8-disable-marking.patch # TODO: the following still fails on py3 so the above one forcing py2 is needed # patch -p1 < ../../py3-genv8constants.patch diff --git a/patch/v8-disable-marking.patch b/patch/v8-disable-marking.patch new file mode 100644 index 0000000..32973a9 --- /dev/null +++ b/patch/v8-disable-marking.patch @@ -0,0 +1,22 @@ +diff --git a/deps/v8/src/flags/flag-definitions.h b/deps/v8/src/flags/flag-definitions.h +index 0d50ac1522..2854768562 100644 +--- a/deps/v8/src/flags/flag-definitions.h ++++ b/deps/v8/src/flags/flag-definitions.h +@@ -1764,7 +1764,7 @@ DEFINE_BOOL(minor_ms_trace_fragmentation, false, + DEFINE_BOOL(trace_evacuation, false, "report evacuation statistics") + DEFINE_BOOL(trace_mutator_utilization, false, + "print mutator utilization, allocation speed, gc speed") +-DEFINE_BOOL(incremental_marking, true, "use incremental marking") ++DEFINE_BOOL(incremental_marking, false, "use incremental marking") + DEFINE_BOOL(incremental_marking_bailout_when_ahead_of_schedule, true, + "bails out of incremental marking when ahead of schedule") + DEFINE_BOOL(incremental_marking_task, true, "use tasks for incremental marking") +@@ -1794,7 +1794,7 @@ DEFINE_IMPLICATION(cppgc_young_generation, minor_ms) + DEFINE_NEG_IMPLICATION(cppgc_young_generation, reclaim_unmodified_wrappers) + DEFINE_BOOL(optimize_gc_for_battery, false, "optimize GC for battery") + #if defined(V8_ATOMIC_OBJECT_FIELD_WRITES) +-DEFINE_BOOL(concurrent_marking, true, "use concurrent marking") ++DEFINE_BOOL(concurrent_marking, false, "use concurrent marking") + #else + // Concurrent marking cannot be used without atomic object field loads and + // stores. From 0f0f90a09044fb0ce464f027d8617ee00af57ecb Mon Sep 17 00:00:00 2001 From: Sam Saffron Date: Thu, 5 Sep 2024 20:10:41 +1000 Subject: [PATCH 03/20] bump version number (so we get new gems) --- lib/libv8/node/version.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/libv8/node/version.rb b/lib/libv8/node/version.rb index ee03597..6590bd6 100644 --- a/lib/libv8/node/version.rb +++ b/lib/libv8/node/version.rb @@ -4,7 +4,7 @@ module Libv8 end module Libv8::Node - VERSION = '22.7.0.1' + VERSION = '22.7.0.2' NODE_VERSION = '22.7.0' LIBV8_VERSION = '12.4.254.21' # from src/node-.../deps/v8/include/v8-version.h end From 28ddde7099be78c93a53040e3b8bdc28797ac26c Mon Sep 17 00:00:00 2001 From: Ben Noordhuis Date: Fri, 6 Sep 2024 09:17:32 +0200 Subject: [PATCH 04/20] Disable Maglev compiler tier Maglev is the suspected cause of a segfault originating from the snapshot. The crash happens in DoComputeOutputFrames and maglev-code-generator.cc is the only compiler that calls that. --- libexec/build-libv8 | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/libexec/build-libv8 b/libexec/build-libv8 index 309c8e9..941c221 100755 --- a/libexec/build-libv8 +++ b/libexec/build-libv8 @@ -17,7 +17,9 @@ BUILDTYPE="${BUILDTYPE:-Release}" cd "${src}/node-v${version}" -configure_flags='--openssl-no-asm --without-npm --shared --with-intl=full-icu' +# Maglev is disabled because of a suspected x64 snapshot regression in +# DoComputeOutputFrames +configure_flags='--v8-disable-maglev --openssl-no-asm --without-npm --shared --with-intl=full-icu' eval "$("${libexec}/platform")" echo "configure: ${configure_flags}" From c424a54d3e7fe0e4ba26306513e6d7b6cdd167e0 Mon Sep 17 00:00:00 2001 From: Sam Saffron Date: Sat, 7 Sep 2024 09:41:58 +1000 Subject: [PATCH 05/20] bump version so we can build a new mini racer --- lib/libv8/node/version.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/libv8/node/version.rb b/lib/libv8/node/version.rb index 6590bd6..4afcd60 100644 --- a/lib/libv8/node/version.rb +++ b/lib/libv8/node/version.rb @@ -4,7 +4,7 @@ module Libv8 end module Libv8::Node - VERSION = '22.7.0.2' + VERSION = '22.7.0.3' NODE_VERSION = '22.7.0' LIBV8_VERSION = '12.4.254.21' # from src/node-.../deps/v8/include/v8-version.h end From 14d04590c259ff6988f67a8a5c5494463a7aad72 Mon Sep 17 00:00:00 2001 From: Ben Noordhuis Date: Fri, 13 Sep 2024 20:19:52 +0200 Subject: [PATCH 06/20] Build with clang instead of gcc We may be hitting a compiler bug that is causing segfaults in production so see if switching compilers makes the problem go away. --- libexec/build-libv8 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libexec/build-libv8 b/libexec/build-libv8 index 941c221..128ef20 100755 --- a/libexec/build-libv8 +++ b/libexec/build-libv8 @@ -43,4 +43,4 @@ if [ "$host_platform" != "$target_platform" ] && [ "${target_platform%%-*}" = "a fi export PATH="${PWD}/out/tools/bin:${PATH}" -make -j"${NJOBS}" -C out BUILDTYPE="${BUILDTYPE}" V=0 +make -j"${NJOBS}" -C out BUILDTYPE="${BUILDTYPE}" V=0 CC=clang CC.host=clang CXX=clang++ CXX.host=clang++ From a0510000b1c277aee145d4b18974cb537e34c9f2 Mon Sep 17 00:00:00 2001 From: Ben Noordhuis Date: Fri, 13 Sep 2024 20:24:09 +0200 Subject: [PATCH 07/20] squash! upgrade {upload,dowload}-artifact --- .github/workflows/build.yml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 6c248b8..ee43946 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -68,7 +68,7 @@ jobs: run: | bundle exec rake build - name: Upload gem - uses: actions/upload-artifact@v1 + uses: actions/upload-artifact@v4 with: name: gem-${{ steps.set-metadata.outputs.GEM_VERSION }}-ruby path: pkg @@ -135,12 +135,12 @@ jobs: run: | bundle exec rake binary - name: Upload V8 - uses: actions/upload-artifact@v1 + uses: actions/upload-artifact@v4 with: name: v8-${{ steps.set-metadata.outputs.LIBV8_VERSION }}-${{ steps.set-metadata.outputs.GEM_PLATFORM }} path: vendor - name: Upload gem - uses: actions/upload-artifact@v1 + uses: actions/upload-artifact@v4 with: name: gem-${{ steps.set-metadata.outputs.GEM_VERSION }}-${{ steps.set-metadata.outputs.GEM_PLATFORM }} path: pkg @@ -274,12 +274,12 @@ jobs: run: | docker exec -w "${PWD}" ${{ steps.container.outputs.id }} bundle exec rake binary[${{ steps.platform.outputs.ruby_target_platform }}] - name: Upload V8 - uses: actions/upload-artifact@v1 + uses: actions/upload-artifact@v4 with: name: v8-${{ steps.set-metadata.outputs.LIBV8_VERSION }}-${{ steps.platform.outputs.ruby_target_platform }} path: vendor - name: Upload gem - uses: actions/upload-artifact@v1 + uses: actions/upload-artifact@v4 with: name: gem-${{ steps.set-metadata.outputs.GEM_VERSION }}-${{ steps.platform.outputs.ruby_target_platform }} path: pkg @@ -327,7 +327,7 @@ jobs: ruby -e 'puts Gem.platforms.last.to_s' | tee gem_platform echo "::set-output name=GEM_PLATFORM::$(cat gem_platform)" - name: Download a single artifact - uses: actions/download-artifact@v2 + uses: actions/download-artifact@v4 with: name: gem-${{ needs.build-ruby.outputs.GEM_VERSION }}-ruby path: pkg @@ -360,7 +360,7 @@ jobs: ruby -e 'puts Gem.platforms.last.to_s.gsub(/-darwin-?\d+/, "-darwin")' | tee gem_platform echo "::set-output name=GEM_PLATFORM::$(cat gem_platform)" - name: Download a single artifact - uses: actions/download-artifact@v2 + uses: actions/download-artifact@v4 with: name: gem-${{ needs.build-darwin.outputs.GEM_VERSION }}-${{ steps.set-metadata.outputs.GEM_PLATFORM }} path: pkg @@ -440,7 +440,7 @@ jobs: docker exec -w "${PWD}" ${{ steps.container.outputs.id }} ruby -e 'puts Gem::Platform.local.tap { |p| RUBY_PLATFORM =~ /musl/ && p.version.nil? and p.instance_eval { @version = "musl" } }.to_s' | tee gem_platform echo "::set-output name=GEM_PLATFORM::$(cat gem_platform)" - name: Download a single artifact - uses: actions/download-artifact@v2 + uses: actions/download-artifact@v4 with: name: gem-${{ needs.build-linux.outputs.GEM_VERSION }}-${{ steps.set-metadata.outputs.GEM_PLATFORM }} path: pkg From 19d6513b2ef663e540f9f54f202f4d9b3a484e59 Mon Sep 17 00:00:00 2001 From: Sam Saffron Date: Sat, 14 Sep 2024 09:28:08 +1000 Subject: [PATCH 08/20] bump version, so we can try a new mini_racer build --- lib/libv8/node/version.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/libv8/node/version.rb b/lib/libv8/node/version.rb index 4afcd60..824a990 100644 --- a/lib/libv8/node/version.rb +++ b/lib/libv8/node/version.rb @@ -4,7 +4,7 @@ module Libv8 end module Libv8::Node - VERSION = '22.7.0.3' + VERSION = '22.7.0.4' NODE_VERSION = '22.7.0' LIBV8_VERSION = '12.4.254.21' # from src/node-.../deps/v8/include/v8-version.h end From 951f0acb6b6c91d2026eace3b5459d25b2b3d833 Mon Sep 17 00:00:00 2001 From: Sam Saffron Date: Sat, 14 Sep 2024 09:40:32 +1000 Subject: [PATCH 09/20] build on Ruby 3.1 instead of Ruby instead of 2.7 which is EOL --- .github/workflows/build.yml | 4 ++-- Dockerfile | 2 +- Makefile.docker | 8 ++++---- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index ee43946..f388fbc 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -204,10 +204,10 @@ jobs: run: | case ${{ matrix.libc }} in gnu) - echo 'ruby:2.7' + echo 'ruby:3.1' ;; musl) - echo 'ruby:2.7-alpine' + echo 'ruby:3.1-alpine' ;; esac | tee container_image echo "::set-output name=image::$(cat container_image)" diff --git a/Dockerfile b/Dockerfile index f625509..0f9cc7c 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -ARG RUBY_VERSION=2.7 +ARG RUBY_VERSION=3.1 FROM ruby:${RUBY_VERSION} RUN test ! -f /etc/alpine-release || apk add --no-cache build-base bash python3 git curl tar ccache clang diff --git a/Makefile.docker b/Makefile.docker index 0532ea4..5e67e45 100644 --- a/Makefile.docker +++ b/Makefile.docker @@ -21,19 +21,19 @@ test/linux: test/$(subst arm64,aarch64,$(CPU))-linux test/linux-musl: test/$(subst arm64,aarch64,$(CPU))-linux-musl pkg/libv8-node-$(VERSION)-x86_64-linux.gem: - docker buildx build --platform linux/amd64 --build-arg RUBY_VERSION=2.7 --build-arg NODE_VERSION=$(NODE_VERSION) --progress plain -t libv8-node:$(VERSION)-gnu . + docker buildx build --platform linux/amd64 --build-arg RUBY_VERSION=3.1 --build-arg NODE_VERSION=$(NODE_VERSION) --progress plain -t libv8-node:$(VERSION)-gnu . docker run --platform linux/amd64 --rm -it -v "$(PWD)/pkg":/pkg libv8-node:$(VERSION)-gnu cp $@ /pkg/ pkg/libv8-node-$(VERSION)-x86_64-linux-musl.gem: - docker buildx build --platform linux/amd64 --build-arg RUBY_VERSION=2.7-alpine --build-arg NODE_VERSION=$(NODE_VERSION) --progress plain -t libv8-node:$(VERSION)-musl . + docker buildx build --platform linux/amd64 --build-arg RUBY_VERSION=3.1-alpine --build-arg NODE_VERSION=$(NODE_VERSION) --progress plain -t libv8-node:$(VERSION)-musl . docker run --platform linux/amd64 --rm -it -v "$(PWD)/pkg":/pkg libv8-node:$(VERSION)-musl cp $@ /pkg/ pkg/libv8-node-$(VERSION)-aarch64-linux.gem: - docker buildx build --platform linux/arm64 --build-arg RUBY_VERSION=2.7 --build-arg NODE_VERSION=$(NODE_VERSION) --progress plain -t libv8-node:$(VERSION)-gnu . + docker buildx build --platform linux/arm64 --build-arg RUBY_VERSION=3.1 --build-arg NODE_VERSION=$(NODE_VERSION) --progress plain -t libv8-node:$(VERSION)-gnu . docker run --platform linux/arm64 --rm -it -v "$(PWD)/pkg":/pkg libv8-node:$(VERSION)-gnu cp $@ /pkg/ pkg/libv8-node-$(VERSION)-aarch64-linux-musl.gem: - docker buildx build --platform linux/arm64 --build-arg RUBY_VERSION=2.7-alpine --build-arg NODE_VERSION=$(NODE_VERSION) --progress plain -t libv8-node:$(VERSION)-musl . + docker buildx build --platform linux/arm64 --build-arg RUBY_VERSION=3.1-alpine --build-arg NODE_VERSION=$(NODE_VERSION) --progress plain -t libv8-node:$(VERSION)-musl . docker run --platform linux/arm64 --rm -it -v "$(PWD)/pkg":/pkg libv8-node:$(VERSION)-musl cp $@ /pkg/ test/x86_64-linux: pkg/libv8-node-$(VERSION)-x86_64-linux.gem From 8a594240ee30a6172b121ab85614085f892d203a Mon Sep 17 00:00:00 2001 From: Sam Saffron Date: Sat, 14 Sep 2024 15:35:09 +1000 Subject: [PATCH 10/20] try v3 instead of v4, seeing a weird error uploading artifacts https://github.com/actions/upload-artifact/issues/478 --- .github/workflows/build.yml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index f388fbc..18a2b29 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -68,7 +68,7 @@ jobs: run: | bundle exec rake build - name: Upload gem - uses: actions/upload-artifact@v4 + uses: actions/upload-artifact@v3 with: name: gem-${{ steps.set-metadata.outputs.GEM_VERSION }}-ruby path: pkg @@ -135,12 +135,12 @@ jobs: run: | bundle exec rake binary - name: Upload V8 - uses: actions/upload-artifact@v4 + uses: actions/upload-artifact@v3 with: name: v8-${{ steps.set-metadata.outputs.LIBV8_VERSION }}-${{ steps.set-metadata.outputs.GEM_PLATFORM }} path: vendor - name: Upload gem - uses: actions/upload-artifact@v4 + uses: actions/upload-artifact@v3 with: name: gem-${{ steps.set-metadata.outputs.GEM_VERSION }}-${{ steps.set-metadata.outputs.GEM_PLATFORM }} path: pkg @@ -274,12 +274,12 @@ jobs: run: | docker exec -w "${PWD}" ${{ steps.container.outputs.id }} bundle exec rake binary[${{ steps.platform.outputs.ruby_target_platform }}] - name: Upload V8 - uses: actions/upload-artifact@v4 + uses: actions/upload-artifact@v3 with: name: v8-${{ steps.set-metadata.outputs.LIBV8_VERSION }}-${{ steps.platform.outputs.ruby_target_platform }} path: vendor - name: Upload gem - uses: actions/upload-artifact@v4 + uses: actions/upload-artifact@v3 with: name: gem-${{ steps.set-metadata.outputs.GEM_VERSION }}-${{ steps.platform.outputs.ruby_target_platform }} path: pkg @@ -327,7 +327,7 @@ jobs: ruby -e 'puts Gem.platforms.last.to_s' | tee gem_platform echo "::set-output name=GEM_PLATFORM::$(cat gem_platform)" - name: Download a single artifact - uses: actions/download-artifact@v4 + uses: actions/download-artifact@v3 with: name: gem-${{ needs.build-ruby.outputs.GEM_VERSION }}-ruby path: pkg @@ -360,7 +360,7 @@ jobs: ruby -e 'puts Gem.platforms.last.to_s.gsub(/-darwin-?\d+/, "-darwin")' | tee gem_platform echo "::set-output name=GEM_PLATFORM::$(cat gem_platform)" - name: Download a single artifact - uses: actions/download-artifact@v4 + uses: actions/download-artifact@v3 with: name: gem-${{ needs.build-darwin.outputs.GEM_VERSION }}-${{ steps.set-metadata.outputs.GEM_PLATFORM }} path: pkg @@ -440,7 +440,7 @@ jobs: docker exec -w "${PWD}" ${{ steps.container.outputs.id }} ruby -e 'puts Gem::Platform.local.tap { |p| RUBY_PLATFORM =~ /musl/ && p.version.nil? and p.instance_eval { @version = "musl" } }.to_s' | tee gem_platform echo "::set-output name=GEM_PLATFORM::$(cat gem_platform)" - name: Download a single artifact - uses: actions/download-artifact@v4 + uses: actions/download-artifact@v3 with: name: gem-${{ needs.build-linux.outputs.GEM_VERSION }}-${{ steps.set-metadata.outputs.GEM_PLATFORM }} path: pkg From 7249c5d4ddedea049fa2b8005bd89877ad570887 Mon Sep 17 00:00:00 2001 From: Sam Saffron Date: Sat, 14 Sep 2024 19:11:23 +1000 Subject: [PATCH 11/20] trying to convince container to use clang --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 0f9cc7c..32ddc54 100644 --- a/Dockerfile +++ b/Dockerfile @@ -2,7 +2,7 @@ ARG RUBY_VERSION=3.1 FROM ruby:${RUBY_VERSION} RUN test ! -f /etc/alpine-release || apk add --no-cache build-base bash python3 git curl tar ccache clang -RUN test -f /etc/alpine-release || (apt-get update && apt-get install -y ccache) +RUN test -f /etc/alpine-release || (apt-get update && apt-get install -y ccache clang) ENV CCACHE_DIR=/ccache RUN gem update --system 3.3.26 && gem install bundler -v '~> 2.3.26' From 655fbea86890df5d98557cf54e069b112c04521e Mon Sep 17 00:00:00 2001 From: Sam Saffron Date: Sat, 14 Sep 2024 19:23:32 +1000 Subject: [PATCH 12/20] try to force linux on to clang --- libexec/platform | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/libexec/platform b/libexec/platform index 91343aa..74ea826 100755 --- a/libexec/platform +++ b/libexec/platform @@ -98,10 +98,10 @@ if [ "${host_platform}" != "${target_platform}" ]; then configure_flags='--dest-cpu=arm --cross-compiling --dest-os=linux --with-arm-float-abi=hard --with-arm-fpu=neon' ;; x86_64-*linux*) - CC='x86_64-linux-gnu-gcc' - CXX='x86_64-linux-gnu-g++' - CC_host='gcc' - CXX_host='g++' + CC='clang -arch x86_64' + CXX='clang++ -arch x86_64' + CC_host='clang' + CXX_host='clang++' STRIP='x86_64-linux-gnu-strip' configure_flags='--dest-cpu=x86_64 --cross-compiling --dest-os=linux' ;; From ae3c15056342c68b70e1d73a799249939d865628 Mon Sep 17 00:00:00 2001 From: Sam Saffron Date: Mon, 16 Sep 2024 11:52:09 +1000 Subject: [PATCH 13/20] set-output is derprecated, seeing if this corrects an issue in build darwin --- .github/workflows/build.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 18a2b29..fd173c4 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -95,15 +95,15 @@ jobs: id: set-metadata run: | ./libexec/metadata ruby_platform | tee ruby_platform - echo "::set-output name=RUBY_PLATFORM::$(cat ruby_platform)" + echo "RUBY_PLATFORM=$(cat ruby_platform)" >> $GITHUB_OUTPUT ./libexec/metadata gem_platform | tee gem_platform - echo "::set-output name=GEM_PLATFORM::$(cat gem_platform)" + echo "GEM_PLATFORM=$(cat gem_platform)" >> $GITHUB_OUTPUT ./libexec/metadata gem_version | tee gem_version - echo "::set-output name=GEM_VERSION::$(cat gem_version)" + echo "GEM_VERSION=$(cat gem_version)" >> $GITHUB_OUTPUT ./libexec/metadata node_version | tee node_version - echo "::set-output name=NODE_VERSION::$(cat node_version)" + echo "NODE_VERSION=$(cat node_version)" >> $GITHUB_OUTPUT ./libexec/metadata libv8_version | tee libv8_version - echo "::set-output name=LIBV8_VERSION::$(cat libv8_version)" + echo "LIBV8_VERSION=$(cat libv8_version)" >> $GITHUB_OUTPUT - name: Download Node.js run: | ./libexec/download-node ${{ steps.set-metadata.outputs.NODE_VERSION }} From cb6779938318294a97900f13ccc3f78d4ea66be9 Mon Sep 17 00:00:00 2001 From: Sam Saffron Date: Mon, 16 Sep 2024 12:01:01 +1000 Subject: [PATCH 14/20] This may work... our build is running in docker and a x86 vm is compiling an ARM binary --- .github/workflows/build.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index fd173c4..661ceb2 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -95,9 +95,9 @@ jobs: id: set-metadata run: | ./libexec/metadata ruby_platform | tee ruby_platform - echo "RUBY_PLATFORM=$(cat ruby_platform)" >> $GITHUB_OUTPUT + echo "RUBY_PLATFORM=$RUBY_TARGET_PLATFORM" >> $GITHUB_OUTPUT ./libexec/metadata gem_platform | tee gem_platform - echo "GEM_PLATFORM=$(cat gem_platform)" >> $GITHUB_OUTPUT + echo "GEM_PLATFORM=$TARGET_PLATFORM" >> $GITHUB_OUTPUT ./libexec/metadata gem_version | tee gem_version echo "GEM_VERSION=$(cat gem_version)" >> $GITHUB_OUTPUT ./libexec/metadata node_version | tee node_version From 309d2efcb92c1d2a14ffe155016c4ec94c3e431b Mon Sep 17 00:00:00 2001 From: Ben Noordhuis Date: Thu, 19 Sep 2024 20:16:32 +0200 Subject: [PATCH 15/20] Update to node 22.9.0 (#62) Note the V8 version didn't change between 22.7.0 and 22.9.0 although Node.js did add a new API in https://github.com/nodejs/node/pull/54279 Remove unused and/or unnecessary patches. Upstream disabled Maglev so we no longer have to do that manually. The genv8constants.py patches were for a script that I removed upstream last year. --- lib/libv8/node/version.rb | 4 +- libexec/build-libv8 | 2 +- libexec/extract-node | 17 +------- patch/gyp-libv8_monolith.patch | 44 -------------------- patch/py2-genv8constants.patch | 10 ----- patch/py2-icutrim.patch | 14 ------- patch/py3-genv8constants.patch | 20 --------- patch/v8-disable-marking.patch | 22 ---------- patch/v8-no-assert-trivially-copyable.patch | 14 ------- patch/v8-std-is-trivially-destructible.patch | 22 ++++++++++ sums/v22.9.0.sum | 1 + 11 files changed, 27 insertions(+), 143 deletions(-) delete mode 100644 patch/gyp-libv8_monolith.patch delete mode 100644 patch/py2-genv8constants.patch delete mode 100644 patch/py2-icutrim.patch delete mode 100644 patch/py3-genv8constants.patch delete mode 100644 patch/v8-disable-marking.patch delete mode 100644 patch/v8-no-assert-trivially-copyable.patch create mode 100644 patch/v8-std-is-trivially-destructible.patch create mode 100644 sums/v22.9.0.sum diff --git a/lib/libv8/node/version.rb b/lib/libv8/node/version.rb index 824a990..80a093f 100644 --- a/lib/libv8/node/version.rb +++ b/lib/libv8/node/version.rb @@ -4,7 +4,7 @@ module Libv8 end module Libv8::Node - VERSION = '22.7.0.4' - NODE_VERSION = '22.7.0' + VERSION = '22.9.0.0' + NODE_VERSION = '22.9.0' LIBV8_VERSION = '12.4.254.21' # from src/node-.../deps/v8/include/v8-version.h end diff --git a/libexec/build-libv8 b/libexec/build-libv8 index 128ef20..f19b58f 100755 --- a/libexec/build-libv8 +++ b/libexec/build-libv8 @@ -19,7 +19,7 @@ cd "${src}/node-v${version}" # Maglev is disabled because of a suspected x64 snapshot regression in # DoComputeOutputFrames -configure_flags='--v8-disable-maglev --openssl-no-asm --without-npm --shared --with-intl=full-icu' +configure_flags='--openssl-no-asm --without-npm --shared --with-intl=full-icu' eval "$("${libexec}/platform")" echo "configure: ${configure_flags}" diff --git a/libexec/extract-node b/libexec/extract-node index 3c62fb7..61b5b2a 100755 --- a/libexec/extract-node +++ b/libexec/extract-node @@ -29,21 +29,6 @@ extract "${src}" "${src}/node-v${version}.tar.gz" cd "${src}/node-v${version}" -#patch -p1 < "${top}"/patch/gyp-libv8_monolith.patch -#patch -p1 < "${top}"/patch/py2-icutrim.patch -#patch -p1 < "${top}"/patch/py2-genv8constants.patch -patch -p1 < "${top}"/patch/v8-no-assert-trivially-copyable.patch +patch -p1 < "${top}"/patch/v8-std-is-trivially-destructible.patch patch -p1 < "${top}"/patch/v8-disable-madv-dontfork.patch patch -p1 < "${top}"/patch/v8-disable-pkey.patch -patch -p1 < "${top}"/patch/v8-disable-marking.patch - -# TODO: the following still fails on py3 so the above one forcing py2 is needed -# patch -p1 < ../../py3-genv8constants.patch -# -# This is the error: -# -# Traceback (most recent call last): -# File "tools/genv8constants.py", line 99, in -# curr_val += int('0x%s' % octetstr, 16) << (curr_octet * 8) -# ValueError: invalid literal for int() with base 16: "0xb'04 '" -# node_dtrace_ustack.target.mk:13: recipe for target '/usbkey/user_home/vagrant/ruby-libv8-node/src/node-14.14.0/out/Release/obj/gen/v8constants.h' failed diff --git a/patch/gyp-libv8_monolith.patch b/patch/gyp-libv8_monolith.patch deleted file mode 100644 index af99a51..0000000 --- a/patch/gyp-libv8_monolith.patch +++ /dev/null @@ -1,44 +0,0 @@ ---- a/node.gyp 2020-11-04 15:55:48.000000000 +0100 -+++ b/node.gyp 2020-11-04 15:55:51.000000000 +0100 -@@ -1467,6 +1467,16 @@ - }], - ], - }, # node_mksnapshot -+ { -+ 'target_name': 'libv8_monolith', -+ 'type': 'none', -+ 'includes': [ -+ 'node.gypi' -+ ], -+ #'dependencies': [ -+ # 'tools/v8_gypfiles/v8.gyp:v8_monolith', -+ #], -+ }, - ], # end targets - - 'conditions': [ ---- a/tools/v8_gypfiles/v8.gyp 2020-11-04 16:34:06.000000000 +0100 -+++ b/tools/v8_gypfiles/v8.gyp 2020-11-04 16:34:10.000000000 +0100 -@@ -1726,5 +1726,21 @@ - '<(V8_ROOT)/third_party/zlib/google/compression_utils_portable.h', - ], - }, # v8_zlib -+ { -+ 'target_name': 'v8_monolith', -+ 'type': 'static_library', -+ 'sources': [ -+ ':')) --v8dbg = re.compile(bytes('^v8dbg.*$')) --numpattern = re.compile(bytes('^[0-9a-fA-F]{2} $')) -+if str == bytes: -+ pattern = re.compile(bytes('([0-9a-fA-F]{8}|[0-9a-fA-F]{16}) <(.*)>:')) -+ v8dbg = re.compile(bytes('^v8dbg.*$')) -+ numpattern = re.compile(bytes('^[0-9a-fA-F]{2} $')) -+else: -+ pattern = re.compile(bytes('([0-9a-fA-F]{8}|[0-9a-fA-F]{16}) <(.*)>:', 'utf-8')) -+ v8dbg = re.compile(bytes('^v8dbg.*$', 'utf-8')) -+ numpattern = re.compile(bytes('^[0-9a-fA-F]{2} $', 'utf-8')) - octets = 4 - - outfile.write(""" diff --git a/patch/v8-disable-marking.patch b/patch/v8-disable-marking.patch deleted file mode 100644 index 32973a9..0000000 --- a/patch/v8-disable-marking.patch +++ /dev/null @@ -1,22 +0,0 @@ -diff --git a/deps/v8/src/flags/flag-definitions.h b/deps/v8/src/flags/flag-definitions.h -index 0d50ac1522..2854768562 100644 ---- a/deps/v8/src/flags/flag-definitions.h -+++ b/deps/v8/src/flags/flag-definitions.h -@@ -1764,7 +1764,7 @@ DEFINE_BOOL(minor_ms_trace_fragmentation, false, - DEFINE_BOOL(trace_evacuation, false, "report evacuation statistics") - DEFINE_BOOL(trace_mutator_utilization, false, - "print mutator utilization, allocation speed, gc speed") --DEFINE_BOOL(incremental_marking, true, "use incremental marking") -+DEFINE_BOOL(incremental_marking, false, "use incremental marking") - DEFINE_BOOL(incremental_marking_bailout_when_ahead_of_schedule, true, - "bails out of incremental marking when ahead of schedule") - DEFINE_BOOL(incremental_marking_task, true, "use tasks for incremental marking") -@@ -1794,7 +1794,7 @@ DEFINE_IMPLICATION(cppgc_young_generation, minor_ms) - DEFINE_NEG_IMPLICATION(cppgc_young_generation, reclaim_unmodified_wrappers) - DEFINE_BOOL(optimize_gc_for_battery, false, "optimize GC for battery") - #if defined(V8_ATOMIC_OBJECT_FIELD_WRITES) --DEFINE_BOOL(concurrent_marking, true, "use concurrent marking") -+DEFINE_BOOL(concurrent_marking, false, "use concurrent marking") - #else - // Concurrent marking cannot be used without atomic object field loads and - // stores. diff --git a/patch/v8-no-assert-trivially-copyable.patch b/patch/v8-no-assert-trivially-copyable.patch deleted file mode 100644 index 2148c14..0000000 --- a/patch/v8-no-assert-trivially-copyable.patch +++ /dev/null @@ -1,14 +0,0 @@ -diff --git a/deps/v8/src/base/small-vector.h b/deps/v8/src/base/small-vector.h -index edaab3a7a6..533a536178 100644 ---- a/deps/v8/src/base/small-vector.h -+++ b/deps/v8/src/base/small-vector.h -@@ -20,9 +20,6 @@ namespace base { - // dynamic storage when it overflows. - template > - class SmallVector { -- // Currently only support trivially copyable and trivially destructible data -- // types, as it uses memcpy to copy elements and never calls destructors. -- ASSERT_TRIVIALLY_COPYABLE(T); - static_assert(std::is_trivially_destructible::value); - - public: diff --git a/patch/v8-std-is-trivially-destructible.patch b/patch/v8-std-is-trivially-destructible.patch new file mode 100644 index 0000000..1da7be0 --- /dev/null +++ b/patch/v8-std-is-trivially-destructible.patch @@ -0,0 +1,22 @@ +diff --git a/deps/v8/src/base/macros.h b/deps/v8/src/base/macros.h +index d404b6120a..053ac0e5ba 100644 +--- a/deps/v8/src/base/macros.h ++++ b/deps/v8/src/base/macros.h +@@ -173,7 +173,7 @@ namespace base { + // base::is_trivially_copyable will differ for these cases. + template + struct is_trivially_copyable { +-#if V8_CC_MSVC || (__GNUC__ == 12 && __GNUC_MINOR__ <= 2) ++#if V8_CC_MSVC || (__GNUC__ == 12 && __GNUC_MINOR__ <= 2) || defined(__clang__) + // Unfortunately, MSVC 2015 is broken in that std::is_trivially_copyable can + // be false even though it should be true according to the standard. + // (status at 2018-02-26, observed on the msvc waterfall bot). +@@ -186,6 +186,8 @@ struct is_trivially_copyable { + // distributions, so the same polyfill is also used. + // See + // https://gcc.gnu.org/git/?p=gcc.git;a=commitdiff;h=aeba3e009b0abfccaf01797556445dbf891cc8dc ++ // ++ // The same is observed with at least clang 14 and 15. + static constexpr bool value = + // Copy constructor is trivial or deleted. + (std::is_trivially_copy_constructible::value || diff --git a/sums/v22.9.0.sum b/sums/v22.9.0.sum new file mode 100644 index 0000000..0f710d9 --- /dev/null +++ b/sums/v22.9.0.sum @@ -0,0 +1 @@ +296854aa1dca140b0462c2415637d0419e42af91114538a7e6fdf623971a6833 From 5a35928abe7e6b6ced2518a3736d19a2fb59737b Mon Sep 17 00:00:00 2001 From: Ben Noordhuis Date: Fri, 4 Oct 2024 10:31:49 +0200 Subject: [PATCH 16/20] Fix hang in V8 debug builds This is a partial cherry-pick of upstream commit v8/v8@8953e49478. Shows up in debug builds because of a buggy sanity check when computing relationships between command line flags. Example of the hang: #include "v8.h" #include "libplatform/libplatform.h" int main(void) { // works: v8::V8::SetFlagsFromString("--gc-global --noincremental-marking"); v8::V8::SetFlagsFromString("--gc-global"); v8::V8::SetFlagsFromString("--noincremental-marking"); v8::V8::InitializePlatform(v8::platform::NewDefaultPlatform().release()); v8::V8::Initialize(); // hangs in ComputeFlagListHash when defined(DEBUG) } --- libexec/extract-node | 1 + patch/v8-debug-flags-hang.patch | 26 ++++++++++++++++++++++++++ 2 files changed, 27 insertions(+) create mode 100644 patch/v8-debug-flags-hang.patch diff --git a/libexec/extract-node b/libexec/extract-node index 61b5b2a..2fed7c6 100755 --- a/libexec/extract-node +++ b/libexec/extract-node @@ -32,3 +32,4 @@ cd "${src}/node-v${version}" patch -p1 < "${top}"/patch/v8-std-is-trivially-destructible.patch patch -p1 < "${top}"/patch/v8-disable-madv-dontfork.patch patch -p1 < "${top}"/patch/v8-disable-pkey.patch +patch -p1 < "${top}"/patch/v8-debug-flags-hang.patch diff --git a/patch/v8-debug-flags-hang.patch b/patch/v8-debug-flags-hang.patch new file mode 100644 index 0000000..ddfb218 --- /dev/null +++ b/patch/v8-debug-flags-hang.patch @@ -0,0 +1,26 @@ +diff --git a/deps/v8/src/flags/flags-impl.h b/deps/v8/src/flags/flags-impl.h +index d2d440c026..111b9b5b9c 100644 +--- a/deps/v8/src/flags/flags-impl.h ++++ b/deps/v8/src/flags/flags-impl.h +@@ -5,6 +5,8 @@ + #ifndef V8_FLAGS_FLAGS_IMPL_H_ + #define V8_FLAGS_FLAGS_IMPL_H_ + ++#include ++ + #include "src/base/macros.h" + #include "src/base/optional.h" + #include "src/base/vector.h" +@@ -91,9 +93,12 @@ struct Flag { + #ifdef DEBUG + bool ImpliedBy(const void* ptr) const { + const Flag* current = this->implied_by_ptr_; ++ std::unordered_set visited_flags; + while (current != nullptr) { ++ visited_flags.insert(current); + if (current->PointsTo(ptr)) return true; + current = current->implied_by_ptr_; ++ if (visited_flags.contains(current)) break; + } + return false; + } From fde85c5315e08ea8fbaf5ac3a3102a2e84afd510 Mon Sep 17 00:00:00 2001 From: Ben Noordhuis Date: Fri, 4 Oct 2024 10:39:12 +0200 Subject: [PATCH 17/20] Strip symbols in release builds only Words cannot describe the rage one feels when you wait 30 minutes for a debug build to compile, only to find out it's been stripped of actual debug symbols. --- libexec/inject-libv8 | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/libexec/inject-libv8 b/libexec/inject-libv8 index 2142e1e..11cec84 100755 --- a/libexec/inject-libv8 +++ b/libexec/inject-libv8 @@ -56,7 +56,9 @@ for lib in libv8_monolith.a; do "$AR" "$AREXTRACTFLAGS" "$BASEDIR/out/${BUILDTYPE}/$lib" # strip all objects - "$FIND" -type f -exec "$STRIP" -Sx {} + + if [ "$BUILDTYPE" = "Release" ]; then + "$FIND" -type f -exec "$STRIP" -Sx {} + + fi # rebuild the archive "$FIND" -type f -exec "$AR" "$ARCOLLECTFLAGS" "../$lib" {} + From f805e37ec5d41ab97a62808e6025a70e4031fcdf Mon Sep 17 00:00:00 2001 From: Ben Noordhuis Date: Thu, 30 Jan 2025 08:56:50 +0100 Subject: [PATCH 18/20] Update to node 22.13.1 (#64) --- .github/workflows/build.yml | 4 ++-- lib/libv8/node/version.rb | 4 ++-- libexec/extract-node | 1 - patch/v8-debug-flags-hang.patch | 26 -------------------------- sums/v22.13.1.sum | 1 + 5 files changed, 5 insertions(+), 31 deletions(-) delete mode 100644 patch/v8-debug-flags-hang.patch create mode 100644 sums/v22.13.1.sum diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 661ceb2..06e8a15 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -82,7 +82,7 @@ jobs: name: Build (darwin) outputs: GEM_VERSION: ${{ steps.set-metadata.outputs.GEM_VERSION }} - runs-on: macos-12 + runs-on: macos-13 env: TARGET_PLATFORM: ${{ matrix.platform }}-darwin RUBY_TARGET_PLATFORM: ${{ matrix.platform }}-darwin @@ -352,7 +352,7 @@ jobs: # arm64 name: Test (darwin) needs: build-darwin - runs-on: macos-12 + runs-on: macos-13 steps: - name: Set metadata id: set-metadata diff --git a/lib/libv8/node/version.rb b/lib/libv8/node/version.rb index 80a093f..bebed4a 100644 --- a/lib/libv8/node/version.rb +++ b/lib/libv8/node/version.rb @@ -4,7 +4,7 @@ module Libv8 end module Libv8::Node - VERSION = '22.9.0.0' - NODE_VERSION = '22.9.0' + VERSION = '22.13.1.0' + NODE_VERSION = '22.13.1' LIBV8_VERSION = '12.4.254.21' # from src/node-.../deps/v8/include/v8-version.h end diff --git a/libexec/extract-node b/libexec/extract-node index 2fed7c6..61b5b2a 100755 --- a/libexec/extract-node +++ b/libexec/extract-node @@ -32,4 +32,3 @@ cd "${src}/node-v${version}" patch -p1 < "${top}"/patch/v8-std-is-trivially-destructible.patch patch -p1 < "${top}"/patch/v8-disable-madv-dontfork.patch patch -p1 < "${top}"/patch/v8-disable-pkey.patch -patch -p1 < "${top}"/patch/v8-debug-flags-hang.patch diff --git a/patch/v8-debug-flags-hang.patch b/patch/v8-debug-flags-hang.patch deleted file mode 100644 index ddfb218..0000000 --- a/patch/v8-debug-flags-hang.patch +++ /dev/null @@ -1,26 +0,0 @@ -diff --git a/deps/v8/src/flags/flags-impl.h b/deps/v8/src/flags/flags-impl.h -index d2d440c026..111b9b5b9c 100644 ---- a/deps/v8/src/flags/flags-impl.h -+++ b/deps/v8/src/flags/flags-impl.h -@@ -5,6 +5,8 @@ - #ifndef V8_FLAGS_FLAGS_IMPL_H_ - #define V8_FLAGS_FLAGS_IMPL_H_ - -+#include -+ - #include "src/base/macros.h" - #include "src/base/optional.h" - #include "src/base/vector.h" -@@ -91,9 +93,12 @@ struct Flag { - #ifdef DEBUG - bool ImpliedBy(const void* ptr) const { - const Flag* current = this->implied_by_ptr_; -+ std::unordered_set visited_flags; - while (current != nullptr) { -+ visited_flags.insert(current); - if (current->PointsTo(ptr)) return true; - current = current->implied_by_ptr_; -+ if (visited_flags.contains(current)) break; - } - return false; - } diff --git a/sums/v22.13.1.sum b/sums/v22.13.1.sum new file mode 100644 index 0000000..60e9fbc --- /dev/null +++ b/sums/v22.13.1.sum @@ -0,0 +1 @@ +e7d5b1e84e7f3c3cebda81e2b138469eef41ba4ecf16a87fd15fc3f7afa3f701 From ad3d89778c736f61761617ce5b5c91d966306f40 Mon Sep 17 00:00:00 2001 From: Ben Noordhuis Date: Tue, 4 Feb 2025 20:40:12 +0100 Subject: [PATCH 19/20] Update to node 23.6.1 (#65) --- .github/workflows/build.yml | 16 ++++++++-------- lib/libv8/node/version.rb | 6 +++--- sums/v23.6.1.sum | 1 + test/gtest/CMakeLists.txt | 4 ++-- 4 files changed, 14 insertions(+), 13 deletions(-) create mode 100644 sums/v23.6.1.sum diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 06e8a15..921d945 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -68,7 +68,7 @@ jobs: run: | bundle exec rake build - name: Upload gem - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: gem-${{ steps.set-metadata.outputs.GEM_VERSION }}-ruby path: pkg @@ -135,12 +135,12 @@ jobs: run: | bundle exec rake binary - name: Upload V8 - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: v8-${{ steps.set-metadata.outputs.LIBV8_VERSION }}-${{ steps.set-metadata.outputs.GEM_PLATFORM }} path: vendor - name: Upload gem - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: gem-${{ steps.set-metadata.outputs.GEM_VERSION }}-${{ steps.set-metadata.outputs.GEM_PLATFORM }} path: pkg @@ -274,12 +274,12 @@ jobs: run: | docker exec -w "${PWD}" ${{ steps.container.outputs.id }} bundle exec rake binary[${{ steps.platform.outputs.ruby_target_platform }}] - name: Upload V8 - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: v8-${{ steps.set-metadata.outputs.LIBV8_VERSION }}-${{ steps.platform.outputs.ruby_target_platform }} path: vendor - name: Upload gem - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: gem-${{ steps.set-metadata.outputs.GEM_VERSION }}-${{ steps.platform.outputs.ruby_target_platform }} path: pkg @@ -327,7 +327,7 @@ jobs: ruby -e 'puts Gem.platforms.last.to_s' | tee gem_platform echo "::set-output name=GEM_PLATFORM::$(cat gem_platform)" - name: Download a single artifact - uses: actions/download-artifact@v3 + uses: actions/download-artifact@v4 with: name: gem-${{ needs.build-ruby.outputs.GEM_VERSION }}-ruby path: pkg @@ -360,7 +360,7 @@ jobs: ruby -e 'puts Gem.platforms.last.to_s.gsub(/-darwin-?\d+/, "-darwin")' | tee gem_platform echo "::set-output name=GEM_PLATFORM::$(cat gem_platform)" - name: Download a single artifact - uses: actions/download-artifact@v3 + uses: actions/download-artifact@v4 with: name: gem-${{ needs.build-darwin.outputs.GEM_VERSION }}-${{ steps.set-metadata.outputs.GEM_PLATFORM }} path: pkg @@ -440,7 +440,7 @@ jobs: docker exec -w "${PWD}" ${{ steps.container.outputs.id }} ruby -e 'puts Gem::Platform.local.tap { |p| RUBY_PLATFORM =~ /musl/ && p.version.nil? and p.instance_eval { @version = "musl" } }.to_s' | tee gem_platform echo "::set-output name=GEM_PLATFORM::$(cat gem_platform)" - name: Download a single artifact - uses: actions/download-artifact@v3 + uses: actions/download-artifact@v4 with: name: gem-${{ needs.build-linux.outputs.GEM_VERSION }}-${{ steps.set-metadata.outputs.GEM_PLATFORM }} path: pkg diff --git a/lib/libv8/node/version.rb b/lib/libv8/node/version.rb index bebed4a..de983fd 100644 --- a/lib/libv8/node/version.rb +++ b/lib/libv8/node/version.rb @@ -4,7 +4,7 @@ module Libv8 end module Libv8::Node - VERSION = '22.13.1.0' - NODE_VERSION = '22.13.1' - LIBV8_VERSION = '12.4.254.21' # from src/node-.../deps/v8/include/v8-version.h + VERSION = '23.6.1.0' + NODE_VERSION = '23.6.1' + LIBV8_VERSION = '12.9.202.28' # from src/node-.../deps/v8/include/v8-version.h end diff --git a/sums/v23.6.1.sum b/sums/v23.6.1.sum new file mode 100644 index 0000000..c61389c --- /dev/null +++ b/sums/v23.6.1.sum @@ -0,0 +1 @@ +35c0f7957085083071fcf01c7eaea953fba98f17afc4d7c189e3ef56925b453c diff --git a/test/gtest/CMakeLists.txt b/test/gtest/CMakeLists.txt index 289bd41..d2360c5 100644 --- a/test/gtest/CMakeLists.txt +++ b/test/gtest/CMakeLists.txt @@ -1,8 +1,8 @@ cmake_minimum_required(VERSION 3.14) project(gtest) -# V8 requires at least C++17 -set(CMAKE_CXX_STANDARD 17) +# V8 requires at least C++20 +set(CMAKE_CXX_STANDARD 20) include(FetchContent) FetchContent_Declare( From 2397d487bc6bbd5227db1adf97a52db706223e68 Mon Sep 17 00:00:00 2001 From: Sam Saffron Date: Mon, 17 Feb 2025 15:24:17 +1100 Subject: [PATCH 20/20] bump node version ... libv8 remains unchanged though --- lib/libv8/node/version.rb | 4 ++-- sums/v23.8.0.sum | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) create mode 100644 sums/v23.8.0.sum diff --git a/lib/libv8/node/version.rb b/lib/libv8/node/version.rb index de983fd..3635851 100644 --- a/lib/libv8/node/version.rb +++ b/lib/libv8/node/version.rb @@ -4,7 +4,7 @@ module Libv8 end module Libv8::Node - VERSION = '23.6.1.0' - NODE_VERSION = '23.6.1' + VERSION = '23.8.0.0' + NODE_VERSION = '23.8.0' LIBV8_VERSION = '12.9.202.28' # from src/node-.../deps/v8/include/v8-version.h end diff --git a/sums/v23.8.0.sum b/sums/v23.8.0.sum new file mode 100644 index 0000000..91411e3 --- /dev/null +++ b/sums/v23.8.0.sum @@ -0,0 +1 @@ +23b5e0b0b6752a21c7af4e2361655a54ad499d3ae06b6f9af1dd311365b8496a