Nukesor / pueue

:stars: Manage your shell commands.
MIT License
4.68k stars 128 forks source link

Install fails without `--locked` #523

Closed max-sixty closed 3 months ago

max-sixty commented 3 months ago

Describe the bug

pueue is awesome — my favorite new tool — thank you!


FYI without --locked the install fails at the moment:


   Compiling chrono-english v0.1.7
error[E0277]: the trait bound `Tz: Copy` is not satisfied
   --> /Users/maximilian/.cargo/registry/src/index.crates.io-6f17d22bba15001f/chrono-english-0.1.7/src/types.rs:131:40
    |
131 |                 if let Some(correct) = next_last_direction(date, base, nd.direct) {
    |                                        ^^^^^^^^^^^^^^^^^^^ the trait `Copy` is not implemented for `Tz`, which is required by `chrono::DateTime<Tz>: Copy`
    |
    = note: required for `chrono::DateTime<Tz>` to implement `Copy`
note: required by a bound in `next_last_direction`
   --> /Users/maximilian/.cargo/registry/src/index.crates.io-6f17d22bba15001f/chrono-english-0.1.7/src/types.rs:61:40
    |
61  | fn next_last_direction<T: PartialOrd + Copy>(date: T, base: T, direct: Direction) -> Option<i32> {
    |                                        ^^^^ required by this bound in `next_last_direction`
help: consider further restricting this bound
    |
101 |     pub fn to_date_time<Tz: TimeZone + std::marker::Copy>(
    |                                      +++++++++++++++++++

For more information about this error, try `rustc --explain E0277`.
error: could not compile `chrono-english` (lib) due to 1 previous error

Steps to reproduce

as above

Debug logs (if relevant)

No response

Operating system

MacOS

Pueue version

v3.4.0

Additional context

No response

Nukesor commented 3 months ago

Yes, this is a known problem and nothing we can do about right now.

Additionally, this is why the installation instructions specifically state to use --locked during the install.

Chrono introduced breaking changes and one of the dependencies used by Pueue is pretty much unmaintained. We need to switch to another crate, but there's no crate with this functionality. I'm currently working on porting the needed functionality to the dateparser crate, but this will take time and motivation.

https://github.com/waltzofpearls/dateparser/issues/48

Current progress: https://github.com/Nukesor/dateparser/tree/natural-language

max-sixty commented 3 months ago

That makes sense @Nukesor , thanks. I'll close.

(I had thought it's possible to get this by aligning Cargo.toml with whatever is in Cargo.lock which works — but not important and thanks again for pueue...)