Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(turbopack-ecmascript-runtime): prevent hanging when top level await is skipped #8409

Merged
merged 3 commits into from
Jun 12, 2024

Conversation

ForsakenHarmony
Copy link
Contributor

Description

A "race condition" was causing the queue to never be resolved.

Testing Instructions

Added a new test for it

Fixes vercel/next.js#65278

Copy link

vercel bot commented Jun 10, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
examples-nonmonorepo ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 12, 2024 9:07pm
rust-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 12, 2024 9:07pm
8 Ignored Deployments
Name Status Preview Comments Updated (UTC)
examples-basic-web ⬜️ Ignored (Inspect) Visit Preview Jun 12, 2024 9:07pm
examples-designsystem-docs ⬜️ Ignored (Inspect) Visit Preview Jun 12, 2024 9:07pm
examples-gatsby-web ⬜️ Ignored (Inspect) Visit Preview Jun 12, 2024 9:07pm
examples-kitchensink-blog ⬜️ Ignored (Inspect) Visit Preview Jun 12, 2024 9:07pm
examples-native-web ⬜️ Ignored (Inspect) Visit Preview Jun 12, 2024 9:07pm
examples-svelte-web ⬜️ Ignored (Inspect) Visit Preview Jun 12, 2024 9:07pm
examples-tailwind-web ⬜️ Ignored (Inspect) Visit Preview Jun 12, 2024 9:07pm
examples-vite-web ⬜️ Ignored (Inspect) Visit Preview Jun 12, 2024 9:07pm

Copy link
Contributor

github-actions bot commented Jun 10, 2024

🟢 Turbopack Benchmark CI successful 🟢

Thanks

Copy link
Contributor

github-actions bot commented Jun 10, 2024

⚠️ This change may fail to build next-swc.

Logs

