build(profiling): remove once_cell as a dependency#3607
Conversation
Since Rust 1.70 there are types in core we can use, or in some cases we can avoid the type and rely on get_module as a place to run the bits that are non-const.
1cc1ebc to
cefbc5b
Compare
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #3607 +/- ##
==========================================
- Coverage 62.24% 62.20% -0.05%
==========================================
Files 141 141
Lines 13387 13387
Branches 1753 1753
==========================================
- Hits 8333 8327 -6
- Misses 4257 4263 +6
Partials 797 797 see 2 files with indirect coverage changes Continue to review full report in Codecov by Sentry.
🚀 New features to boost your workflow:
|
Benchmarks [ profiler ]Benchmark execution time: 2026-01-29 16:27:42 Comparing candidate commit 8198125 in PR branch Found 0 performance improvements and 2 performance regressions! Performance is the same for 27 metrics, 7 unstable metrics. scenario:php-profiler-timeline-memory-with-profiler-and-timeline
|
Description
Replaces once_cell types with ones in the std library (since 1.70). In one case it removes a
Lazyinstead and handles the non-const parts by writing them inget_module. Note thatOnceCellin the stdlib isn'tSyncsoonce_cell::sync::OnceCellwas replaced bystd::sync::OnceLockin most cases.My real motivation is to use PHP globals for some things instead of Rust TLS variables. They have been problematic in the memory allocation profiler because of ext/grpc doing unsafe (and wrong, not just unsafe) things. While exploring that, I noticed this cleanup was possible. It's only net new lines of code because there are new comments.
Reviewer checklist