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

0.9.0 Release #529

Open
NWPlayer123 opened this issue Feb 25, 2025 · 3 comments
Open

0.9.0 Release #529

NWPlayer123 opened this issue Feb 25, 2025 · 3 comments

Comments

@NWPlayer123
Copy link

What is there still to be done to release a new version of heapless?

There's a pretty sizeable changelog, and I've had to pin my heapless dependency on a project to the latest git release since I have a need for Vec::drain.

I also encountered compile errors trying to construct a String::from_str due to String now being a type alias for a StringInner compared to crates that are still targeting the 0.8.0 release with an incompatible type (e.g. embedded_svc::wifi::ClientConfiguration).

@sosthene-nitrokey
Copy link
Contributor

Should be merged before a 0.9 release to reduce the risk of breakage of existing code.

I also encountered compile errors trying to construct a String::from_str due to String now being a type alias for a StringInner compared to crates that are still targeting the 0.8.0 release with an incompatible type (e.g. embedded_svc::wifi::ClientConfiguration).

I introduced the change that made String an alias for StringInner , but I don't understand that breakage. Could you please give an example?

@NWPlayer123
Copy link
Author

I introduced the change that made String an alias for StringInner , but I don't understand that breakage. Could you please give an example?

I double checked the error; from_str no longer exists so I changed it to ClientConfiguration { ssid: heapless::String::<32>::from_utf8("MyNetwork").expect("Error converting WIFI_SSID") } which tells me mismatched types: expected heapless::string::String<32>, found StringInner<OwnedStorage<32>> due to the type no longer existing between 0.8 and main, so until 0.9 is released and crates update the dependency, I have to do "MyNetwork".try_into().expect("Error converting WIFI_SSID"). Not a huge problem, just annoying to have to do

@sosthene-nitrokey
Copy link
Contributor

Are you directly depending on the updated heapless with

[dependencies]
heapless = { git = "https://github.com/rust-embedded/heapless.git" }

?

That leads to duplicate dependencies, and you probably would still have the same error even without the StringInner refactor.

Instead of depending on heapless through git, you maybe can patch it:

[dependencies]
heapless = "0.8.0"

[patch.crates-io]
heapless = { git = "https://github.com/rust-embedded/heapless.git" }

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