Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Errors compiling main tree #86

Open
opi-smccoole opened this issue Dec 27, 2023 · 0 comments
Open

Errors compiling main tree #86

opi-smccoole opened this issue Dec 27, 2023 · 0 comments

Comments

@opi-smccoole
Copy link
Contributor

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant