Skip to content

deps: bump toml 1.x + deno_core 0.400 (v0.5.895) - #744

Merged
proggeramlug merged 1 commit into
mainfrom
deps/toml-1-deno-core-0.400-v2
May 13, 2026
Merged

deps: bump toml 1.x + deno_core 0.400 (v0.5.895)#744
proggeramlug merged 1 commit into
mainfrom
deps/toml-1-deno-core-0.400-v2

Conversation

@proggeramlug

@proggeramlug proggeramlug commented May 13, 2026

Copy link
Copy Markdown
Contributor

Summary

Closes the two dependabot bumps that the v0.5.894 batch (#737) deferred as too-disruptive for a drop-in:

Public FFI surfaces of perry-jsruntime (the #[no_mangle] pub extern "C" functions used by perry-runtime/codegen/commands) are unchanged — the V8 API churn is contained inside the bridge. The #255 re-entrancy escape hatch is preserved byte-for-byte.

Test plan

  • cargo build --release -p perry-jsruntime -p perry-runtime -p perry-stdlib -p perry clean
  • cargo test --release -p perry --bin perry — 152 passed, 0 failed (restores the 7 well_known/validate tests that were red on deps(deps): bump toml from 0.8.23 to 1.1.2+spec-1.1.0 #727)
  • cargo test --release --workspace --exclude perry-ui-{ios,tvos,watchos,visionos,android,windows,gtk4} --exclude perry-jsruntime — 0 failures
  • CI: lint, cargo-test, parity, compile-smoke, api-docs-drift, security-audit, harmonyos-smoke, doc-tests

Notes

perry-jsruntime's own cargo test SIGSEGVs in test_runtime_init — known V8 threading flakiness, pre-existing, already excluded from CI in .github/workflows/test.yml. Not caused by this PR.

Closes #727. Closes #729.

….5.899)

The two bumps that the v0.5.894 batch deferred as too-disruptive.
Addressed with focused migrations.

## toml 1.x

`<toml::Value as FromStr>` (called implicitly by
`.parse::<toml::Value>()`) is no longer a document parser — it now
parses inline values only. Four callsites swapped to
`toml::from_str::<toml::Value>(s)` (still document parser):

- crates/perry/src/commands/compile/well_known.rs:100
- crates/perry/src/commands/run.rs:343,829,1453
- crates/perry/src/commands/native/validate.rs:164

Restores 7 well_known + validate tests and 31 compile-smoke
regressions.

## deno_core 0.400 (v8 0.106 → 147.4.0)

API changes migrated in perry-jsruntime (5 source files + Cargo.toml):

- `v8::HandleScope` → `v8::PinScope<'_,'_>`
- `JsRuntime::handle_scope()` → `deno_core::scope!(scope, &mut runtime)`
- `v8::TryCatch::new(scope)` → `v8::tc_scope!(tc_scope, scope)`
- `Local<v8::String>::write_utf8` → `write_utf8_v2(buf, WriteFlags)`
- `anyhow::Error` → `deno_error::JsErrorBox` for op2 errors
- `extension!`'s `init_ops()` → `init()`
- `ModuleLoader::load` 4 params → 5 (new `ModuleLoadOptions` shape)
- `ModuleLoader::resolve` returns `ModuleLoaderError`

FFI surfaces preserved — perry-runtime/codegen/commands unchanged.

## Stack-limit override removed

Pre-bump `JsRuntimeState::new` called `Isolate::SetStackLimit` via the
Itanium-mangled `_ZN2v87Isolate13SetStackLimitEm` (since v8 0.106
didn't expose it in the Rust bindings). After the bump, calling that
symbol while the isolate is not entered silently exits the process
with exit code 0 — v8 147's stack-guard aborts cleanly instead of
crashing.

That's what was killing the three parity tests
(test_issue_248_phase2_js_interop, test_issue_248_phase2b_js_callback,
test_issue_255_jsruntime_reentrancy) — every test that loaded a .js
module called js_runtime_init → JsRuntimeState::new → silent exit.

Removed the manual override entirely; v8 147 picks a sane default
stack limit from the calling thread's bounds and deno_core::scope!
pins the isolate properly for each work scope.

## Validation

- cargo build --release -p perry-jsruntime -p perry-runtime
   -p perry-stdlib -p perry clean
- cargo test --release -p perry --bin perry — 152/0
- cargo fmt --all -- --check clean
- All three previously-failing parity tests byte-equal Node
@proggeramlug
proggeramlug force-pushed the deps/toml-1-deno-core-0.400-v2 branch from a849c4c to 5d6e28d Compare May 13, 2026 07:23
@proggeramlug
proggeramlug merged commit 72e695c into main May 13, 2026
9 checks passed
@proggeramlug
proggeramlug deleted the deps/toml-1-deno-core-0.400-v2 branch May 13, 2026 08:43
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