Commit 14e8f5bca4b for nodejs
commit 14e8f5bca4bfac077be1bed9594245bd1ad2bb88
Author: Antoine du Hamel <duhamelantoine1995@gmail.com>
Date: Sun Sep 27 00:45:17 2026 +0200
tools: enable temporal by default in Nix integration
So we can test it with `test-shared.yml`.
Signed-off-by: Antoine du Hamel <duhamelantoine1995@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/66267
Reviewed-By: Filip Skokan <panva.ip@gmail.com>
Reviewed-By: René <contact.9a5d6388@renegade334.me.uk>
diff --git a/.github/workflows/test-shared.yml b/.github/workflows/test-shared.yml
index 4e649448cf0..1a5e9c3261f 100644
--- a/.github/workflows/test-shared.yml
+++ b/.github/workflows/test-shared.yml
@@ -168,7 +168,16 @@ jobs:
extra-nix-flags: |
--arg useSeparateDerivationForV8 true \
${{ matrix.perfetto && '--arg withPerfetto true \' || '\' }}
- ${{ endsWith(matrix.system, '-darwin') && '--arg withAmaro false --arg withLief false --arg withSQLite false --arg withFFI false --arg extraConfigFlags ''["--without-inspector" "--without-node-options"]'' \' || '\' }}
+ ${{ endsWith(matrix.system, '-darwin') && '\
+ --arg withAmaro false \
+ --arg withFFI false \
+ --arg withLief false \
+ --arg withSQLite false \
+ --arg withTemporal false \
+ --arg extraConfigFlags ''[
+ "--without-inspector"
+ "--without-node-options"
+ ]'' \' || '\' }}
secrets:
CACHIX_AUTH_TOKEN: ${{ secrets.CACHIX_AUTH_TOKEN }}
diff --git a/shell.nix b/shell.nix
index 7cfa46e88bb..a1d917bf864 100644
--- a/shell.nix
+++ b/shell.nix
@@ -18,7 +18,7 @@
withSQLite ? true,
withFFI ? true,
withSSL ? true,
- withTemporal ? false,
+ withTemporal ? true,
withPerfetto ? false,
sharedLibDeps ? (
import ./tools/nix/sharedLibDeps.nix {
diff --git a/tools/nix/sharedLibDeps.nix b/tools/nix/sharedLibDeps.nix
index d57ceb4918b..41a406237da 100644
--- a/tools/nix/sharedLibDeps.nix
+++ b/tools/nix/sharedLibDeps.nix
@@ -6,7 +6,7 @@
withSSL ? true,
withFFI ? true,
withPerfetto ? false,
- withTemporal ? false,
+ withTemporal ? true,
}:
{
inherit (pkgs)
diff --git a/tools/nix/temporal-no-vendored-icu.patch b/tools/nix/temporal-no-vendored-icu.patch
deleted file mode 100644
index d9a06b3ce69..00000000000
--- a/tools/nix/temporal-no-vendored-icu.patch
+++ /dev/null
@@ -1,63 +0,0 @@
-diff --git a/deps/v8/src/objects/js-temporal-zoneinfo64.cc b/deps/v8/src/objects/js-temporal-zoneinfo64.cc
-index 99dd3a84c1e..b6b399c10dc 100644
---- a/deps/v8/src/objects/js-temporal-zoneinfo64.cc
-+++ b/deps/v8/src/objects/js-temporal-zoneinfo64.cc
-@@ -11,12 +11,44 @@
- #include "temporal_rs/TimeZone.hpp"
-
- #ifdef V8_INTL_SUPPORT
--#include "udatamem.h"
-+#include "unicode/udata.h"
-+typedef struct {
-+ uint16_t headerSize;
-+ uint8_t magic1;
-+ uint8_t magic2;
-+} MappedData;
-+typedef struct {
-+ MappedData dataHeader;
-+ UDataInfo info;
-+} DataHeader;
-+typedef struct {
-+ void* Lookup;
-+ void* NumEntries;
-+} commonDataFuncs;
-+struct UDataMemory {
-+ const commonDataFuncs *vFuncs; /* Function Pointers for accessing TOC */
-+
-+ const DataHeader *pHeader; /* Header of the memory being described by this */
-+ /* UDataMemory object. */
-+ const void *toc; /* For common memory, table of contents for */
-+ /* the pieces within. */
-+ UBool heapAllocated; /* True if this UDataMemory Object is on the */
-+ /* heap and thus needs to be deleted when closed. */
-+
-+ void *mapAddr; /* For mapped or allocated memory, the start addr. */
-+ /* Only non-null if a close operation should unmap */
-+ /* the associated data. */
-+ void *map; /* Handle, or other data, OS dependent. */
-+ /* Only non-null if a close operation should unmap */
-+ /* the associated data, and additional info */
-+ /* beyond the mapAddr is needed to do that. */
-+ int32_t length; /* Length of the data in bytes; -1 if unknown. */
-+};
- #else
- // Defined in builtins-temporal-zoneinfo64-data.cc, generated by
- // include-file-as-bytes.py
--extern "C" uint32_t zoneinfo64_static_data[];
--extern "C" size_t zoneinfo64_static_data_len;
-+static uint32_t zoneinfo64_static_data[] = {};
-+static size_t zoneinfo64_static_data_len = 0;
- #endif
-
- namespace v8::internal {
-@@ -33,7 +65,7 @@ ZoneInfo64Provider::ZoneInfo64Provider() {
- // NOT udata_getLength: this ignores the header,
- // and we're parsing resb files with the header
- auto length = memory->length;
-- const void* data = udata_getRawMemory(memory);
-+ const void* data = udata_getMemory(memory);
- DCHECK_WITH_MSG(length % 4 == 0, "ICU4C should align udata to uint32_t");
- if (length % 4 != 0) {
- // This really shouldn't happen: ICU4C aligns these files
---
-2.51.0
diff --git a/tools/nix/v8.nix b/tools/nix/v8.nix
index 81617fff809..8b9f1796e06 100644
--- a/tools/nix/v8.nix
+++ b/tools/nix/v8.nix
@@ -25,7 +25,10 @@
let
useSharedAbseil = builtins.elem "--shared-abseil" configureFlags;
useSharedHighway = builtins.elem "--shared-highway" configureFlags;
+ useSharedPerfetto = builtins.elem "--shared-perfetto" configureFlags;
useSharedSimdutf = builtins.elem "--shared-simdutf" configureFlags;
+ useSharedTemporal = builtins.elem "--shared-temporal_capi" configureFlags;
+
src =
let
inherit (lib) fileset;
@@ -50,8 +53,13 @@ let
++ lib.optional (!useSharedHighway) ../../tools/v8_gypfiles/highway.gyp
++ lib.optional (!useSharedSimdutf) ../../tools/v8_gypfiles/simdutf.gyp
++ lib.optional (
- builtins.elem "--with-perfetto" configureFlags
- && !(builtins.elem "--shared-perfetto" configureFlags)
+ if useSharedTemporal then
+ icu == null
+ else
+ !(builtins.elem "--v8-disable-temporal-support" configureFlags)
+ ) ../../deps/crates
+ ++ lib.optional (
+ builtins.elem "--with-perfetto" configureFlags && !useSharedPerfetto
) ../../deps/perfetto
++ lib.optionals (icu != null) [
../../tools/icu/icu_versions.json
@@ -111,14 +119,9 @@ stdenv.mkDerivation (finalAttrs: {
else
"${builtins.elemAt v8Version 0}.${builtins.elemAt v8Version 1}.${builtins.elemAt v8Version 2}.${builtins.elemAt v8Version 3}-${builtins.elemAt v8_embedder_string 0}";
- patches = lib.optional (
- # V8 accesses internal ICU headers and methods in the Temporal files.
- !(builtins.isString icu) && builtins.elem "--v8-enable-temporal-support" configureFlags
- ) ./temporal-no-vendored-icu.patch;
-
# We need to patch tools/gyp/ to work from within Nix sandbox
prePatch = ''
- ${lib.optionalString (builtins.length finalAttrs.patches == 0) "patches=()"}
+ ${lib.optionalString (builtins.length (finalAttrs.patches or [ ]) == 0) "patches=()"}
for patch in ${lib.concatStringsSep " " patches}; do
filtered=$(mktemp)
filterdiff -p1 -i 'tools/gyp/pylib/*' "$patch" > "$filtered"