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

ScopedProtocol::interface claims to be deprecated since 0.16.0, but the replacement Deref/DerefMut didn't make it into 0.16.0 #484

Closed
ColinFinck opened this issue Aug 24, 2022 · 1 comment · Fixed by #485
Assignees

Comments

@ColinFinck
Copy link
Contributor

I just had a confusion when trying to run examples from the "main" branch with latest released uefi-rs crate 0.16.0.
It turns out that you cannot yet call open_protocol and just dereference the returned ScopedProtocol to the actual Protocol, because #434 didn't make it into 0.16.0.

What is even more confusing though is this attribute in the current "main" branch:

uefi-rs/src/table/boot.rs

Lines 1399 to 1400 in d3206d6

#[deprecated(since = "0.16.0", note = "use Deref and DerefMut instead")]
pub interface: &'a UnsafeCell<P>,

Claiming that ScopedProtocol::interface was deprecated in 0.16.0 is wrong when it was actually only deprecated in "main".

I don't know what your next release will be, but the attribute should first be updated to the version number of that release.

@nicholasbishop nicholasbishop self-assigned this Aug 24, 2022
nicholasbishop added a commit to nicholasbishop/uefi-rs that referenced this issue Aug 24, 2022
The replacement for accessing this field (Deref/DerefMut on
ScopedProtocol) isn't part of 0.16.0, so it isn't correct to mark the
field deprecated in that version. Bump to 0.17.0, which should be the
next version of uefi.

Fixes rust-osdev#484
@nicholasbishop
Copy link
Member

Good catch, apologies for the confusion that created. PR is up to bump since to the next version.

nicholasbishop added a commit that referenced this issue Aug 26, 2022
The replacement for accessing this field (Deref/DerefMut on
ScopedProtocol) isn't part of 0.16.0, so it isn't correct to mark the
field deprecated in that version. Bump to 0.17.0, which should be the
next version of uefi.

Fixes #484
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 a pull request may close this issue.

2 participants