Skip to content
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

feat: Upgrade swc_core to v5.0.4 #144

Merged
merged 6 commits into from
Feb 24, 2025

Conversation

jeremywiebe
Copy link
Contributor

In this PR we upgrade the swc_core crate to v13.3.0. This makes the plugin compatible with v1.2.3 and 1.2.4 of Rspack which will allow projects using this plugin to upgrade.

A few things of note:

  • It incorporates changes found in Use new name for wasm32-wasi: wasm32-wasip1 #143 because those are necessary for this upgrade
  • There were a few API changes necessary to make the plugin code compatible with swc_core. The major changes are documented at the top of this page: https://swc.rs/docs/plugin/ecmascript/getting-started
  • I've taken the liberty of converting the Github Actions to use actions-rust-lang/setup-rust-toolchain@v1 which is a newer, more advanced version of the action this project was already using. It will respect the values in rust-toolchain.toml reducing how many times the toolchain needs to be specified
  • The LinguiMacroFolder needed to be wrapped in fold_pass() calls in tests to be compatible with the new parameter list that test_inline! expects.

Once these changes were complete, all tests passed and I was able to install this plugin in a real project that uses Rspack and build it successfully.

@jeremywiebe jeremywiebe changed the title Jer/swc core 13.3.0 Upgrade swc_core to v13.3.0 Feb 22, 2025
@timofei-iatsenko
Copy link
Collaborator

Thanks! I prefer to not jump over a few versions at once, because this will limit compatibility with other runtimes. According to the https://plugins.swc.rs/versions/range/116 we need to issue a version with [email protected] - < 6.0.0 to support latest nextjs and then do a second release with [email protected]

I can take it over from here. Thanks for contributing and updating rust tooling.

@andrii-bodnar FYI, we need to relese two bumps consequentally, one with [email protected] - < 6.0.0 and another with v13.3.0. I will prepare PR for the first one.

@timofei-iatsenko timofei-iatsenko self-requested a review February 24, 2025 07:35
@timofei-iatsenko timofei-iatsenko changed the title Upgrade swc_core to v13.3.0 feat: Upgrade swc_core to v13.3.0 Feb 24, 2025
@timofei-iatsenko
Copy link
Collaborator

timofei-iatsenko commented Feb 24, 2025

I pushed downgrade to v5 directly to this PR's branch.

Also the full range for v1.2.3 and 1.2.4 of Rspack is [email protected] - < 15.0.0 so i suppose we can use latest swc_core in this range instead of v13.3.0 for the next bump.

@timofei-iatsenko timofei-iatsenko changed the title feat: Upgrade swc_core to v13.3.0 feat: Upgrade swc_core to v5.0.4 Feb 24, 2025
@timofei-iatsenko timofei-iatsenko merged commit b72b189 into lingui:main Feb 24, 2025
1 check passed
@andrii-bodnar
Copy link
Contributor

@jeremywiebe thanks for the contribution!

@timofei-iatsenko so I'll release the 5.3.0 now, and then another version after the swc_core bump

@timofei-iatsenko
Copy link
Collaborator

the next bump #146

@jeremywiebe
Copy link
Contributor Author

Thank you for taking this over and landing it. This’ll open up the newest version of Rspack and the ability to use DebugIDs in production. Thanks again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants