Skip to content

build: enable Temporal by default#61806

Open
richardlau wants to merge 2 commits intonodejs:mainfrom
richardlau:enable-temporal
Open

build: enable Temporal by default#61806
richardlau wants to merge 2 commits intonodejs:mainfrom
richardlau:enable-temporal

Conversation

@richardlau
Copy link
Copy Markdown
Member

Enabling Temporal support requires cargo and rustc, which are new build toolchain requirements.

Add a --v8-disable-temporal-support option to configure.py to explicitly opt-out of Temporal support (i.e. no need for Rust).

If the existing --v8-enable-temporal-support option is not explicitly passed to configure.py:

  • Attempt to detect cargo and rustc.
  • If neither cargo and rustc are detected, print a warning and disable Temporal support.
  • If both cargo and rustc are detected, enable Temporal support.

If --v8-enable-temporal-support is passed to configure.py, then the build will error and stop if cargo and/or rustc are not detected.

To avoid ambiguity, configure.py will error and stop if both --v8-disable-temporal-support and --v8-enable-temporal-support are used.

Fixes: #57127


Blocked on either of the V8 updates (14.4 or 14.5) landing first.

Autodetecting this way allows us to roll out Rust onto the CI machines gradually (the aim is for Node.js 26).

@richardlau richardlau added the blocked PRs that are blocked by other issues or PRs. label Feb 13, 2026
@nodejs-github-bot nodejs-github-bot added build Issues and PRs related to build files or the CI. needs-ci PRs that need a full CI run. labels Feb 13, 2026
@richardlau richardlau added the semver-major PRs that contain breaking changes and should be released in the next major version. label Feb 13, 2026
@targos
Copy link
Copy Markdown
Member

targos commented Feb 13, 2026

  • If neither cargo and rustc are detected, print a warning and disable Temporal support.
  • If both cargo and rustc are detected, enable Temporal support.

Does it mean that we might inadvertently introduce or remove Temporal in releases by touching release machines (i.e. after system updates)?

@richardlau
Copy link
Copy Markdown
Member Author

  • If neither cargo and rustc are detected, print a warning and disable Temporal support.
  • If both cargo and rustc are detected, enable Temporal support.

Does it mean that we might inadvertently introduce or remove Temporal in releases by touching release machines (i.e. after system updates)?

A regular system update should not put either cargo or rustc on it if it is not already there (at least on a Linux distribution) but a system upgrade might.

If consensus is to remove the autodetection (i.e. the default build will fail in environments where rust is not available) then enabling Temporal in Node.js by default will be blocked until all of the test and release infrastructure for Node.js 26 is updated.

@legendecas
Copy link
Copy Markdown
Member

legendecas commented Feb 13, 2026

Can we specify --v8-enable-temporal-support on release machine on platforms that we are determined to enable the support? So configure.py will error out if somehow the rustc/cargo is missing.

@richardlau
Copy link
Copy Markdown
Member Author

Can we specify --v8-enable-temporal-support on release machine on platforms that we are determined to enable the support? So configure.py will error out if somehow the rustc/cargo is missing.

It can be done but the job is generic for all release lines so would be a little untidy (basically a conditional based on the major version as otherwise configure will fail on earlier release lines with --v8-enable-temporal-support).

Copy link
Copy Markdown
Member

@mcollina mcollina left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@legendecas legendecas added dont-land-on-v20.x PRs that should not land on the v20.x-staging branch and should not be released in v20.x. dont-land-on-v22.x PRs that should not land on the v22.x-staging branch and should not be released in v22.x. dont-land-on-v24.x PRs that should not land on the v24.x-staging branch and should not be released in v24.x. dont-land-on-v25.x PRs that should not land on the v25.x-staging branch and should not be released in v25.x. labels Feb 14, 2026
@mcollina mcollina added the notable-change PRs with changes that should be highlighted in changelogs. label Feb 20, 2026
@github-actions
Copy link
Copy Markdown
Contributor

The notable-change PRs with changes that should be highlighted in changelogs. label has been added by @mcollina.

