Skip to content

fix: restore missing enum and fix import ordering after web_time migration#259

Draft
Copilot wants to merge 6 commits intomasterfrom
copilot/fix-issue-257
Draft

fix: restore missing enum and fix import ordering after web_time migration#259
Copilot wants to merge 6 commits intomasterfrom
copilot/fix-issue-257

Conversation

Copy link
Contributor

Copilot AI commented Mar 9, 2026

Two regressions introduced during the std::timeweb_time migration broke CI.

Changes

  • examples/redis-async.rs — Restored accidentally deleted #[derive(Error, Debug, PartialEq, Clone)] enum ExampleError declaration, which left orphaned RedisError(String), and } causing a parse error
  • 10 files — Fixed rustfmt import ordering: web_time (w) imports were placed before alphabetically-later crates (thiserror, tokio) in examples/, src/stores/, and tests/

✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Adds a `time_stores` feature (included in default) that gates all
time-dependent cache types (TimedCache, TimedSizedCache, ExpiringSizedCache).
Users targeting wasm32-unknown-unknown without WASI/JS can now disable
this feature to avoid the web-time dependency.

Changes:
- Add `time_stores` feature to Cargo.toml (in default features)
- Make `web-time` an optional dependency gated by `time_stores`
- Move Status enum from timed.rs to stores/mod.rs (shared)
- Gate timed, timed_sized, expiring_sized modules behind time_stores
- Fix once.rs proc macro to only generate web_time::Instant::now() when time= is set
- Update doc tests and integration tests with cfg guards
- Update documentation in lib.rs and README.md

Co-authored-by: jaemk <13563490+jaemk@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix issue number 257 Add time_stores feature to gate time-dependent caches (fixes wasm32-unknown-unknown builds) Mar 9, 2026
Copilot finished work on behalf of jaemk March 9, 2026 06:11
…and tests

Co-authored-by: jaemk <13563490+jaemk@users.noreply.github.com>
Copilot AI changed the title Add time_stores feature to gate time-dependent caches (fixes wasm32-unknown-unknown builds) Add time_stores feature to gate time-dependent cache types for bare WASM targets Mar 9, 2026
Copilot finished work on behalf of jaemk March 9, 2026 12:21
Co-authored-by: jaemk <13563490+jaemk@users.noreply.github.com>
Copilot AI changed the title Add time_stores feature to gate time-dependent cache types for bare WASM targets Replace all std::time usage with web_time across the codebase Mar 9, 2026
Copilot finished work on behalf of jaemk March 9, 2026 12:59
…dependency note

Co-authored-by: jaemk <13563490+jaemk@users.noreply.github.com>
Copilot AI changed the title Replace all std::time usage with web_time across the codebase Replace all std::time usage with web_time drop-in replacement; sync README Mar 9, 2026
Copilot finished work on behalf of jaemk March 9, 2026 16:10
Copilot AI changed the title Replace all std::time usage with web_time drop-in replacement; sync README docs: sync README.md with src/lib.rs via cargo-readme Mar 9, 2026
Copilot finished work on behalf of jaemk March 9, 2026 16:39
… ordering

Co-authored-by: jaemk <13563490+jaemk@users.noreply.github.com>
Copilot AI changed the title docs: sync README.md with src/lib.rs via cargo-readme fix: restore missing enum and fix import ordering after web_time migration Mar 9, 2026
Copilot finished work on behalf of jaemk March 9, 2026 16:58
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