-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Panic from symbol rename failure #9523
Comments
How did you invoke SWC? Minifier mangle cache is not enabled by default at now. |
Relevant code: swc/crates/swc_ecma_transforms_base/src/rename/mod.rs Lines 198 to 216 in c562cfa
swc/crates/swc_ecma_transforms_base/src/rename/mod.rs Lines 221 to 226 in c562cfa
|
Fixed by #9524 |
I've posted an issue for Next.js here. I hope you're able to replicate the issue, and that it can be resolved in an upcoming canary release. Thanks for your attention to this! |
@tonyabracadabra the issue has already been fixed in swc core and is in PR for next here: vercel/next.js#69605 |
Describe the bug
When upgrading to
@swc/core
v1.7.19 or newer, I get a new panic when compiling and minifying:@swc/core
v1.7.18 works just fine. I bisected to find that v1.7.19 is the first version that fails like this for me, and it fails on v1.7.22 as well.I am struggling to figure out what file or what element is even causing this error -- it's happening when building a very large TypeScript monorepo using SWC for TypeScript transpilation and minification via webpack and
swc-loader
. I tried:DEBUG="*"
but didn't see anything useful thereARDUINO_KW_type
symbol in my codebase (not there) and innode_modules
(also not there, searched withrg --hidden --no-ignore -g 'node_modules/**' 'ARDUINO_KW_type'
)I am not sure where it's coming from but if there are any other logs I can gather and share to help hunt this down please let me know. Please make some suggestions, I am happy to hunt just not quite sure how!
Input code
Config
Playground link (or link to the minimal reproduction)
https://play.swc.rs/?version=1.7.19&code=H4sIAAAAAAAAA0vLzwcAIWVzjAMAAAA%3D&config=H4sIAAAAAAAAA1WPSw7DIAwF9zkF8rrbdtE79BAWdSIifrKJVBTl7iUE0maH3xsz8jooBbNoeKq1PMsQkYX4nEsi2Sf8lARIOxTNJia49XaWvRrRCtVoOxpIyBOluiX3hoMNQajjLXPGmzH%2FC3VwkUnkCu4o%2BsnSVTc0JbjwXmrZDkk50qF%2FwA%2FqsvNjMPLqm4kXGrYvhlQioBQBAAA%3D
SWC Info output
Expected behavior
No panic thrown, code is assembled as normal
Actual behavior
Panic is thrown
Version
1.7.19
Additional context
No response
The text was updated successfully, but these errors were encountered: