Skip to content

fix(deps): replace lazycell with Mutex<Option<T>>, add MSRV 1.70, drop rustc_1_55 tinyvec feature#3

Merged
smartyalgo merged 10 commits intomainfrom
fix/lazycell-msrv
Apr 8, 2026
Merged

fix(deps): replace lazycell with Mutex<Option<T>>, add MSRV 1.70, drop rustc_1_55 tinyvec feature#3
smartyalgo merged 10 commits intomainfrom
fix/lazycell-msrv

Conversation

@smartyalgo
Copy link
Copy Markdown
Owner

@smartyalgo smartyalgo commented Mar 30, 2026

Summary

  • Remove lazycell: The lazycell crate is unmaintained (last release 2019). Replaced the single usage of AtomicLazyCell<HashMap<...>> inside a Mutex in toad/src/step/observe.rs with a plain Mutex<Option<HashMap<...>>> using take()/reassign pattern. No behavior change.
  • Add MSRV rust-version = "1.70": Added to all 13 crate manifests. 1.70 is the minimum version that stabilised std::sync::OnceLock (used for future-proofing) and is a reasonable floor for the current code.
  • Drop tinyvec rustc_1_55 feature: Replaced features = ["rustc_1_55"] with features = ["alloc"] across all crates that listed tinyvec. The rustc_1_55 feature flag only existed to gate const-generic stabilisation workarounds that are no longer needed on any supported toolchain.

Files changed

  • toad/Cargo.toml — remove lazycell dev-dep
  • toad/src/step/observe.rs — replace AtomicLazyCell with Option<T> inside existing Mutex
  • All */Cargo.toml — add rust-version = "1.70", fix tinyvec feature

Test plan

  • cargo test -p toad passes
  • cargo check --workspace accepts the rust-version field

🤖 Generated with Claude Code

smartyalgo and others added 10 commits March 30, 2026 12:19
…p rustc_1_55 tinyvec feature

- Remove lazycell dev-dep from toad; replace AtomicLazyCell usage in step/observe.rs with std::sync::Mutex<Option<T>>
- Add rust-version = "1.70" to all 13 crate manifests (OnceLock stabilised in 1.70)
- Replace tinyvec features = ["rustc_1_55"] with features = ["alloc"] across all crates

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Bump actions/checkout v2→v4, actions/cache v2→v4, actions/setup-java v3→v4
- Fix ci_check.yml bug: working-directory was set to 'toad-map' instead of 'toad-string', silently skipping toad-string tests
- Migrate release-please v3→v4: replace command/sequential-calls with config-file/manifest-file params

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
assert_eqb and assert_eqb_iter were #[macro_export] items subject to
#![deny(missing_docs)], causing CI to fail across all branches.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Resolve conflicts:
- retry.rs: use rand 0.9 random_range (from fork/main rand upgrade)
- observe.rs: keep Mutex<Option<T>> lazycell replacement (from this branch)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- examples/server.rs, server_traffic.rs: replace lazycell::AtomicLazyCell
  with std::sync::OnceLock (stabilized in Rust 1.70, now the MSRV)
- toad/src/test.rs, step/mod.rs: allow(missing_docs) on test modules
- toad/Cargo.toml: bump simple_logger 2→5 to fix time 0.3 compile error

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Fix CI fmt-check failure: toad-msg benches, examples, and src files
were not formatted with nightly rustfmt (required by Makefile.toml).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
rustc_1_55 enables const-generic [T; N]: tinyvec::Array impl which is
required by toad-common and other crates using ArrayVec<[T; N]>.
Removing it alone (without a migration to a different backing store)
breaks compilation. Keep both features.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Touching */Cargo.toml triggers fmt-check for each crate's sources.
Pre-emptively format toad-common, toad-array, toad-len, toad-map,
toad-string, toad-jni, and toad with cargo +nightly fmt to prevent
cascading CI fmt-check failures.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@smartyalgo smartyalgo merged commit f64adb5 into main Apr 8, 2026
1 check passed
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.

1 participant