packages/next-swc/crates/next-core/src/next_shared/resolve.rs:13:13: �[38;5;9merror[E0432]: unresolved import `turbopack_binding::turbopack::core::issue::unsupported_module`
packages/next-swc/crates/next-core/src/next_font/local/mod.rs:73:39: �[38;5;9merror[E0599]: no variant or associated item named `new` found for enum `BeforeResolvePluginCondition` in the current scope
error: could not compile `next-core` (lib) due to 2 previous errors

See job summary for details

Copy link
Contributor

github-actions bot commented Jun 10, 2024

⚠️ CI failed ⚠️

The following steps have failed in CI:

  • Turbopack Rust tests (mac/win, non-blocking)

See workflow summary for details

@ForsakenHarmony ForsakenHarmony force-pushed the hrmny/pack-3039-top-level-await-hanging branch from 81edb44 to 959442e Compare June 12, 2024 21:04
@ForsakenHarmony ForsakenHarmony merged commit c169e38 into main Jun 12, 2024
55 of 58 checks passed
@ForsakenHarmony ForsakenHarmony deleted the hrmny/pack-3039-top-level-await-hanging branch June 12, 2024 22:35
bgw added a commit to vercel/next.js that referenced this pull request Jun 14, 2024
This was previously disabled on `aarch64-unknown-linux-musl` and `wasm`,
due to compilation errors.
    
I moved the logic to disable `mimalloc` on these platforms into the
`turbo-tasks-malloc` crates in vercel/turborepo#8462
(which this PR depends on).
    
In addition to centralizing mimalloc platform support logic, this means
that we can get allocation data from these platforms while using the
system allocator.

**Depends on:** vercel/turborepo#8462

Included turbopack changes:
* vercel/turborepo#8409 <!-- hrmny -
fix(turbopack-ecmascript-runtime): prevent hanging when top level await
is skipped -->
* vercel/turborepo#8466 <!-- hrmny - fix(turbopack):
make external module wrapper return not found instead of panicking -->
* vercel/turborepo#8469 <!-- hrmny - fix(turbopack):
add ecmascript options to mdx -->
* vercel/turborepo#8447 <!-- Donny/강동윤 - build:
Update `swc_core` to `v0.93.4` -->
* vercel/turborepo#8472 <!-- Donny/강동윤 - feat:
Reduce the number of parts created by tree shaking -->
* vercel/turborepo#8480 <!-- Will Binns-Smith -
Publish `@vercel/devlow-bench` -->
* vercel/turborepo#8481 <!-- Will Binns-Smith -
chore: release npm packages -->
* vercel/turborepo#8462 <!-- Benjamin Woodruff -
Update mimalloc, enable for glibc Linux aarch64, explicitly disable for
wasm and musl -->
ForsakenHarmony added a commit to vercel/next.js that referenced this pull request Jul 25, 2024
…it is skipped (vercel/turborepo#8409)

### Description

A "race condition" was causing the queue to never be resolved.

### Testing Instructions

Added a new test for it


Fixes #65278
ForsakenHarmony added a commit to vercel/next.js that referenced this pull request Jul 29, 2024
…it is skipped (vercel/turborepo#8409)

### Description

A "race condition" was causing the queue to never be resolved.

### Testing Instructions

Added a new test for it


Fixes #65278
ForsakenHarmony added a commit to vercel/next.js that referenced this pull request Jul 29, 2024
…it is skipped (vercel/turborepo#8409)

### Description

A "race condition" was causing the queue to never be resolved.

### Testing Instructions

Added a new test for it


Fixes #65278
ForsakenHarmony added a commit to vercel/next.js that referenced this pull request Aug 1, 2024
…it is skipped (vercel/turborepo#8409)

### Description

A "race condition" was causing the queue to never be resolved.

### Testing Instructions

Added a new test for it


Fixes #65278
ForsakenHarmony pushed a commit to vercel/next.js that referenced this pull request Aug 14, 2024
This was previously disabled on `aarch64-unknown-linux-musl` and `wasm`,
due to compilation errors.
    
I moved the logic to disable `mimalloc` on these platforms into the
`turbo-tasks-malloc` crates in vercel/turborepo#8462
(which this PR depends on).
    
In addition to centralizing mimalloc platform support logic, this means
that we can get allocation data from these platforms while using the
system allocator.

**Depends on:** vercel/turborepo#8462

Included turbopack changes:
* vercel/turborepo#8409 <!-- hrmny -
fix(turbopack-ecmascript-runtime): prevent hanging when top level await
is skipped -->
* vercel/turborepo#8466 <!-- hrmny - fix(turbopack):
make external module wrapper return not found instead of panicking -->
* vercel/turborepo#8469 <!-- hrmny - fix(turbopack):
add ecmascript options to mdx -->
* vercel/turborepo#8447 <!-- Donny/강동윤 - build:
Update `swc_core` to `v0.93.4` -->
* vercel/turborepo#8472 <!-- Donny/강동윤 - feat:
Reduce the number of parts created by tree shaking -->
* vercel/turborepo#8480 <!-- Will Binns-Smith -
Publish `@vercel/devlow-bench` -->
* vercel/turborepo#8481 <!-- Will Binns-Smith -
chore: release npm packages -->
* vercel/turborepo#8462 <!-- Benjamin Woodruff -
Update mimalloc, enable for glibc Linux aarch64, explicitly disable for
wasm and musl -->
ForsakenHarmony pushed a commit to vercel/next.js that referenced this pull request Aug 15, 2024
This was previously disabled on `aarch64-unknown-linux-musl` and `wasm`,
due to compilation errors.
    
I moved the logic to disable `mimalloc` on these platforms into the
`turbo-tasks-malloc` crates in vercel/turborepo#8462
(which this PR depends on).
    
In addition to centralizing mimalloc platform support logic, this means
that we can get allocation data from these platforms while using the
system allocator.

**Depends on:** vercel/turborepo#8462

Included turbopack changes:
* vercel/turborepo#8409 <!-- hrmny -
fix(turbopack-ecmascript-runtime): prevent hanging when top level await
is skipped -->
* vercel/turborepo#8466 <!-- hrmny - fix(turbopack):
make external module wrapper return not found instead of panicking -->
* vercel/turborepo#8469 <!-- hrmny - fix(turbopack):
add ecmascript options to mdx -->
* vercel/turborepo#8447 <!-- Donny/강동윤 - build:
Update `swc_core` to `v0.93.4` -->
* vercel/turborepo#8472 <!-- Donny/강동윤 - feat:
Reduce the number of parts created by tree shaking -->
* vercel/turborepo#8480 <!-- Will Binns-Smith -
Publish `@vercel/devlow-bench` -->
* vercel/turborepo#8481 <!-- Will Binns-Smith -
chore: release npm packages -->
* vercel/turborepo#8462 <!-- Benjamin Woodruff -
Update mimalloc, enable for glibc Linux aarch64, explicitly disable for
wasm and musl -->
ForsakenHarmony pushed a commit to vercel/next.js that referenced this pull request Aug 16, 2024
This was previously disabled on `aarch64-unknown-linux-musl` and `wasm`,
due to compilation errors.
    
I moved the logic to disable `mimalloc` on these platforms into the
`turbo-tasks-malloc` crates in vercel/turborepo#8462
(which this PR depends on).
    
In addition to centralizing mimalloc platform support logic, this means
that we can get allocation data from these platforms while using the
system allocator.

**Depends on:** vercel/turborepo#8462

Included turbopack changes:
* vercel/turborepo#8409 <!-- hrmny -
fix(turbopack-ecmascript-runtime): prevent hanging when top level await
is skipped -->
* vercel/turborepo#8466 <!-- hrmny - fix(turbopack):
make external module wrapper return not found instead of panicking -->
* vercel/turborepo#8469 <!-- hrmny - fix(turbopack):
add ecmascript options to mdx -->
* vercel/turborepo#8447 <!-- Donny/강동윤 - build:
Update `swc_core` to `v0.93.4` -->
* vercel/turborepo#8472 <!-- Donny/강동윤 - feat:
Reduce the number of parts created by tree shaking -->
* vercel/turborepo#8480 <!-- Will Binns-Smith -
Publish `@vercel/devlow-bench` -->
* vercel/turborepo#8481 <!-- Will Binns-Smith -
chore: release npm packages -->
* vercel/turborepo#8462 <!-- Benjamin Woodruff -
Update mimalloc, enable for glibc Linux aarch64, explicitly disable for
wasm and musl -->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Import with top level await stucks dev server with --turbo
3 participants