Skip to content

Drop once_cell from all direct crate deps#93095

Open
mmastrac wants to merge 1 commit intommastrac/turbotasks-const-vtablefrom
mmastrac/drop-once-cell
Open

Drop once_cell from all direct crate deps#93095
mmastrac wants to merge 1 commit intommastrac/turbotasks-const-vtablefrom
mmastrac/drop-once-cell

Conversation

@mmastrac
Copy link
Copy Markdown
Contributor

@mmastrac mmastrac commented Apr 21, 2026

What

Purely mechanical change from once_cell to stdlib primitives.

Copy link
Copy Markdown
Contributor Author

mmastrac commented Apr 21, 2026

Warning

This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
Learn more

This stack of pull requests is managed by Graphite. Learn more about stacking.

@codspeed-hq
Copy link
Copy Markdown

codspeed-hq Bot commented Apr 21, 2026

Merging this PR will degrade performance by 3.75%

❌ 1 regressed benchmark
✅ 16 untouched benchmarks
⏩ 3 skipped benchmarks1

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

Performance Changes

Mode Benchmark BASE HEAD Efficiency
Simulation packages-bundle.js[full] 947.9 ms 984.9 ms -3.75%

Comparing mmastrac/drop-once-cell (b4c897f) with canary (c526347)2

Open in CodSpeed

Footnotes

  1. 3 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports.

  2. No successful run was found on mmastrac/turbotasks-const-vtable (015ec5e) during the generation of this report, so canary (c526347) was used instead as the comparison base. There might be some changes unrelated to this pull request in this report.

@mmastrac mmastrac marked this pull request as ready for review April 21, 2026 17:01
@mmastrac mmastrac force-pushed the mmastrac/turbotasks-const-vtable branch from c69cc10 to 075f720 Compare April 21, 2026 18:30
Migrate remaining workspace uses of `once_cell` to their std equivalents,
now stable on this nightly toolchain:

- 32 `once_cell::sync::Lazy` → `std::sync::LazyLock`
- 1  `once_cell::sync::OnceCell` → `std::sync::OnceLock`
  (`turbopack-node/src/worker_pool/worker_thread.rs`)

Remove the `once_cell` entries from every crate's `Cargo.toml` and from
the workspace root `[workspace.dependencies]` table. `Cargo.lock` still
references `once_cell` transitively (via `regex`, `backtrace`, `rand`,
etc.) — that's unavoidable and unrelated to this crate's surface.

No behavior changes: the std types have the same API we use
(`::new`, `::force`, `.get`, `.set`, `.get_or_init`, and `Deref`).
@mmastrac mmastrac force-pushed the mmastrac/turbotasks-const-vtable branch from 075f720 to 015ec5e Compare April 21, 2026 20:13
@mmastrac mmastrac force-pushed the mmastrac/drop-once-cell branch from bd2527c to b4c897f Compare April 21, 2026 20:13
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.

2 participants