divoom icon indicating copy to clipboard operation
divoom copied to clipboard

Errors compiling main tree

Open opi-smccoole opened this issue 1 year ago • 0 comments

When attempting to install via cargo or compile locally the build errors out with:

error[E0308]: mismatched types
   --> /Users/mccoole/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-cron-scheduler-0.7.6/src/job/mod.rs:346:41
    |
346 |                       .checked_add_signed(time::Duration::seconds(
    |  ______________________------------------_^
    | |                      |
    | |                      arguments to this method are incorrect
347 | |                         instant.duration_since(Instant::now()).as_secs() as i64,
348 | |                     ))
    | |_____________________^ expected `chrono::Duration`, found `time::Duration`
    |
    = note: `time::Duration` and `chrono::Duration` have similar names, but are actually distinct types
note: `time::Duration` is defined in crate `time`
   --> /Users/mccoole/.cargo/registry/src/index.crates.io-6f17d22bba15001f/time-0.1.45/src/duration.rs:45:1
    |
45  | pub struct Duration {
    | ^^^^^^^^^^^^^^^^^^^
note: `chrono::Duration` is defined in crate `chrono`
   --> /Users/mccoole/.cargo/registry/src/index.crates.io-6f17d22bba15001f/chrono-0.4.31/src/duration.rs:55:1
    |
55  | pub struct Duration {
    | ^^^^^^^^^^^^^^^^^^^
note: method defined here
   --> /Users/mccoole/.cargo/registry/src/index.crates.io-6f17d22bba15001f/chrono-0.4.31/src/datetime/mod.rs:377:12
    |
377 |     pub fn checked_add_signed(self, rhs: OldDuration) -> Option<DateTime<Tz>> {
    |            ^^^^^^^^^^^^^^^^^^

It appears that an update to tokio-cron-scheduler is needed. I have a working branch with tokio-cron-scheduler updated to 0.9.4 and a few other changes necessary from that change. I will open a PR and reference this issue.

opi-smccoole avatar Dec 27 '23 23:12 opi-smccoole