lholden / job_scheduler

A simple cron-like job scheduling library for Rust.
Apache License 2.0
196 stars 34 forks source link

Not working with latest nightly (as of at least 2018-05-30) #7

Closed trsh closed 6 years ago

trsh commented 6 years ago

First it required nightly rust, and then

  --> /home/trsh/.cargo/registry/src/github.com-1ecc6299db9ec823/cron-0.4.0/src/time_unit/mod.rs:18:23
   |
18 | use std::collections::range::{RangeArgument};
   |                       ^^^^^ Could not find `range` in `collections`
lholden commented 6 years ago

I'll take a look at it. In regards to stable... unfortunately the cron crate that I depend on uses features from nightly so this will not be able to work on stable. I've commented about this on the README file.

lholden commented 6 years ago

Looks like the latest nightly is breaking the cron crate which is what job_scheduler depends on. Unfortunate. The latest nightly also breaks a lot of other crates I use for other projects at work :(.

If you set your rust version (can use rustup override) to nightly-2018-05-16, this is the version we currently use at my office and is known to work well atm. I just verified that this version works for job_schedule. Sorry about that! I'll update the readme with a note about the latest nightly breaking my dependency. I was thinking about perhaps writing my own cron parser so that the crate compiles on stable. I don't quite have time to do that just at the moment.

Please let me know if this version of nightly works for you. Otherwise I can fork the cron crate to fix the issue and do a pull request.

lholden commented 6 years ago

Created a pull request for the cron crate fixing the issue on the latest nightly.

https://github.com/zslayton/cron/pull/34

lholden commented 6 years ago

OK! Cron 0.4.1 has been released and job_scheduler now compiles on the latest nightly. Going to close out this issue.

$ rustup update
info: syncing channel updates for 'nightly-x86_64-unknown-linux-gnu'
info: latest update on 2018-06-01, rust version 1.28.0-nightly (1ffb32147 2018-05-31)
info: downloading component 'rustc'
info: downloading component 'rust-std'
info: downloading component 'cargo'
info: downloading component 'rust-docs'
info: removing component 'rustc'
info: removing component 'rust-std'
info: removing component 'cargo'
info: removing component 'rust-docs'
info: installing component 'rustc'
info: installing component 'rust-std'
info: installing component 'cargo'
info: installing component 'rust-docs'
info: checking for self-updates

 nightly-x86_64-unknown-linux-gnu updated - rustc 1.28.0-nightly (1ffb32147 2018-05-31)

$ cargo build
    Updating registry `https://github.com/rust-lang/crates.io-index`
 Downloading cron v0.4.1                                                        
   Compiling cc v1.0.17                                                         
   Compiling num-traits v0.2.4
   Compiling num-integer v0.1.38
   Compiling libc v0.2.41
   Compiling cfg-if v0.1.3
   Compiling rustc-demangle v0.1.8
   Compiling nom v2.1.0
   Compiling time v0.1.40
   Compiling backtrace-sys v0.1.23
   Compiling chrono v0.4.2
   Compiling backtrace v0.3.8
   Compiling error-chain v0.10.0
   Compiling cron v0.4.1
   Compiling job_scheduler v1.0.4 (file:///home/lholden/Projects/job_scheduler)
    Finished dev [unoptimized + debuginfo] target(s) in 6.16s
trsh commented 6 years ago

tnx