schedule-rs icon indicating copy to clipboard operation
schedule-rs copied to clipboard

Error running with nightly

Open glennpierce opened this issue 8 years ago • 4 comments

I can only seem to run with nightly-2017-06-29 later versions give I think the issue is fixed in https://github.com/zslayton but not your local fork.

error: use of unstable library feature 'iterator_step_by': unstable replacement of Range::step_by (see issue #27741) --> /home/glenn/.cargo/git/checkouts/cron-652715304a961849/bcd3b79/src/time_unit/mod.rs:79:55 | 79 | Ok((start..Self::inclusive_max() + 1).step_by(step).collect()) | ^^^^^^^ | = help: add #![feature(iterator_step_by)] to the crate attributes to enable

error[E0308]: mismatched types --> /home/glenn/.cargo/git/checkouts/cron-652715304a961849/bcd3b79/src/time_unit/mod.rs:79:63 | 79 | Ok((start..Self::inclusive_max() + 1).step_by(step).collect()) | ^^^^ expected usize, found u32

PS do you think it is doable to fork a version that runs on stable rust ?

I ask as the unstable features #![feature(collections_range)] #![feature(conservative_impl_trait)] #![feature(step_by)]

don't seem to be moving towards stable very fast and I wonder if it would be easier for me to fork to use stable features. (Haven't looked at the code yet so I don't know if it is worth my time)

Thanks

glennpierce avatar Aug 03 '17 08:08 glennpierce

cron hasn't had a new release that fixes that sadly. We could pin a git version I suppose as its been a few months and the fix is on master. @zslayton Anything I can do to help here?


This crate doesn't actually use any unstable features. They're all in cron.

  • iterator_step_by is planned to be coming out in Rust 1.21 (~ October 12)
  • conservative_impl_trait (same as above)

step_by could be replaced with https://github.com/saghm/stepper conservative_impl_trait is only used once and could be replaced by a little macro

mehcode avatar Aug 03 '17 09:08 mehcode

I'm going to publish an updated version of the crate to fix the build issue this evening.

I'd be ok with replacing step_by, but I have a pull request pending that will make heavier use of impl Trait. That too could be supplanted by new data types, but it'd be more work. Getting onto stable is a worthwhile goal, though. Let me give this some thought.

zslayton avatar Aug 03 '17 16:08 zslayton

I've published v0.4 to crates.io.

zslayton avatar Aug 04 '17 01:08 zslayton

@zslayton Awesome, thanks. I'll get that integrated into here soon.

mehcode avatar Aug 13 '17 05:08 mehcode