-
Notifications
You must be signed in to change notification settings - Fork 0
chore: bump swc to v36 #57
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
* feat(turbopack): apply utoo patches to canary * chore: update external code --------- Co-authored-by: zoomdong <1344492820@qq.com>
* feat(turbopack): externalType support umd * fix: clippy * fix: use CompileTimeDefineValue::Evaluate --------- Co-authored-by: xusd320 <xusd320@gmail.com>
…ta types and expr evaluation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Summary of Changes
Hello @fireairforce, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!
此拉取请求旨在将项目中的SWC依赖升级到最新版本(v36),以利用其提供的最新功能,特别是SWC插件的转换特性,这对于utoopack的正常运行至关重要。此次升级涉及更新多个Rust包及其依赖,并相应调整了部分代码和测试用例,以确保与新版SWC的兼容性。
Highlights
- SWC版本升级: 将swc_core及其相关依赖升级到36.0.1版本,并更新了Cargo.lock中大量swc_*系列的crate版本。
- 引入Wasmer后端: 新增swc_plugin_backend_wasmer依赖,并在crates/napi/Cargo.toml和turbopack/crates/turbopack-ecmascript-plugins/Cargo.toml中启用其特性。
- 插件编译优化: turbopack/crates/turbopack-ecmascript-plugins/src/transform/swc_ecma_transform_plugins.rs中更新了插件模块的编译方式,使用WasmerRuntime进行优化。
- 模块化导入配置: 在modularize_imports.rs中为ModularizeImportsConfig结构体添加了style: None字段。
- 测试用例更新: 调整了多个测试文件(包括ReactRefreshLogBox.test.ts和error-recovery.test.ts)中预期的错误信息,以匹配新版SWC的输出。
- 代码分析器改进: turbopack/crates/turbopack-ecmascript/src/analyzer/graph.rs中contains_ident_ref函数的调用方式进行了微调。
Using Gemini Code Assist
The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.
Invoking Gemini
You can request assistance from Gemini at any point in your pull request via creating an issue comment (i.e. comment on the pull request page) using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands.
| Feature | Command | Description |
|---|---|---|
| Code Review | /gemini review |
Performs a code review for the current pull request in its current state. |
| Pull Request Summary | /gemini summary |
Provides a summary of the current pull request in its current state. |
| Comment | @gemini-code-assist | Responds in comments when explicitly tagged, both in issue comments and review comments. |
| Help | /gemini help |
Displays a list of available commands. |
Customization
To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.
Limitations & Feedback
Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.
You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.
Footnotes
-
Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution. ↩
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code Review
This pull request updates the swc version and its dependencies in the project. It also includes changes to incorporate swc_plugin_backend_wasmer for plugin execution and fixes some error message displays in tests. The review focuses on ensuring the updates are correctly applied and the new features are properly integrated.
| "cfg-if", | ||
| "constant_time_eq", | ||
| "digest", | ||
| ] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| "swc_ecma_visit", | ||
| "swc_error_reporters", | ||
| "swc_node_comments", | ||
| "swc_plugin_backend_wasmer", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| name = "swc_plugin_backend_wasmer" | ||
| version = "2.0.0" | ||
| source = "registry+https://github.com/rust-lang/crates.io-index" | ||
| checksum = "d888829d5c88ed444eea30e63b18155fb0b4197bb6e43e6c50439bb5ad220a4b" | ||
| dependencies = [ | ||
| "anyhow", | ||
| "enumset", | ||
| "parking_lot", | ||
| "swc_common", | ||
| "swc_plugin_runner", | ||
| "wasmer", | ||
| "wasmer-compiler-cranelift", | ||
| "wasmer-wasix", | ||
| ] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| "ecma_loader_parking_lot", | ||
| "parallel_rayon", | ||
| ] } | ||
| swc_plugin_backend_wasmer = { version = "2.0.0" } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| "swc_core/plugin_transform_host_native", | ||
| "swc_core/plugin_transform_host_native_filesystem_cache", | ||
| "swc_core/plugin_transform_host_native_shared_runtime", | ||
| "swc_core/plugin_backend_wasmer", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
turbopack/crates/turbopack-ecmascript-plugins/src/transform/swc_ecma_transform_plugins.rs
Show resolved
Hide resolved
turbopack/crates/turbopack-ecmascript-plugins/src/transform/swc_ecma_transform_plugins.rs
Show resolved
Hide resolved
turbopack/crates/turbopack-ecmascript-plugins/src/transform/swc_ecma_transform_plugins.rs
Show resolved
Hide resolved
...k/exports/invalid-export-parse-error/issues/Parsing ecmascript source code failed-2cef13.txt
Show resolved
Hide resolved
|
能整个基线同步吗?cp 会让我们的基线变乱 |
|
直接把 next.js rebase 到最新吗?这里其实也不算cp,我把升级的两个commit 手动处理成一个了,到时候rebase更新的的时候,这里的改动应该不会冲突 |
线下讨论了一下,直接把 utoo 分支 更新到 |
|
|
从 turbopack 分支 cherry-pick 了两个 swc 版本 bump 的 commit,utoopack 需要用到 swc plugins 提供的一些 transform plugins 特性。