Skip to content

chore: bump deno_core 0.368.0 → 0.412.0 (v8 142.1.0 → 150.4.0) - #10

Merged
imfing merged 2 commits into
mainfrom
chore/bump-deno-core
Sep 30, 2026
Merged

imfing merged 2 commits into
mainfrom
chore/bump-deno-core

Conversation

@imfing

@imfing imfing commented Sep 30, 2026 •

Copy link
Copy Markdown
Owner

Summary

Two related changes:

  1. Bump deno_core across 44 releases (0.368.0 → 0.412.0), moving V8 from 142.1.0 to 150.4.0.
  2. Add the Build V8 archive workflow (workflow_dispatch-only) that prebuilds rusty_v8 from source and publishes it as release assets — so after this merges, the archive for v150.4.0 can be built once and reused by all future wheel builds.

deno_core API migrations

  • op2 macro: the bare #[op2(async)] flag was removed upstream (async(...) now requires an explicit lazy/deferred/fake mode). Our async ops return Result<impl Future>, which the macro now auto-detects as eager async — declared with plain #[op2].
  • PollEventLoopOptions: pump_v8_message_loop field removed (pumping is unconditional now).
  • InspectorSessionProxy: tx/rx moved into the new InspectorSessionChannels::Regular variant.

The dependency graph now goes through the new deno_v8 wrapper crate, but the underlying v8 (rusty_v8) crate and its build script are unchanged.

Behavioral fix (caught by tests)

deno_core now captures a tokio runtime handle at isolate creation to honor delayed V8 foreground tasks (e.g. GC memory-reducer tasks) and aborts the process if such a task is posted from an isolate created outside a tokio context. tests/test_runtime.py::test_sync_eval_triggers_heap_termination reproduced the abort reliably under heap pressure.

Fixes:

  • spawn_runtime_thread now creates RuntimeCoreState (and thus the JsRuntime) inside a scoped tokio_rt.enter() guard.
  • SnapshotBuilder gets its own current-thread tokio runtime, entered during JsRuntimeForSnapshot creation and kept alive alongside the isolate.

V8 archive workflow

.github/workflows/build-v8-archive.yml + .github/scripts/build-v8-archive.sh:

  • Manual dispatch only; runs on free GitHub runners (both jobs on ubuntu-latest: x86_64 builds natively, aarch64 cross-compiles via the existing Dockerfile.aarch64).
  • Reuses the existing manylinux_2_28 builder containers and the v8 git-tag patch (version read dynamically from Cargo.lock, so it stays in sync with bumps like this one).
  • Publishes librusty_v8_release_{target}.a.gz + src_binding_release_{target}.rs to a prerelease tagged librusty_v8-v{version} (deliberately not matching the v* pattern that triggers release CI).
  • Frees ~25–30GB of runner disk first (V8 needs ~25GB; free runners start with ~14GB).

Why from source at all: denoland's prebuilt archives require glibc ≥ 2.30 (pthread_cond_clockwait), while manylinux_2_28 wheels must link against glibc 2.28.

A follow-up PR will switch wheel CI to consume these archives via RUSTY_V8_ARCHIVE/RUSTY_V8_SRC_BINDING_PATH, removing the per-release V8 compile and the GCP spot-VM provisioning.

Testing

Full Python suite passes locally: 291 tests. cargo fmt and clippy clean (aside from the pre-existing result_large_err warning). The archive workflow itself needs a trial dispatch after merge — expected ~2.5–4h per arch on free runners; if V8 150.x needs a newer clang than the containers' clang-19, that run will surface it.

Suggested sequencing

  1. Merge this PR.
  2. Dispatch Build V8 archive from main → publishes librusty_v8-v150.4.0.
  3. Follow-up PR reworks wheel CI to consume the archives on free runners (retiring the GCP jobs).

API migrations:
- op2 macro: bare async flag removed; eager async ops returning
  Result<impl Future> are now declared with plain #[op2]
- PollEventLoopOptions: pump_v8_message_loop field removed
- InspectorSessionProxy: tx/rx moved into
  InspectorSessionChannels::Regular

Behavioral change: deno_core now captures a tokio runtime handle at
isolate creation to honor delayed V8 foreground tasks (GC memory
reducer), aborting the process when one is posted without a handle.
Create the runtime-thread isolate inside tokio_rt.enter(), and give
SnapshotBuilder its own tokio runtime kept alive alongside the
snapshot isolate.
Builds rusty_v8 from source inside the existing manylinux_2_28 builder
containers on free GitHub runners (x86_64 native, aarch64 cross) and
publishes librusty_v8_release_{target}.a.gz + src_binding_release_
{target}.rs as assets on a librusty_v8-v{version} prerelease.

This only needs to run when the v8 version in Cargo.lock changes;
wheel CI will consume the archives via RUSTY_V8_ARCHIVE /
RUSTY_V8_SRC_BINDING_PATH in a follow-up, removing the per-release
V8 compile and the GCP runner provisioning.

Why from source at all: denoland's prebuilt archives require
glibc >= 2.30 (pthread_cond_clockwait) while manylinux_2_28 wheels
must link against glibc 2.28.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant