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

Drop use of unstable try_trait_v2 feature #479

Merged
merged 1 commit into from
Sep 1, 2022

Conversation

nicholasbishop
Copy link
Member

It seems like there's still a fair amount of discussion around what the
Try API should look like in the tracking issue for try_trait_v2. This
could lead to the API being changed in the nightly compiler, and
breaking uefi-rs compilation (which is particularly annoying when using
a released version rather than the latest git version).

To avoid that possibility, just drop the feature as it is not much used
in uefi-rs and can easily be replaced. As described in the changelog,
most uses can be fixed by adding a call to into(). If the compiler
needs a bit more help, Result::from(status) can be used.

#452

@GabrielMajeri
Copy link
Collaborator

Just an idea: would it be possible/a good idea to keep the current implementation around, but behind a feature flag, or is the only right solution to completely remove this code?

@nicholasbishop
Copy link
Member Author

I've uploaded a variation that puts it behind an optional feature: #481

I don't have a strong opinion as to whether it's better to do it that way. It has the advantage of avoiding any potential downstream breakage as long as we have the feature enabled by default, but on the other hand it adds some small amount of complexity for an (IMO) small gain.

So, I could really see it either way and would be happy with either option :)

@phip1611
Copy link
Contributor

phip1611 commented Aug 17, 2022

It has the advantage of avoiding any potential downstream breakage

There are currently already breaking changes in the next release if I'm not mistaken (some removed functionality).

I'd suggest to not create future technical debt here. What do you think?

It seems like there's still a fair amount of discussion around what the
Try API should look like in the tracking issue for try_trait_v2. This
could lead to the API being changed in the nightly compiler, and
breaking uefi-rs compilation (which is particularly annoying when using
a released version rather than the latest git version).

To avoid that possibility, just drop the feature as it is not much used
in uefi-rs and can easily be replaced. As described in the changelog,
most uses can be fixed by adding a call to `into()`. If the compiler
needs a bit more help, `Result::from(status)` can be used.

rust-osdev#452
@nicholasbishop nicholasbishop merged commit ab13149 into rust-osdev:main Sep 1, 2022
@nicholasbishop nicholasbishop deleted the bishop-drop-tryv2 branch September 1, 2022 21:36
@nicholasbishop
Copy link
Member Author

Thanks both for reviewing. Never any harm in exploring a couple different alternatives, and I like where we ended up :)

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