Summary
KeepOptions::apply takes &jiff::Zoned:
pub fn apply(&self, snapshots: Vec<SnapshotFile>, now: &Zoned) -> RusticResult<Vec<ForgetSnapshot>>;
…and SnapshotFile::time returns Zoned too. To call either, a downstream crate has to add jiff to its own Cargo.toml and use the same major version rustic_core was built against — otherwise the Zoned type is technically a different type and the call doesn't compile.
This is a classic leaked-dependency footgun: a cargo update of jiff upstream can break consumers in a way that's hard to diagnose.
Suggestion
Either:
- Re-export jiff at the crate root:
pub use jiff; in lib.rs. Consumers can then write rustic_core::jiff::Zoned and stay version-locked automatically.
- Wrap timestamps in an opaque type — e.g.
RusticTimestamp(jiff::Zoned) with constructors and a chrono-/jiff-conversion API. Heavier, but isolates the public API from the time-crate ecosystem entirely.
Option 1 is cheap and solves the immediate version-mismatch hazard. Option 2 is a more deliberate design choice that frees future versions of rustic_core to swap or add time backends.
Context
cargo add jiff works around this in the short term, which is what we did. Flagging it because the fix in rustic_core itself is a one-liner (re-export) and would help other consumers.
Summary
KeepOptions::applytakes&jiff::Zoned:…and
SnapshotFile::timereturnsZonedtoo. To call either, a downstream crate has to addjiffto its ownCargo.tomland use the same major versionrustic_corewas built against — otherwise theZonedtype is technically a different type and the call doesn't compile.This is a classic leaked-dependency footgun: a
cargo updateofjiffupstream can break consumers in a way that's hard to diagnose.Suggestion
Either:
pub use jiff;inlib.rs. Consumers can then writerustic_core::jiff::Zonedand stay version-locked automatically.RusticTimestamp(jiff::Zoned)with constructors and achrono-/jiff-conversion API. Heavier, but isolates the public API from the time-crate ecosystem entirely.Option 1 is cheap and solves the immediate version-mismatch hazard. Option 2 is a more deliberate design choice that frees future versions of
rustic_coreto swap or add time backends.Context
cargo add jiffworks around this in the short term, which is what we did. Flagging it because the fix inrustic_coreitself is a one-liner (re-export) and would help other consumers.