-
Notifications
You must be signed in to change notification settings - Fork 27
feat: swc cross version compatibility #185
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
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #185 +/- ##
==========================================
+ Coverage 92.17% 93.24% +1.06%
==========================================
Files 8 8
Lines 1355 1362 +7
==========================================
+ Hits 1249 1270 +21
+ Misses 106 92 -14
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
|
Wow. Finally. I missed that news. BTW, for anyone landed on this issue - here is a blog post from kdy https://blog.swc.rs/2025-11-4-wasm-backward-compatibility and PR Here’s a smoother, more neutral, and clearer version, keeping a technical review tone and tightening the language a bit: However, I have a few questions regarding this PR. To be honest, the implementation looks somewhat AI-generated, which makes me want to better understand your reasoning and level of familiarity with this code.
|
|
Regarding point number 1, here is a PR for swc-managed plugins https://github.com/swc-project/plugins/pull/543/changes#diff-2646e2761a3f0ab6176eeb126edd0f3a1cad1cc1534ebe0e5336d3686b24b99e From a quick view, they added |
Support Enhanced Cross-Version Compatibility
Description
Adopts the enhanced compatibility patterns introduced in
@swc/corev1.15.0 according to the SWC Plugin Compatibility Guide.Motivation
Starting from
@swc/corev1.15.0, SWC introduced enhanced compatibility for Wasm plugins. This allows plugins to work with newer@swc/coreversions that introduce new AST node types, as long as the code doesn't use those new features.Benefits for users:
@swc/corewithout waiting for plugin updatesBenefits for maintainers:
This PR implements the required changes to support this new compatibility mode.
Changes
swc_ast_unknowncfg flag in.cargo/config.tomlbuild.rsto declare the cfg flag (prevents Rust 1.80+ warnings)panic_unknown_node()helper for informative error messagesBreaking Changes