From 0fbe0d3ba7868f6469e11ffbb00d210bbd9d7d31 Mon Sep 17 00:00:00 2001 From: Arne Beer Date: Sat, 1 Jun 2024 01:06:37 +0200 Subject: [PATCH] fix: Replace chrono-english with interim as drop-in --- Cargo.lock | 79 ++++++++++++++++++++++++++++++----------- Cargo.toml | 2 +- pueue/Cargo.toml | 2 +- pueue/src/client/cli.rs | 2 +- 4 files changed, 62 insertions(+), 23 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 0b772f3a..6b8631ad 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -149,6 +149,12 @@ version = "0.22.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "72b3254f16251a8381aa12e40e3c4d2f0199f8c6508fbecb9d91f575e0fbb8c6" +[[package]] +name = "beef" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3a8241f3ebb85c056b509d4327ad0358fbbba6ffb340bf388f26350aeda225b1" + [[package]] name = "better-panic" version = "0.3.0" @@ -269,9 +275,9 @@ checksum = "fd16c4719339c4530435d38e511904438d07cce7950afa3718a84ac36c10e89e" [[package]] name = "chrono" -version = "0.4.35" +version = "0.4.38" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8eaf5903dcbc0a39312feb77df2ff4c76387d591b9fc7b04a238dcf8bb62639a" +checksum = "a21f936df1771bf62b77f047b726c4625ff2e8aa607c01ec06e5a05bd8463401" dependencies = [ "android-tzdata", "iana-time-zone", @@ -282,16 +288,6 @@ dependencies = [ "windows-targets 0.52.5", ] -[[package]] -name = "chrono-english" -version = "0.1.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f73d909da7eb4a7d88c679c3f5a1bc09d965754e0adb2e7627426cef96a00d6f" -dependencies = [ - "chrono", - "scanlex", -] - [[package]] name = "clang-sys" version = "1.8.0" @@ -574,6 +570,12 @@ version = "2.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9fc0510504f03c51ada170672ac806f1f105a88aa97a5281117e1ddc3368e51a" +[[package]] +name = "fnv" +version = "1.0.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" + [[package]] name = "futures" version = "0.3.30" @@ -791,6 +793,16 @@ dependencies = [ "hashbrown", ] +[[package]] +name = "interim" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9afd0f0bff60c0e845844b6ee665e07990541ef3b70d8cd21861cf85b69fbef4" +dependencies = [ + "chrono", + "logos", +] + [[package]] name = "is_terminal_polyfill" version = "1.70.0" @@ -846,7 +858,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0c2a198fb6b0eada2a8df47933734e6d35d350665a33a3593d7164fa52c75c19" dependencies = [ "cfg-if", - "windows-targets 0.52.5", + "windows-targets 0.48.5", ] [[package]] @@ -892,6 +904,39 @@ version = "0.4.21" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "90ed8c1e510134f979dbc4f070f87d4313098b704861a105fe34231c70a3901c" +[[package]] +name = "logos" +version = "0.14.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "161971eb88a0da7ae0c333e1063467c5b5727e7fb6b710b8db4814eade3a42e8" +dependencies = [ + "logos-derive", +] + +[[package]] +name = "logos-codegen" +version = "0.14.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e31badd9de5131fdf4921f6473d457e3dd85b11b7f091ceb50e4df7c3eeb12a" +dependencies = [ + "beef", + "fnv", + "lazy_static", + "proc-macro2", + "quote", + "regex-syntax 0.8.3", + "syn", +] + +[[package]] +name = "logos-derive" +version = "0.14.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1c2a69b3eb68d5bd595107c9ee58d7e07fe2bb5e360cc85b0f084dedac80de0a" +dependencies = [ + "logos-codegen", +] + [[package]] name = "matchers" version = "0.1.0" @@ -1225,7 +1270,6 @@ dependencies = [ "assert_cmd", "better-panic", "chrono", - "chrono-english", "clap", "clap_complete", "clap_complete_nushell", @@ -1235,6 +1279,7 @@ dependencies = [ "ctrlc", "env_logger", "handlebars", + "interim", "log", "pest", "pest_derive", @@ -1569,12 +1614,6 @@ version = "1.0.18" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f3cb5ba0dc43242ce17de99c180e96db90b235b8a9fdc9543c96d2209116bd9f" -[[package]] -name = "scanlex" -version = "0.1.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "088c5d71572124929ea7549a8ce98e1a6fd33d0a38367b09027b382e67c033db" - [[package]] name = "scopeguard" version = "1.2.0" diff --git a/Cargo.toml b/Cargo.toml index 1bda0e7a..95e14e57 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -16,7 +16,7 @@ rust-version = "1.67" [workspace.dependencies] # Chrono version is hard pinned to a specific version. # See https://github.com/Nukesor/pueue/issues/534 -chrono = { version = "=0.4.35", features = ["serde"] } +chrono = { version = "0.4", features = ["serde"] } command-group = "5" log = "0.4" serde = "1.0" diff --git a/pueue/Cargo.toml b/pueue/Cargo.toml index 8484a9be..3b38bd8f 100644 --- a/pueue/Cargo.toml +++ b/pueue/Cargo.toml @@ -17,7 +17,7 @@ maintenance = { status = "actively-developed" } [dependencies] anyhow = "1.0" chrono = { workspace = true } -chrono-english = "0.1" +interim = { version="0.1.2", features = ["chrono"] } clap = { version = "4.5.1", features = ["derive", "cargo", "help"] } clap_complete = "4.5.1" clap_complete_nushell = "4.5.1" diff --git a/pueue/src/client/cli.rs b/pueue/src/client/cli.rs index 10e2f98e..cc7f26da 100644 --- a/pueue/src/client/cli.rs +++ b/pueue/src/client/cli.rs @@ -2,9 +2,9 @@ use std::path::PathBuf; use chrono::prelude::*; use chrono::TimeDelta; -use chrono_english::*; use clap::ArgAction; use clap::{Parser, ValueEnum, ValueHint}; +use interim::*; use pueue_lib::network::message::Signal;