Skip to content

refactor(turbopack): remove lazy_static dependency #80226

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

Merged
merged 1 commit into from
Jun 11, 2025

Conversation

xusd320
Copy link
Contributor

@xusd320 xusd320 commented Jun 6, 2025

Why

lazy_static is deprecated, see Officially deprecate lazy_static #214

@ijjk ijjk added the Turbopack Related to Turbopack with Next.js. label Jun 6, 2025
@ijjk
Copy link
Member

ijjk commented Jun 6, 2025

Allow CI Workflow Run

  • approve CI run for commit: 7297a47

Note: this should only be enabled once the PR is ready to go and can only be enabled by a maintainer

Copy link

codspeed-hq bot commented Jun 6, 2025

CodSpeed Performance Report

Merging #80226 will improve performances by 15.96%

Comparing umijs:refactor/remove-lazy-static (acf285a) with canary (ae96d7b)

Summary

⚡ 1 improvements
✅ 5 untouched benchmarks
⁉️ 9 dropped benchmarks

⚠️ Please fix the performance issues or acknowledge them on CodSpeed.

Benchmarks breakdown

Benchmark BASE HEAD Change
rcstr!/small 211.9 ns 182.8 ns +15.96%
⁉️ build[date-fns-all] 2.7 s N/A N/A
⁉️ build[date-fns-single] 1.6 s N/A N/A
⁉️ build[framer-motion-all] 3.8 s N/A N/A
⁉️ build[framer-motion-single] 2.7 s N/A N/A
⁉️ build[joy] 2.5 s N/A N/A
⁉️ build[lucide-react-all] 12.4 s N/A N/A
⁉️ build[lucide-react-single] 1 s N/A N/A
⁉️ build[mui] 3.8 s N/A N/A
⁉️ build[shiki] 6.9 s N/A N/A

@xusd320 xusd320 changed the title refactor(turbopack): remove lazy_static refactor(turbopack): remove lazy_static dependency Jun 6, 2025
Copy link
Member

@bgw bgw left a comment

Choose a reason for hiding this comment

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

Nice! Thanks for the cleanup.

@bgw bgw enabled auto-merge (squash) June 10, 2025 23:33
@ijjk
Copy link
Member

ijjk commented Jun 10, 2025

Tests Passed

@mischnic
Copy link
Contributor

There are various compiler errors:

error[E0432]: unresolved import `lazy_static`
Error:   --> turbopack/crates/turbopack/tests/node-file-trace.rs:22:5
   |
22 | use lazy_static::lazy_static;
   |     ^^^^^^^^^^^ use of unresolved module or unlinked crate `lazy_static`
   |
   = help: if you wanted to use a crate named `lazy_static`, use `cargo add lazy_static` to add it to your `Cargo.toml`

error[E0425]: cannot find value `BENCH_SUITES` in this scope
Error:    --> turbopack/crates/turbopack/tests/node-file-trace.rs:419:28
    |
419 |         let bench_suites = BENCH_SUITES.clone();
    |                            ^^^^^^^^^^^^ not found in this scope

error[E0425]: cannot find value `BENCH_SUITES` in this scope
Error:    --> turbopack/crates/turbopack/tests/node-file-trace.rs:538:33
    |
538 |         let bench_suites_lock = BENCH_SUITES.lock().unwrap();
    |                                 ^^^^^^^^^^^^ help: a local variable with a similar name exists: `bench_suites`

error[E0425]: cannot find value `EXPERIMENTAL_WARNING` in this scope
Error:    --> turbopack/crates/turbopack/tests/node-file-trace.rs:643:15
    |
643 |     let str = EXPERIMENTAL_WARNING.replace_all(str, "(node:XXXX) ExperimentalWarning:");
    |               ^^^^^^^^^^^^^^^^^^^^ not found in this scope

auto-merge was automatically disabled June 11, 2025 08:49

Head branch was pushed to by a user without write access

@xusd320 xusd320 force-pushed the refactor/remove-lazy-static branch from acf285a to 7297a47 Compare June 11, 2025 08:49
@xusd320
Copy link
Contributor Author

xusd320 commented Jun 11, 2025

There are various compiler errors:
@mischnic

Fixed, thanks for remind.

@bgw bgw merged commit c8ac2a5 into vercel:canary Jun 11, 2025
173 of 184 checks passed
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jun 26, 2025
@xusd320 xusd320 deleted the refactor/remove-lazy-static branch July 3, 2025 01:59
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
locked Turbopack Related to Turbopack with Next.js.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants