Skip to content

fix(turbo-tasks): use wasm-safe instant in scope wait - #185

Merged
fireairforce merged 1 commit into
utoofrom
zoomdong/fix-wasm-scope-instant
Aug 21, 2026
Merged

fireairforce merged 1 commit into
utoofrom
zoomdong/fix-wasm-scope-instant

Conversation

@fireairforce

Copy link
Copy Markdown
Member

What?

Use tokio::time::Instant for timeout accounting in turbo-tasks scope waits.

Why?

std::time::Instant::now panics on wasm32-unknown-unknown. Project disposal can reach ScopeInner::wait while draining parallel backend cleanup tasks, causing the second @utoo/web build to panic and time out.

How?

Reuse Tokio’s platform-aware Instant. The patched Tokio dependency uses a WASM-compatible clock while preserving native behavior.

Verification

  • cargo fmt
  • cargo clippy --all-targets -- -D warnings --no-deps
  • npm run build:local --workspace @utoo/web
  • utooweb Playwright build/rebuild E2E, one normal run plus three repeated runs

Related: utooland/utoo#3319

@fireairforce
fireairforce merged commit 2ed2153 into utoo Aug 21, 2026
15 of 29 checks passed

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 89ecd876fd

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread turbopack/crates/turbo-tasks/src/scope.rs
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.

2 participants