-
Notifications
You must be signed in to change notification settings - Fork 232
Remove InputPin unproven flag per #41 #102
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
Conversation
Thanks @ryankurte. It would be easiest for me if this was done after landing #97. I will push some changes to #97 this afternoon and I think it should be quite ready for merge then. However, landing this would mean declaring an infallible trait proven and at the same time it is clear that we want to replace it with a fallible version. |
Ahh, you make a good point. Probably better to leave it unproven and close this and wait I suspect. Thanks for the response! |
So here's the thing: Marking something as proven is a compatible change so we can easily do that anytime (and we should have a long time ago). The fallible version OTOH is a breaking change so it will require a bit more coordination (and pooling with other breaking changes into a new minor release) and it is going to be unproven (unless there's enough implementations already, to make it proven). So for me those two topics are really separate issues and I would go ahead and make the compatible change now and the other change whenever everything is ready. @rust-embedded/hal and all, really: Opinions? |
Question: We're about to change those traits, so would that not reset their proven-ness? I mean, the new fallible version won't initially have the number of required implementations and users. And how will we handle this in general? If we decide to handle breaking releases as clean cuts as opposed to having a transition strategy (see #100), will it ever be okay to re-add a trait to the unproven set? Seems user-unfriendly to remove a proven trait and require the user not only to upgrade, but opt into I'm not sure if that's going to be my position going forward, but this certainly is one of those moments where I'm thinking that the whole |
I think my perspective has changed and I agree with @therealprof in this instance, that this trait has been proven, and that whether we revert / introduce unproven for new breaking changes is a separate issue / decision to be made. |
@ryankurte Care to check out the conflicts? |
72e8f70
to
9f676a0
Compare
As I understood the discussion, implementing #97 as a clean break would mean the replacement fallible version of the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As the discussion in #92 has made clear to me, we're not at all on the same page about what's currently happening, probably due to too many discussions going on in parallel in many places. I'm officially registering my opposition to merging this pull request, unless we decide on a transition plan for the digital traits in #100.
Context: #92 (comment)
Ping from triage: is there any progress on this? |
We came up with a compromise for the transition plan, and that's already been enacted. Not sure what's supposed to happen here right now (I'd need to review the policy on unproven
, which I don't have time for right now). I any case, I'm no longer opposed to this, and I'm dismissing my review.
127: Digital v1 <-> v2 compatibility wrappers and shims r=japaric a=ryankurte This PR introduces implicit v1 -> v2 (forward) compatibility, and explicit wrapper types for v2 -> v1 (reverse) compatibility between digital trait versions as a final step for #95, as well as moving the deprecated v1 traits to a re-exported module for clarity. As @japaric pointed out, it is not feasible to have implicit compatibility in both directions, so it seemed reasonable to make regression explicit as it hides an `.unwrap()` on failure. @therealprof, @hannobraun, @eldruin what do you think of this approach? I think it probably needs more documentation, though I am definitely open to suggestions as to what / where. See also: #100, #92, #102. Co-authored-by: Ryan Kurte <[email protected]> Co-authored-by: Diego Barrios Romero <[email protected]> Co-authored-by: Daniel Egger <[email protected]>
Ping from triage: Can we rebase and merge ? |
Hm, I guess the moment we land this someone is going to request a fallible version of it. 😅 |
Rich Hickey has a good point saying that union type is better than class type as it avoid breaking compatibility. |
Must have missend that comment. Have a link to it? |
I already did :) I don't do it for fun, just that I want to get rid of panicking on error. At the moment I have no other choice. |
@eldruin I guess what @therealprof says is that someone would like the trait to have |
@mathk That ( But since v2 of the Input Pin is already fallible that shouldn't be a problem anymore. But is it really useful to remove the unproven flag here when v1 is already deprecated? |
this PR applies to a previous version of the library, so i'm going to close it as no-longer-required. feel free to open an equivalent if you would like to mark the |
InputPin
trait has been demonstrated (see: #41 (comment) amongst other impls), this PR removes theunproven
feature flag. This is either blocked by or dependent on #95 and #97 (what do you think, @eldruin?), and blocks rust-embedded/linux-embedded-hal#11