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

nb crate version conflict between 0.11.1 and embedded-hal #264

Closed
nebelgrau77 opened this issue Nov 8, 2020 · 2 comments
Closed

nb crate version conflict between 0.11.1 and embedded-hal #264

nebelgrau77 opened this issue Nov 8, 2020 · 2 comments

Comments

@nebelgrau77
Copy link

nebelgrau77 commented Nov 8, 2020

I just stumbled upon a problem that seems to be related to this PR: #179

Bottomline: nrf-hal-common won't compile.

I'm using the master branch, and here's what happens:

 = note: expected fn pointer `fn(&mut saadc::Saadc, &mut PIN) -> core::result::Result<_, nb::Error<()>>` (enum `nb::Error`)
               found fn pointer `fn(&mut saadc::Saadc, &mut PIN) -> core::result::Result<_, nb::Error<()>>` (enum `nb::Error`)
 = note: perhaps two different versions of crate `nb` are being used?

This affects saadc and timer modules.
In two cases the "expected" and "found" look identical as seen above, but then they aren't:

    = note: expected enum `nb::Error<void::Void>`
               found enum `nb::Error<_>`
    = note: perhaps two different versions of crate `nb` are being used?

If I run cargo tree it does confirm that two different versions of nb are used: v1.0.0 in the nrf-common-hal, and v0.1.2 in embedded-hal.

So I checked something that works for me: https://github.com/nebelgrau77/ItsyBitsy_nRF52840_ADC_serialTX - this uses the v0.11.0 of the nrf-common-hal, pulled from crates.io, so the nb version was still v0.1.2.

In fact downgrading it back to 0.1.2 in a local fork of the master fixed it.

There's a big fat chance I'm missing something, though! :)

Originally posted by @nebelgrau77 in #179 (comment)

@eldruin
Copy link

eldruin commented Nov 9, 2020

Have you tried running cargo update? nb 0.1.3 is compatible with nb 1.0.0

@nebelgrau77
Copy link
Author

That solved the problem, thank you!

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

No branches or pull requests

2 participants