Please suggest a text for the release notes if you'd like to include a more detailed summary, then proceed to update the PR description with the text or a link to the notable change suggested text comment. Otherwise, the commit will be placed in the Other Notable Changes section.

@legendecas legendecas removed dont-land-on-v20.x PRs that should not land on the v20.x-staging branch and should not be released in v20.x. dont-land-on-v22.x PRs that should not land on the v22.x-staging branch and should not be released in v22.x. dont-land-on-v24.x PRs that should not land on the v24.x-staging branch and should not be released in v24.x. dont-land-on-v25.x PRs that should not land on the v25.x-staging branch and should not be released in v25.x. labels Mar 11, 2026
@legendecas
Copy link
Copy Markdown
Member

(Removing unnecessary labels I added earlier, given that this is already semver-major)

Copy link
Copy Markdown
Member

@avivkeller avivkeller left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🙌

@richardlau
Copy link
Copy Markdown
Member Author

Looks like the Temporal gyp isn't happy being cross compiled?

e.g. https://ci.nodejs.org/job/node-compile-windows/65959/nodes=win-vs2022_clang-arm64/console

gyp: Dependency 'C:\workspace\node-compile-windows\node\deps\crates\crates.gyp:temporal_capi#host' not found while trying to load target C:\workspace\node-compile-windows\node\tools\v8_gypfiles\v8.gyp:v8_initializers_slow#host

@StefanStojanovic
Copy link
Copy Markdown
Contributor

Looks like the Temporal gyp isn't happy being cross compiled?

e.g. https://ci.nodejs.org/job/node-compile-windows/65959/nodes=win-vs2022_clang-arm64/console

gyp: Dependency 'C:\workspace\node-compile-windows\node\deps\crates\crates.gyp:temporal_capi#host' not found while trying to load target C:\workspace\node-compile-windows\node\tools\v8_gypfiles\v8.gyp:v8_initializers_slow#host

Not the only problem, even when the configuration passed, the compilation failed on x64 with

22:03:14 lld-link : error : could not open '..\..\out\Release\obj\global_intermediate\release\node_crates.lib': no such file or directory [C:\workspace\node-compile-windows\node\tools\v8_gypfiles\mksnapshot.vcxproj]

