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

very dynamic requests will only lead to a warning #7640

Merged
merged 1 commit into from Mar 6, 2024

Conversation

sokra
Copy link
Member

@sokra sokra commented Mar 6, 2024

Description

they no longer lead to an additional module not found error

Testing Instructions

Closes PACK-2673

@sokra sokra requested a review from a team as a code owner March 6, 2024 12:57
Copy link

vercel bot commented Mar 6, 2024

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

Name Status Preview Comments Updated (UTC)
examples-gatsby-web 🔄 Building (Inspect) Visit Preview 💬 Add feedback Mar 6, 2024 4:09pm
examples-kitchensink-blog 🔄 Building (Inspect) Visit Preview 💬 Add feedback Mar 6, 2024 4:09pm
examples-nonmonorepo ✅ Ready (Inspect) Visit Preview 💬 Add feedback Mar 6, 2024 4:09pm
examples-vite-web 🔄 Building (Inspect) Visit Preview 💬 Add feedback Mar 6, 2024 4:09pm
rust-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Mar 6, 2024 4:09pm
5 Ignored Deployments
Name Status Preview Comments Updated (UTC)
examples-basic-web ⬜️ Ignored (Inspect) Visit Preview Mar 6, 2024 4:09pm
examples-designsystem-docs ⬜️ Ignored (Inspect) Visit Preview Mar 6, 2024 4:09pm
examples-native-web ⬜️ Ignored (Inspect) Visit Preview Mar 6, 2024 4:09pm
examples-svelte-web ⬜️ Ignored (Inspect) Visit Preview Mar 6, 2024 4:09pm
examples-tailwind-web ⬜️ Ignored (Inspect) Visit Preview Mar 6, 2024 4:09pm

Copy link
Contributor

github-actions bot commented Mar 6, 2024

🟢 Turbopack Benchmark CI successful 🟢

Thanks

Copy link
Contributor

github-actions bot commented Mar 6, 2024

✅ This change can build next-swc

Copy link
Contributor

github-actions bot commented Mar 6, 2024

⚠️ CI failed ⚠️

The following steps have failed in CI:

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

See workflow summary for details

let visitor = match self.ty {
DynamicExpressionType::Normal => {
create_visitor!(path, visit_mut_expr(expr: &mut Expr) {
*expr = quote!("(() => { const e = new Error(\"Cannot find module as expression is too dynamic\"); e.code = 'MODULE_NOT_FOUND'; throw e; })()" as Expr);
Copy link
Member

Choose a reason for hiding this comment

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

this will completely throw away information about what would have been called

can we add something back so it shows up in the stack trace?

Copy link
Member

Choose a reason for hiding this comment

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

Giving the inline function a name would probably work

Copy link
Member Author

Choose a reason for hiding this comment

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

Due to source mapping the error will point to the actual user code.

Copy link
Member

Choose a reason for hiding this comment

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

But the stack trace still won't contain a require/import

they no longer lead to an additional module not found error
@sokra sokra force-pushed the sokra/dynamic-requests-warning branch from 1702a06 to c8c996d Compare March 6, 2024 16:00
@sokra sokra merged commit 598750d into main Mar 6, 2024
47 of 48 checks passed
@sokra sokra deleted the sokra/dynamic-requests-warning branch March 6, 2024 16:25
sokra pushed a commit to vercel/next.js that referenced this pull request Mar 7, 2024
# Turbopack

* vercel/turbo#7625 <!-- Tobias Koppers -
generate calls of bindings correctly without this context -->
* vercel/turbo#7621 <!-- Donny/강동윤 - fix: Fix
purity lint for CSS Modules in swc mode -->
* vercel/turbo#7640 <!-- Tobias Koppers - very
dynamic requests will only lead to a warning -->
* vercel/turbo#7639 <!-- Donny/강동윤 - build:
Update `swc_core` to `v0.90.17` -->


### What?

Update turbopack

### Why?

To keep in sync

### How?
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.

None yet

3 participants