Skip to content

[compiler] Fix misleading code example #7889

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

Merged
merged 1 commit into from
Jul 21, 2025
Merged

[compiler] Fix misleading code example #7889

merged 1 commit into from
Jul 21, 2025

Conversation

poteto
Copy link
Member

@poteto poteto commented Jul 21, 2025

When the compiler bails out on code, it leaves it untouched and unoptimized, so it's always safe for the compiler to bailout.

panicThreshold in most cases should be kept as 'none' unless you want to fail the build on these safe bailouts. It's really only useful during dev when you're working on increasing the coverage of the compiler on your codebase.

I think having it shown here is confusing so I'm opting to just remove it for this particular code example.

When the compiler bails out on code, it  leaves it untouched and unoptimized, so it's always safe for the compiler to bailout.

`panicThreshold` in most cases should be kept as `'none'` unless you want to fail the build on these safe bailouts. It's really only useful during dev when you're working on increasing the coverage of the compiler on your codebase.

I think having it shown here is confusing so I'm opting to just remove it for this particular code example.
Copy link

Size changes

📦 Next.js Bundle Analysis for react-dev

This analysis was generated by the Next.js Bundle Analysis action. 🤖

This PR introduced no changes to the JavaScript bundle! 🙌

@poteto poteto merged commit d7160a8 into main Jul 21, 2025
9 checks passed
@poteto poteto deleted the pr7889 branch July 21, 2025 21:39
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.

1 participant