I'll investigate this more on Monday. I was able to reproduce both failures on my machine. Potentially, I'll need to make some more changes in the CI too (maybe I didn't install everything needed, etc.). Will have some updates on this on Monday.

@StefanStojanovic
Copy link
Copy Markdown
Contributor

@richardlau, here's my update - I have a fix in my branch. It should be 1 commit ahead of your branch. I've also run it through the CI to verify it compiles (test failure is unrelated flaky test).

Regarding the fix, it adds some Windows-specific behavior, which was needed mostly for cross-compilation. x64 compilation was broken too, but that was mostly because of the way I installed Rust initially (switched to Rustup afterward). As a result, I'll also have to change my PR in the build repo.

If you want, you can apply my patch on top of your branch, or we can open a PR to your branch (if someone else should review it as well), or pick any other approach to adding the fix to this PR. I'm fine with whatever as long as it gets Windows CI passing.

@richardlau
Copy link
Copy Markdown
Member Author

@StefanStojanovic Thanks. I'll pull the commit into this branch since I will need to update this PR anyway for more edge build failures (neither of which are Windows specific):

  1. V8 fails to build Temporal classes without ICU (configure --with-intl=none).
  2. V8 fails to build with shared ICU due to use of a private ICU header (@aduh95 applies a temporary V8 patch in https://github.com/nodejs/node/pull/62508/files#diff-89a9a4423f9b83142d44bfb376f2c56ffff396ee1ef98c4930a61d5ed9732c7f for the nix builds).

@richardlau richardlau force-pushed the enable-temporal branch 2 times, most recently from d7a94df to f53c479 Compare April 8, 2026 18:27
@richardlau
Copy link
Copy Markdown
Member Author

@StefanStojanovic Thanks. I'll pull the commit into this branch since I will need to update this PR anyway for more edge build failures (neither of which are Windows specific):

  1. V8 fails to build Temporal classes without ICU (configure --with-intl=none).
  2. V8 fails to build with shared ICU due to use of a private ICU header (@aduh95 applies a temporary V8 patch in https://github.com/nodejs/node/pull/62508/files#diff-89a9a4423f9b83142d44bfb376f2c56ffff396ee1ef98c4930a61d5ed9732c7f for the nix builds).

I've added @StefanStojanovic 's commit to this PR, and made configure disable Temporal support if --with-intl=none or --without-intl is specified since Temporal relies on ICU to function.

Haven't yet decided what to do about 2. above yet -- maybe the simplest would be to disable Temporal by default when shared ICU is being used for now and possibly look at enabling Temporal in that configuration later?

@nodejs-github-bot
Copy link
Copy Markdown
Collaborator

@aduh95
Copy link
Copy Markdown
Contributor

aduh95 commented Apr 8, 2026

Temporal relies on ICU to function.

That's not correct, I'm able to build --without-intl with the same patch – of course, only the subset of the spec that doesn't deal with time zones work in that case, but it's also the case with --with-intl=small

@richardlau
Copy link
Copy Markdown
Member Author

Temporal relies on ICU to function.

That's not correct, I'm able to build --without-intl with the same patch – of course, only the subset of the spec that doesn't deal with time zones work in that case, but it's also the case with --with-intl=small

Okay, Fair point.

I've undone the most recent fixup and applied the patch from https://github.com/nodejs/node/pull/62508/files#diff-89a9a4423f9b83142d44bfb376f2c56ffff396ee1ef98c4930a61d5ed9732c7f as a separate commit in this PR (with @aduh95 as co-author). Ideally this would be solved upstream in V8 (maybe someone can help there?).

@richardlau
Copy link
Copy Markdown
Member Author

hmm. While the patch to V8 fixed the --without-intl build, it appears to have broken the default builds (on GHA) 😞. I'll look again during a more sensible hour of the day after getting some sleep.

Enabling Temporal support requires `cargo` and `rustc`, which are new
build toolchain requirements.

Add a `--v8-disable-temporal-support` option to `configure.py` to
explicitly opt-out of Temporal support (i.e. no need for Rust).

If the existing `--v8-enable-temporal-support` option is not explicitly
passed to `configure.py`:
- Attempt to detect `cargo` and `rustc`.
- If neither `cargo` and `rustc` are detected, print a warning and
  disable Temporal support.
- If both `cargo` and `rustc` are detected, enable Temporal support.

If `--v8-enable-temporal-support` is passed to `configure.py`, then
the build will error and stop if `cargo` and/or `rustc` are not
detected.

To avoid ambiguity, `configure.py` will error and stop if both
`--v8-disable-temporal-support` and `--v8-enable-temporal-support` are
used.

Signed-off-by: Richard Lau <richard.lau@ibm.com>
@richardlau
Copy link
Copy Markdown
Member Author

I've decided to open a separate issue for the build failures when using --with-intl=none or --with-intl=system-icu: #62676

This PR will focus on cargo/rust autodetection and enabling Temporal by default if neither --v8-enable-temporal-support nor --v8-disable-temporal-support is given to configure. If either of those options is specified, configure will attempt to honour them (even if it would ultimately result in a build failure (it might not if you patch V8 yourself)).

This would allow us to have Temporal available for the binaries that go up on the website, and enable for the shared/no ICU builds separately.

@nodejs-github-bot
Copy link
Copy Markdown
Collaborator

@legendecas legendecas added the author ready PRs that have at least one approval, no pending requests for changes, and a CI started. label Apr 11, 2026
@richardlau richardlau added commit-queue-rebase Add this label to allow the Commit Queue to land a PR in several commits. commit-queue Add this label to land a pull request using GitHub Actions. labels Apr 13, 2026
@nodejs-github-bot nodejs-github-bot added commit-queue-failed An error occurred while landing this pull request using GitHub Actions. and removed commit-queue Add this label to land a pull request using GitHub Actions. labels Apr 13, 2026
@nodejs-github-bot
Copy link
Copy Markdown
Collaborator

Commit Queue failed
- Loading data for nodejs/node/pull/61806
✔  Done loading data for nodejs/node/pull/61806
----------------------------------- PR info ------------------------------------
Title      build: enable Temporal by default (#61806)
   ⚠  Could not retrieve the email or name of the PR author's from user's GitHub profile!
Branch     richardlau:enable-temporal -> nodejs:main
Labels     semver-major, build, notable-change, author ready, needs-ci, commit-queue-rebase
Commits    2
 - build,win: fix Temporal build
 - build: enable Temporal by default
Committers 1
 - Richard Lau <richard.lau@ibm.com>
PR-URL: https://github.com/nodejs/node/pull/61806
Fixes: https://github.com/nodejs/node/issues/57127
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Aviv Keller <me@aviv.sh>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
------------------------------ Generated metadata ------------------------------
PR-URL: https://github.com/nodejs/node/pull/61806
Fixes: https://github.com/nodejs/node/issues/57127
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Aviv Keller <me@aviv.sh>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
--------------------------------------------------------------------------------
   ℹ  This PR was created on Fri, 13 Feb 2026 18:36:01 GMT
   ✔  Approvals: 9
   ✔  - Matteo Collina (@mcollina) (TSC): https://github.com/nodejs/node/pull/61806#pullrequestreview-3799356614
   ✔  - Colin Ihrig (@cjihrig): https://github.com/nodejs/node/pull/61806#pullrequestreview-3801982887
   ✔  - Michaël Zasso (@targos) (TSC): https://github.com/nodejs/node/pull/61806#pullrequestreview-3801994015
   ✔  - Chengzhong Wu (@legendecas) (TSC): https://github.com/nodejs/node/pull/61806#pullrequestreview-4093347278
   ✔  - Anna Henningsen (@addaleax): https://github.com/nodejs/node/pull/61806#pullrequestreview-3831874154
   ✔  - Juan José Arboleda (@juanarbol): https://github.com/nodejs/node/pull/61806#pullrequestreview-3845221881
   ✔  - James M Snell (@jasnell) (TSC): https://github.com/nodejs/node/pull/61806#pullrequestreview-3971773184
   ✔  - Aviv Keller (@avivkeller): https://github.com/nodejs/node/pull/61806#pullrequestreview-3971843332
   ✔  - Antoine du Hamel (@aduh95) (TSC): https://github.com/nodejs/node/pull/61806#pullrequestreview-4092102105
   ✔  Last GitHub CI successful
   ℹ  Last Full PR CI on 2026-04-10T17:16:30Z: https://ci.nodejs.org/job/node-test-pull-request/72610/
- Querying data for job/node-test-pull-request/72610/
✔  Build data downloaded
   ✔  Last Jenkins CI successful
--------------------------------------------------------------------------------
   ✔  No git cherry-pick in progress
   ✔  No git am in progress
   ✔  No git rebase in progress
--------------------------------------------------------------------------------
- Bringing origin/main up to date...
From https://github.com/nodejs/node
 * branch                  main       -> FETCH_HEAD
✔  origin/main is now up-to-date
- Downloading patch for 61806
From https://github.com/nodejs/node
 * branch                  refs/pull/61806/merge -> FETCH_HEAD
✔  Fetched commits as f01905ac0140..4fffe5ebc3c4
--------------------------------------------------------------------------------
[main 58082e5a78] build,win: fix Temporal build
 Author: StefanStojanovic <stefan.stojanovic@janeasystems.com>
 Date: Mon Apr 6 21:29:57 2026 +0200
 3 files changed, 133 insertions(+), 18 deletions(-)
 create mode 100644 deps/crates/cargo_build.py
[main c71e0ae5fe] build: enable Temporal by default
 Author: Richard Lau <richard.lau@ibm.com>
 Date: Fri Apr 10 17:05:24 2026 +0000
 1 file changed, 61 insertions(+), 20 deletions(-)
   ✔  Patches applied
There are 2 commits in the PR. Attempting autorebase.
(node:359) [DEP0190] DeprecationWarning: Passing args to a child process with shell option true can lead to security vulnerabilities, as the arguments are not escaped, only concatenated.
(Use `node --trace-deprecation ...` to show where the warning was created)
Rebasing (2/4)
Executing: git node land --amend --yes
--------------------------------- New Message ----------------------------------
PR-URL: https://github.com/nodejs/node/pull/61806
Fixes: https://github.com/nodejs/node/issues/57127
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Aviv Keller <me@aviv.sh>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
--------------------------------------------------------------------------------
[detached HEAD 1a87984eb4] PR-URL: https://github.com/nodejs/node/pull/61806 Fixes: https://github.com/nodejs/node/issues/57127 Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Chengzhong Wu <legendecas@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Aviv Keller <me@aviv.sh> Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
 Author: StefanStojanovic <stefan.stojanovic@janeasystems.com>
 Date: Mon Apr 6 21:29:57 2026 +0200
 3 files changed, 133 insertions(+), 18 deletions(-)
 create mode 100644 deps/crates/cargo_build.py
Rebasing (3/4)
Rebasing (4/4)
Executing: git node land --amend --yes
--------------------------------- New Message ----------------------------------
build: enable Temporal by default

Enabling Temporal support requires cargo and rustc, which are new
build toolchain requirements.

Add a --v8-disable-temporal-support option to configure.py to
explicitly opt-out of Temporal support (i.e. no need for Rust).

If the existing --v8-enable-temporal-support option is not explicitly
passed to configure.py:

  • Attempt to detect cargo and rustc.
  • If neither cargo and rustc are detected, print a warning and
    disable Temporal support.
  • If both cargo and rustc are detected, enable Temporal support.

If --v8-enable-temporal-support is passed to configure.py, then
the build will error and stop if cargo and/or rustc are not
detected.

To avoid ambiguity, configure.py will error and stop if both
--v8-disable-temporal-support and --v8-enable-temporal-support are
used.

Signed-off-by: Richard Lau <richard.lau@ibm.com>
PR-URL: #61806
Fixes: #57127
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Aviv Keller <me@aviv.sh>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>

[detached HEAD b9c16571a1] build: enable Temporal by default
Author: Richard Lau <richard.lau@ibm.com>
Date: Fri Apr 10 17:05:24 2026 +0000
1 file changed, 61 insertions(+), 20 deletions(-)
Successfully rebased and updated refs/heads/main.

✖ 1a87984eb462d0fcb28c93bbfaad60535f056267
✔ 0:0 no Co-authored-by metadata co-authored-by-is-trailer
✔ 0:7 Valid fixes URL. fixes-url
✖ 1:0 blank line expected after title line-after-title
✔ 0:0 line-lengths are valid line-length
✔ 0:0 metadata is at end of message metadata-end
✖ 0:0 Commit must have a PR-URL. pr-url
✔ 0:0 reviewers are valid reviewers
✖ 0:0 Invalid subsystem: "PR-URL" subsystem
✔ 0:0 Title is formatted correctly. title-format
✔ 0:0 Title is <= 50 columns. title-length
✔ b9c16571a17e2eb6ade5abd04b1b0d46c3cce4df
✔ 0:0 no Co-authored-by metadata co-authored-by-is-trailer
✔ 24:7 Valid fixes URL. fixes-url
✔ 0:0 blank line after title line-after-title
✔ 0:0 line-lengths are valid line-length
✔ 0:0 metadata is at end of message metadata-end
✔ 23:8 PR-URL is valid. pr-url
✔ 0:0 reviewers are valid reviewers
✔ 0:0 valid subsystems subsystem
✔ 0:0 Title is formatted correctly. title-format
✔ 0:0 Title is <= 50 columns. title-length
ℹ Please fix the commit message and try again.
Please manually ammend the commit message, by running
git commit --amend
Once commit message is fixed, finish the landing command running
git node land --continue

https://github.com/nodejs/node/actions/runs/24345020035

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

author ready PRs that have at least one approval, no pending requests for changes, and a CI started. build Issues and PRs related to build files or the CI. commit-queue-failed An error occurred while landing this pull request using GitHub Actions. commit-queue-rebase Add this label to allow the Commit Queue to land a PR in several commits. needs-ci PRs that need a full CI run. notable-change PRs with changes that should be highlighted in changelogs. semver-major PRs that contain breaking changes and should be released in the next major version.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Let's enable Temporal by default