-
Notifications
You must be signed in to change notification settings - Fork 45
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
Futures 0.3 #60
Futures 0.3 #60
Conversation
Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @nastevens (or someone else) soon. If any changes to this PR are deemed necessary, please add them as extra commits. This ensures that the reviewer can see what has changed since they last reviewed the code. Due to the way GitHub handles out-of-date commits, this should also make it reasonably obvious what issues have or haven't been addressed. Large or tricky changes may require several passes of review and changes. Please see the contribution instructions for more information. |
I can see that this probably won't compile without bumping the MSRV. What's the policy on that? |
For managing pins I much prefer |
Before I go into a detailed review I'd like to get @posborne's thoughts on overall direction. Do we release a new major version with only Futures 0.3 support? Or should that support be behind a different feature flag (like @benjumanji are you using this library in a project? If so, what are your opinions on what would work best for your workflow? |
I am using it for a project yes, but I am happy to run my own fork (praise be to cargo for making this so easy) until you have a clear idea of how you want this merged, so I'm easy. |
I'll switch over to that. |
I've been thinking about this more, I think a major version bump that just supports new futures would suit me best. This is a relatively small library, so I think back porting bug fixes to prior versions wouldn't be so painful. Maintaining both kinds of futures impl behind gates seems work for not so much gain. |
Yup, I think I agree with you there. I think it also helps that there are compat layers that can be used to go to/from futures 0.1/0.3. Plus, with sysfs-gpio being removed from the kernel soon (or already removed? I forget...), this library won't be needed anymore right? Because embedded devices always use the newest kernel? |
Something that is kind of a bummer, which I haven't yet figured out is caused by me not knowing what I am doing or is inherent to new tokio, is this pr means that you can't create a stream outside of a reactor anymore. EDIT: having read around a bit more, and seeing that tokio-serial has the same new restriction I don't feel bad about this anymore. |
cries in legacy kernel |
@nastevens , I think, 4.19 with us for years. |
Hi, Regarding the version for the new release I also vote for a new major version and cutting the support for the old futures API. This PR would resolve #56 Thanks for the work. |
Thank you for testing it out! |
@nastevens @pheki |
Signed-off-by: Paul Osborne <[email protected]>
Signed-off-by: Paul Osborne <[email protected]>
@nastevens @ryankurte I added a few commits to this to hopefully get things into a mergeable state. I didn't get a chance to run on hardware this evening as I didn't have anything handy to test with ATM but can throw it on something to validate. |
Thanks for cleaning it up! 😬 Funnily enough for my own projects I have actually dropped async entirely and migrated to the cdev driver, but for the few months that I had it running on devices (fleet of rpis) it worked just fine. |
Is there anything against merging this? |
@eldruin i'd prefer to have an updated tokio dep but if you're planning to resolve that in your updates, no opposition from me! from previous feature experience, it's probably worth adding to the test matrix a build with / without the |
@ryankurte about the naming convention, I went to check and according to the official API guidelines by the rust library team it's unclear, but:
Sources: |
I proposed using |
69: Bump async dependencies r=eldruin a=oll3 Bumped tokio, mio and futures to recent versions. Took some inspiration from the previous gpio-cdev tokio work and also picked some parts from #60. Not tested the mio parts but the tokio example (from #60) seems to be working. Co-authored-by: Olle Sandberg <[email protected]> Co-authored-by: Paul Osborne <[email protected]>
Fixed in #69. |
First effort at adding support for the new futures ecosystem. I haven't given it much of a run through yet, this is more just to let people know I am working on it. Comments welcome.