diff --git a/Cargo.lock b/Cargo.lock index 1b1a62a9..4035b24a 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -365,9 +365,9 @@ checksum = "a6cb138bb79a146c1bd460005623e142ef0181e3d0219cb493e02f7d08a35695" [[package]] name = "jiff" -version = "0.2.46" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "175dc66334db3b9ab9985bf8b61cfed50dc16d20964bb47f9e479adcae984a7f" +checksum = "379ed44bd4e16d3926160e2b3a78b79ca0952ef5c037f124f554842ba272ef92" dependencies = [ "jiff-core", "jiff-static", @@ -381,36 +381,36 @@ dependencies = [ [[package]] name = "jiff-core" -version = "0.1.8" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e599b80292e597019b8b3e392de3f4bea2959ddfb8c7dff60e035e9e311a2c1b" +checksum = "0df46fc314b4f458aee614afcd8676ed6cb3637413aa359d47d2646cbc038b79" dependencies = [ "log", ] [[package]] name = "jiff-static" -version = "0.2.46" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c7b1af7547d47354bc438d797e3854601bde8f8d185780c5ba4ab27afa54f1ba" +checksum = "27b729c549d3efb5855b3c80b0ee8ee1850d56330a127382fe2760965741c1f3" dependencies = [ "jiff-core", "proc-macro2", "quote", - "syn 2.0.119", + "syn 3.0.3", ] [[package]] name = "jiff-tzdb" -version = "0.1.9" +version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fa8377070c6bae868759445e5a77f66d84f0b72f3a054bfb00e6d038b8282da7" +checksum = "12e71a1b68a875a44a33bb7a1dd84392cb77145a3367a552a3cfe6a4f5cf3afc" [[package]] name = "jiff-tzdb-platform" -version = "0.1.3" +version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "875a5a69ac2bab1a891711cf5eccbec1ce0341ea805560dcd90b7a2e925132e8" +checksum = "dc65b284afcfa8f6cf189c7274c805505314a7ab975c60e1f548bff56525420e" dependencies = [ "jiff-tzdb", ] @@ -494,9 +494,9 @@ dependencies = [ [[package]] name = "parse_datetime" -version = "0.17.0" +version = "0.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cb51967a779ef73b125a243688e53e4bb2474f91cae72734ee5051e857fb2645" +checksum = "3b8df45e76bfb0c4f1882f3129c468b0c1d53123ebd1b42eb5b9755fc30bdd5e" dependencies = [ "jiff", "num-traits", diff --git a/Cargo.toml b/Cargo.toml index cc8e6019..6e9ef96f 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -71,8 +71,8 @@ uucore = "0.13" thiserror = "2" # Dates -parse_datetime = "0.17" -jiff = { version = "0.2", default-features = false, features = ["std"] } +parse_datetime = "0.18" +jiff = { version = "1", default-features = false, features = ["std"] } # Unix/Linux rustix = { version = "1", features = ["event", "fs", "param", "process", "pty", "rand", "termios"] } diff --git a/renovate.json b/renovate.json index eb24f50f..ae7b5be5 100644 --- a/renovate.json +++ b/renovate.json @@ -10,6 +10,14 @@ ".github/workflows/release.yml" ], "enabled": false + }, + { + "description": "parse_datetime's public API takes and returns jiff types, so each parse_datetime release requires one jiff major. Updated apart, each pull request fails: the new parse_datetime cannot build against the old jiff, and the new jiff alone leaves two jiff majors, which deny.toml forbids.", + "matchPackageNames": [ + "jiff", + "parse_datetime" + ], + "groupName": "jiff and parse_datetime" } ], "customManagers": [ diff --git a/src/shadow-core/Cargo.toml b/src/shadow-core/Cargo.toml index 39f01381..accde1a0 100644 --- a/src/shadow-core/Cargo.toml +++ b/src/shadow-core/Cargo.toml @@ -19,9 +19,10 @@ path = "src/lib.rs" [dependencies] clap = { workspace = true } -# `Zoned::now()` reads the local zone: `tz-system` reads TZ and /etc/localtime, -# and `tzdb-zoneinfo` resolves a zone name such as TZ=Europe/Paris against -# /usr/share/zoneinfo. Without them the zone silently behaves as UTC. +# `ZonedDateTime::now()` reads the local zone: `tz-system` reads TZ and +# /etc/localtime, and `tzdb-zoneinfo` resolves a zone name such as +# TZ=Europe/Paris against /usr/share/zoneinfo. Without them the zone silently +# behaves as UTC. jiff = { workspace = true, features = ["tz-system", "tzdb-zoneinfo"] } libc = { workspace = true } parse_datetime = { workspace = true } diff --git a/src/shadow-core/src/date.rs b/src/shadow-core/src/date.rs index 401b5350..bde68fd3 100644 --- a/src/shadow-core/src/date.rs +++ b/src/shadow-core/src/date.rs @@ -79,7 +79,7 @@ pub fn parse_expire_date(s: &str) -> Result, ShadowError> { .bytes() .all(|b| b.is_ascii_digit() || b == b'-' || b == b'+') { - return parse_free_form_date(s, jiff::Zoned::now()); + return parse_free_form_date(s, jiff::ZonedDateTime::now()); } // A bare integer is already days since the epoch. @@ -122,7 +122,7 @@ pub fn parse_expire_date(s: &str) -> Result, ShadowError> { /// and return its day number. The time of day is dropped: the field holds a /// day. Relative forms such as `tomorrow` count from `now`, which the caller /// reads once so that every relative form is resolved against one instant. -fn parse_free_form_date(s: &str, now: jiff::Zoned) -> Result, ShadowError> { +fn parse_free_form_date(s: &str, now: jiff::ZonedDateTime) -> Result, ShadowError> { let invalid = || ShadowError::Validation(format!("invalid date '{s}'").into()); let zoned = parse_datetime::parse_datetime_at_date(now, s) @@ -287,7 +287,7 @@ mod tests { // the clock again, or kept the time of day, land on the wrong day. let now = jiff::civil::date(2030, 1, 2) .at(23, 59, 59, 0) - .to_zoned(jiff::tz::TimeZone::UTC) + .to_zoned_datetime(jiff::tz::TimeZone::UTC) .unwrap(); // 2030-01-02 is day 21916. for (form, day) in [