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

Update swc_core to v0.75.23 #4470

Merged
merged 28 commits into from Apr 18, 2023
Merged

Update swc_core to v0.75.23 #4470

merged 28 commits into from Apr 18, 2023

Conversation

kdy1
Copy link
Member

@kdy1 kdy1 commented Apr 5, 2023

Description

This update includes an improvement of @swc/helpers, so we need to update @swc/helpers too when updating next-swc.

Testing Instructions

Fix WEB-744
Fix WEB-859


@vercel
Copy link

vercel bot commented Apr 5, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
examples-kitchensink-blog 🔄 Building (Inspect) Apr 18, 2023 4:01am
examples-tailwind-web 🔄 Building (Inspect) Apr 18, 2023 4:01am
examples-vite-web 🔄 Building (Inspect) Apr 18, 2023 4:01am
turbo-site 🔄 Building (Inspect) Visit Preview Apr 18, 2023 4:01am
7 Ignored Deployments
Name Status Preview Comments Updated (UTC)
examples-basic-web ⬜️ Ignored (Inspect) Apr 18, 2023 4:01am
examples-cra-web ⬜️ Ignored (Inspect) Apr 18, 2023 4:01am
examples-designsystem-docs ⬜️ Ignored (Inspect) Apr 18, 2023 4:01am
examples-gatsby-web ⬜️ Ignored (Inspect) Apr 18, 2023 4:01am
examples-native-web ⬜️ Ignored (Inspect) Apr 18, 2023 4:01am
examples-nonmonorepo ⬜️ Ignored (Inspect) Apr 18, 2023 4:01am
examples-svelte-web ⬜️ Ignored (Inspect) Apr 18, 2023 4:01am

@kdy1 kdy1 mentioned this pull request Apr 5, 2023
@github-actions
Copy link
Contributor

github-actions bot commented Apr 5, 2023

⚠️ CI failed ⚠️

The following steps have failed in CI:

  • Turbopack Rust benchmark tests (linux)

See workflow summary for details

@github-actions
Copy link
Contributor

github-actions bot commented Apr 5, 2023

✅ This changes can build next-swc

@kdy1 kdy1 changed the title Update swc_core to v0.74.0 Update swc_core to v0.74.2 Apr 6, 2023
@kdy1 kdy1 marked this pull request as ready for review April 6, 2023 02:59
@kdy1 kdy1 requested review from a team as code owners April 6, 2023 02:59
@kdy1 kdy1 marked this pull request as draft April 6, 2023 02:59
@kdy1 kdy1 marked this pull request as ready for review April 6, 2023 03:08
@kdy1 kdy1 changed the title Update swc_core to v0.74.2 Update swc_core to v0.74.6 Apr 7, 2023
@github-actions
Copy link
Contributor

Benchmark for 724875a

Click to view benchmark
Test Base PR % Significant %
bench_hmr_to_commit/Turbopack CSR/1000 modules 8925.54µs ± 74.36µs 8819.22µs ± 44.29µs -1.19%
bench_hmr_to_eval/Turbopack CSR/1000 modules 7856.33µs ± 48.35µs 7947.57µs ± 120.04µs +1.16%
bench_startup/Turbopack CSR/1000 modules 881.10ms ± 4.15ms 872.23ms ± 5.00ms -1.01%

@@ -215,9 +222,15 @@ impl EcmascriptInputTransform {
..Default::default()
};
let p = std::mem::replace(program, Program::Module(Module::dummy()));
let hash = {
let mut hasher = DefaultHasher::new();
p.hash(&mut hasher);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That sounds pretty expensive. Do we need to hash the whole AST?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What I actually need is the hash of the source code. Would it be better?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can pass that via TransformContext

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But how is the transform using that? Would a comment change have effects on the transform?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's used to generate a hash for the file.

Related: swc-project/plugins#163

@kdy1 kdy1 added the pr: automerge Kodiak will merge these automatically after checks pass label Apr 18, 2023
@github-actions
Copy link
Contributor

Benchmark for 7ee7bb3

Click to view benchmark
Test Base PR % Significant %
bench_hmr_to_commit/Turbopack CSR/1000 modules 8938.87µs ± 34.20µs 8941.77µs ± 32.44µs +0.03%
bench_hmr_to_eval/Turbopack CSR/1000 modules 8067.75µs ± 49.74µs 8257.09µs ± 235.90µs +2.35%
bench_startup/Turbopack CSR/1000 modules 867.41ms ± 3.57ms 886.63ms ± 8.09ms +2.22%

@sokra sokra merged commit e6d3283 into main Apr 18, 2023
39 of 40 checks passed
@sokra sokra deleted the kdy1/swc-0-74 branch April 18, 2023 04:27
@kdy1 kdy1 changed the title Update swc_core to v0.75.22 Update swc_core to v0.75.23 Apr 18, 2023
sokra pushed a commit to vercel/next.js that referenced this pull request Apr 18, 2023
Depends on vercel/turbo#4470

---

 - Closes #46989
 - Fixes WEB-879
 - Fixes WEB-813

---------

Co-authored-by: OJ Kwon <1210596+kwonoj@users.noreply.github.com>
Co-authored-by: Donny/강동윤 <kdy1997.dev@gmail.com>
Co-authored-by: Shu Ding <g@shud.in>
NicholasLYang pushed a commit to NicholasLYang/turbo that referenced this pull request Apr 21, 2023
### Description

This update includes an improvement of `@swc/helpers`, so we need to
update `@swc/helpers` too when updating next-swc.

### Testing Instructions

Fix WEB-744
Fix WEB-859

---

 - Fixes vercel#2825.
 - Fixes vercel#4092.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pr: automerge Kodiak will merge these automatically after checks pass
Projects
None yet
4 participants