Repository navigation
Replace lazy_static with std::sync::LazyLock - #306
jbgriesner wants to merge 2 commits into
Conversation
|
Hi @jbgriesner, the migration is mechanically correct across all 14 files and the motivation is solid: one fewer external dependency, aligned with the standard library since Rust 1.80. Two things needed before merge:
Minor note: |
|
Hey @jbgriesner, heads up: PR #349 (TOML filter DSL) uses |
- Add rust-version = "1.80" to Cargo.toml: LazyLock was stabilized in Rust 1.80, this gives a clear error instead of cryptic compile failure on older toolchains - Move LazyLock statics in next_cmd.rs and playwright_cmd.rs from function bodies to module level, consistent with every other module in the codebase - Remove unused ROUTE_PATTERN static (dead code cleanup) Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
0cae53d to
f8d090a
Compare
The 0/0 CI checks are a GitHub limitation with fork PRs: workflows run from the fork's own .github/workflows/ directory, not from the upstream repo. Since my fork doesn't replicate the upstream CI setup, no checks trigger automatically. I've verified locally that all three gates pass: cargo fmt --all && cargo clippy --all-targets && cargo test |
|
Hi! Two things needed before we can review:
Thanks! |
|
Hey We are cleaning up the codebase and improving the project structure for better onboarding. As part of this effort, PR #826 reorganizes No logic changes — only file moves and import path updates. What you need to doRebase your branch on git fetch origin && git rebase origin/developGit detects renames automatically. If you get import conflicts, update the paths: use crate::git; // now: use crate::cmds::git::git;
use crate::tracking; // now: use crate::core::tracking;
use crate::config; // now: use crate::core::config;
use crate::init; // now: use crate::hooks::init;
use crate::gain; // now: use crate::analytics::gain;Need help rebasing? Tag @aeppling |
|
This pull request has been automatically marked as stale due to 90 days of inactivity. If this pull request is still relevant, please leave any comment (for example, "bump"), and we'll keep it open. Your contribution is very much appreciated — we're sorry we haven't been able to review it yet. |
|
Thanks for the cleanup. This landed as PR #3244 (merged 2026-07-28), which replaced every lazy_static! block with std::sync::LazyLock and removed the dependency from Cargo.toml, so develop no longer references lazy_static anywhere. The file layout also changed since this branch was opened, with the command modules moved under src/cmds and shared code under src/core. If you find a spot that still compiles a regex eagerly or was missed by that pass, please comment here or reopen. |
Replaces all uses of the
lazy_staticcrate withstd::sync::LazyLock, which has been stable since Rust 1.80.Motivation:
lazy_static = "1.4")No behavior change. LazyLock initializes on first access, exactly like lazy_static. All regex patterns remain identical.