-
Notifications
You must be signed in to change notification settings - Fork 220
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
New version? #92
Comments
I agree both with the idea of bumping the version with each change and to have a new release soon. |
What about releasing new version with revised list of unproven features? |
@ryankurte Which change is do you see as breaking? |
The falible digital traits PR (#105) is breaking |
Right, but I was hoping we would release a non-breaking 0.2.2 before pulling that in. |
Fine by me, we need more reviews on all the linked PRs so once 101 and 102 are reviewed and merged we can release an 0.2.3 then land 105 and 0.3.0. |
|
I can see people wanting to stay on 0.2.x until all crates are ready for 0.3 which will take a while and the request to prove traits has been an elephant in the room for quite a while even longer than this ticket which is also is a few months old now. |
I understand that people want proven traits, but I question the point of declaring traits with known issues proven, then breaking them due to those known issues. Yes, it sucks that those traits have known issues, and that we have to make breaking changes to fix those known issues. I don't see how declaring those traits proven right before making those breaking changes benefits anyone. I understand that those users who want the traits proven might stay on 0.2.x for a while. I don't see how not having to enable the But as I said previously: I'm not making a stand here. It's not what I would do, but if you want to merge #102, go ahead. |
I'd like to see that we're sticking to the rules which were once decided (or change them). Regarding the "issues" and breaking the traits in the next version: When the "digital" traits were conceived they were meant to cover regular GPIOs and operations on those usually can not fail so it didn't make sense to have them fallible. In hindsight it should have been clear that IO expanders and multiplexers exist (especially since people including me have used them in the past) and that someone will eventually come up with a driver. I am no and (most likely never will be) a fan of replacing the previous |
Let me take a step back here, because I think it's important we're all on the same page:
The combination of those two things is what I'm arguing against, because I think it makes no sense. But I don't think the combination of these two things is what you're arguing for. You want to go forward with #102, but you don't want to break the digital traits. Let's revisit my proposal to make the digital changes a clean break. I proposed this because I started feeling bad about that pull request, and didn't want it turning into one of these months-long affairs, where the contributor is changing stuff again and again, due to changing reviews with ever new insights. Due to the response there (+1's, no opposition), I assumed that we'd be doing this. I think I was wrong in at least one, possibly two ways. First, your comment has almost got me convinced that my proposal was wrong, and that we shouldn't do a clean break here. Second, even if I was right, it was wrong of me to assume we were going with this proposal after just a few days without opposition. I should have given you and others more time to respond. So, if we won't break the digital traits, #102 makes a lot more sense. The digital traits can become proven (and possibly, at the same time, deprecated), while we go forward with a second set of traits. That's something I can get behind. The question remains is how exactly we're going to transition (or whether we're going to transition at all). I think you're saying you might want to have two sets of traits in perpetuity, but I think that is not a workable solution, as I've previously explained.
As I said, I don't think keeping two sets of traits in perpetuity is a workable solution (again, my explanation), but a slow transition phase is perfectly fine. I still think my proposal ([1], [2]), which is possibly the same as your proposal, is the best way to go here. @ryankurte is not convinced, though :) |
I'm definitely less thinking of "in perpetuity" than a couple of months or a year. Having both traits side by side would allow for a smooth transition (and as mentioned previously it's even possible to bridge between the fallible and non-fallible interfaces even without losing anything in the common case of MCU GPIOs) and then we can easily phase out the old traits. New drivers for multiplexers etc. could easily offer just the new traits thus softly nudging users to change the HAL impls and their software... In cases like this (where I have two dozens of affected published crates and many more unpublished) I'm always considering how much pain it would cause me to have such breakage (and it would be immense!) and then I also have to consider when to make the change and how much pain it would cause to all users (or how many would then rather not take the new version and stay with the old one...). I'm not even sure how many GPIO examples we have in official documentation which would all require changing and big fat disclaimers and explanation of the two alternatives and how to choose... |
In that case, what would y'all think of a 0.2.2 release from the current master? |
(sorry, after landing 101) |
@ryankurte +1 |
@ryankurte Fine by me. |
Now that 101 has landed, I'd love to get a new version published. :) |
Looks to me like we need a PR with an updated changelog including all the changes introduced since @therealprof this action is exactly equivalent to my proposal in #100, see how it goes I guess? |
Operational comment: dont forget to do the semver trick to allow interoperation between 0.2.2 hal-impls / drivers and 0.3.0 drivers / hal-impls, at least for the traits that didn't change between the two versions. |
Thank you, @japaric. The release we currently agreed on will be a non-breaking patch release. We're aware of the semver trick and have been writing whole books worth of discussion about how specifically to employ it over in #100 :) |
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]>
hi folks, we've landed all the changes for fallible pins, which as far as i can see is currently non-breaking and only adds to the API (v1 is re-exported by default but marked depricated, v2 must be explicitly selected), which i think means we can consider this a minor release? as an aside, running
|
@ryankurte Definitely a minor release since we're not at 1.0 yet. However I have a feeling you have a slightly different understanding of minor. This is going to be 0.3.0 and we should revisit anything that should be added for that.
Who knows? 😅 |
@therealprof ahh good catch, s/minor/patch/g in my previous post, are there outstanding changes that require the planned minor bump over a patch release given the Seems to me we only have additions so far, though we could switch the default pin implementation to v2. also are there any other things we particularly want to land before a release? |
Good question. But due to the intrusive nature of this chance I'd probably rather make it a minor release instead, even if not technically necessary. |
That doesn't seem like a good reason enough to me. Incrementing the minor version will split the ecosystem, unless we do the manual work required to do the semver trick. I mean, if you volunteer to do that work, then I don't mind, I guess. Still, there'd be a chance of you missing something and causing breakage. Seems like an unnecessary risk to me. |
@hannobraun If you say so. My worry is more on the side of accidentally breaking existing applications than requiring an explicit opt-in to a new version. |
Well, I think both ways have a risk of accidentally breaking applications. My way could introduce an unintended breaking change, your way could accidentally split the ecosystem. In both cases, the solution would be to release a fix and yank the offending crate. I prefer my way because it's simpler and less work. But if we're going to release a new minor version anyway, I think we should switch the default In any case, I don't feel very strongly about this right now, so feel free to go ahead in whichever manner you think is best :-) |
-wonders whether we could convince crater to regression test hal changes- seems like it should be possible / could be valuable for us longer term, but, documentation seems lacking / i can't see how [edit] opened an issue: rust-lang/crater#407 |
ooh, what about a patch pre-release as a reasonably low effort middle ground? no changes by us (and thus a decreased chance of Maintenance Induced Failures), opt-in testing, and if we haven't had any reports of failures after a while we could then push a normal release. |
@ryankurte Is there a mechanism for that? |
i've definitely seen prereleases in use and on further research it's supported by semver but i can't parse from this issue or seem to find any docs about how cargo handles it ¯\(ツ)/¯ |
I'm fine with playing guinea pig here to unblock this. |
a quick test with this suggests that cargo won't auto-update from just to be clear, is that an ack on publishing a pre-release? (also any thoughts about calling it an |
@rust-embedded/hal Do we want to test the waters of the new version with a pre-release of the crate? Ticky-boxes for the win: |
Please do whatever you think is best. As I already stated, I'd just do a patch release, but I didn't mean to block any decision here, and I apologize if I gave that impression. |
131: Release version 0.2.3-rc.1 r=therealprof a=ryankurte hmm so cargo-release failed at pushing to master, but still pushed to [crates.io](https://crates.io/crates/embedded-hal/0.2.3-rc.1), might have to open a bug report there 😅 see also: #92 (comment) Co-authored-by: Ryan Kurte <[email protected]>
@ryankurte Are we happy with this now? |
i've been using that said, i think i'd be happy to release it and yank/fix if anything unforeseen crops up (partly because i'm not really seeing another option). |
@ryankurte Let's release it. |
133: Release v0.2.3 r=therealprof a=ryankurte Updated cargo version and changelog, see also #92 Co-authored-by: Ryan Kurte <[email protected]>
aand 0.2.3 is published and released. thanks for all your efforts! |
Hi,
Number of features have been added since 0.2.1 -- should there be another release? I can't use git dependency if I want to publish hal-impl to crates.io.
Are there any guildelines regarding versioning? Seems like any new feature merged to master should bump patch level, otherwise hal-impl can't really use them.
The text was updated successfully, but these errors were encountered: