-
-
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
[email protected]
and @swc/[email protected]
cannot run Wasm plugins that uses SourceFile
#9711
Comments
swc_core@4
cannot run plugins
swc_core@4
cannot run plugins[email protected]
cannot run Wasm plugins
[email protected]
cannot run Wasm plugins[email protected]
cannot run Wasm plugins using SourceFile
I think there's a UB in the code related to If I add logging code and run it via node.js, it hangs. Log
If I run it without logging code, it crashes with the error message in the issue body. @kwonoj What do you think? Should we update |
Do we have exact change caused this regression? If we revert those what we'll lose? I'm in for rkyv / wasmer update and it should happen, but rkyv had major breaking so update would require some code changes - also we are't 100% sure if update will fix this issue. |
The problematic patch is #9696, which makes source file analysis of swc/crates/swc_common/src/cache.rs Lines 35 to 115 in 499c803
|
Isn't rspack attempt to upgrade to latest swc in the next release? Blocking all plugin sounds like a deal breaker; maybe cost those perf improvement and revert, then retry after rkyv / wasmer update? |
It's not all Wasm plugin, but I think we should revert it anyway. I left a question on rkyv Discord, so if it's a real UB, I'll revert the PR and reapply it after updating |
[email protected]
cannot run Wasm plugins using SourceFile
[email protected]
/@swc/[email protected]
cannot run Wasm plugins using SourceFile
[email protected]
/@swc/[email protected]
cannot run Wasm plugins using SourceFile
[email protected]
and @swc/[email protected]
cannot run Wasm plugins using SourceFile
[email protected]
and @swc/[email protected]
cannot run Wasm plugins using SourceFile
[email protected]
and @swc/[email protected]
cannot run Wasm plugins that uses SourceFile
Describe the bug
Follow the reproduction at https://github.com/fpapado/swc-1.8.0-and-plugin-styled-components-4.0.0.
Using @swc/[email protected] together with @swc/[email protected] and then attempting to transpile a file leads to a panic. This seems contrary to https://plugins.swc.rs/versions/range/19, which shows @swc/[email protected] and @swc/[email protected] as compatible.
Input code
Config
Playground link (or link to the minimal reproduction)
https://github.com/fpapado/swc-1.8.0-and-plugin-styled-components-4.0.0
SWC Info output
/Users/fotis/Library/Application Support/fnm/node-versions/v20.18.0/installation/lib/node_modules/corepack/dist/lib/corepack.cjs:22373
throw new UsageError(
This project is configured to use ${result.spec.name} because ${result.target} has a "packageManager" field
);^
UsageError: This project is configured to use pnpm because /Users/fotis/swc-1.8.0-and-plugin-styled-components-4.0.0/package.json has a "packageManager" field
at Engine.findProjectSpec (/Users/fotis/Library/Application Support/fnm/node-versions/v20.18.0/installation/lib/node_modules/corepack/dist/lib/corepack.cjs:22373:21)
at async Engine.executePackageManagerRequest (/Users/fotis/Library/Application Support/fnm/node-versions/v20.18.0/installation/lib/node_modules/corepack/dist/lib/corepack.cjs:22404:24)
at async Object.runMain (/Users/fotis/Library/Application Support/fnm/node-versions/v20.18.0/installation/lib/node_modules/corepack/dist/lib/corepack.cjs:23096:5) {
clipanion: { type: 'usage' }
}
Node.js v20.18.0
Expected behavior
I expected swc to transpile the code without errors around the plugin's compatibility with core, as listed in https://plugins.swc.rs/versions/range/19.
Actual behavior
SWC exits with a panic
Version
1.8.0
Additional context
Please let me know if there is any other information that I can provide, and I will get back to you promptly 😌
The text was updated successfully, but these errors were encountered: