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

Adapt to embedded-hal 1.0.0-alpha.1 #251

Closed
wants to merge 1 commit into from

Conversation

eldruin
Copy link
Member

@eldruin eldruin commented Jul 26, 2020

Blocked on rust-embedded/embedded-hal#177.
Currently it does not build because the mfrc522 crate used in an example needs to be adapted as well. Although this driver seems to be a bit out of date.

@eldruin eldruin marked this pull request as draft July 26, 2020 10:12
@TheZoq2
Copy link
Member

TheZoq2 commented Jul 26, 2020

Awesome, I gave it a quick overlook but should probably read it a bit more thoroughly before we merge. Does it make sense to port to the alpha version or should we wait for a full release? I'm inclined to do the latter, especially since I assume most drivers aren't up to date yet.

Sidenote: I believe this has been discussed in other places, but is it really nessecary to have try everywhere. It seems redundant since we see the potential issue at the type level, and there is no infallible things. Seems to just be extra clutter to me now...

@eldruin
Copy link
Member Author

eldruin commented Jul 26, 2020

Good question. I think it is a bit of a chicken-egg problem with HALs and drivers but for now I would wait for the final release since discussions at embedded-hal have picked up pace lately.
If you want to make a release, I would recommend making it also an -alpha.1 so that cargo does not upgrade it automatically.
Since there are so many breaking changes I thought it would help the community to prepare at least most of the changes already, so that it takes shorter to move the ecosystem to e-h 1.0.0.

There was a meeting where it was decided to make all methods fallible. See here for the reasoning.

@therealprof
Copy link
Member

Sidenote: I believe this has been discussed in other places, but is it really nessecary to have try everywhere. It seems redundant since we see the potential issue at the type level, and there is no infallible things. Seems to just be extra clutter to me now...

Well, Rust also uses try a lot and similarly to Rust where a lot of things are available in fallible and infallible versions some people would love to see infallible traits to make it back, too. For me labelling those methods try is really about consistency and allowing to have infallible things without the digital::v1 vs. digital::v2 kerfuffle.

@eldruin eldruin force-pushed the embedded-hal-1.0.0-alpha.1 branch from dbdbf07 to 3940511 Compare July 29, 2020 18:48
@TheZoq2
Copy link
Member

TheZoq2 commented Aug 1, 2020

Oh right, the point of leaving the possibility for infallible traits is a good one :)

@eldruin
Copy link
Member Author

eldruin commented Dec 17, 2020

Closing in favor of #296

@eldruin eldruin closed this Dec 17, 2020
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

Successfully merging this pull request may close these issues.

3 participants