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

Decide how to deal with heapless-v0.8 #121

Open
jamesmunns opened this issue Jan 4, 2024 · 7 comments
Open

Decide how to deal with heapless-v0.8 #121

jamesmunns opened this issue Jan 4, 2024 · 7 comments
Labels
postcard-2.0 Tracking issues for an eventual 2.0 version of the postcard wire format (not currently planned)

Comments

@jamesmunns
Copy link
Owner

heapless types appear in the public interface, so upgrading it would be a breaking change.

I am not certain, but I've considered doing the following:

  • adding heapless-v0_7 and heapless-v0_8 features, using those versions specifically, maybe in some module-d scope, for things like to_vec, to_vec_cobs
  • keeping heapless as an alias for heapless-v0_7, but marking it as deprecated.

Open to feedback if people think there is a preferrable solution.

Originally posted by @jamesmunns in #115 (comment)

@jamesmunns jamesmunns added the postcard-2.0 Tracking issues for an eventual 2.0 version of the postcard wire format (not currently planned) label Jan 4, 2024
@jamesmunns
Copy link
Owner Author

tagging the postcard-2.0 label so in the future I remember to remove whatever deprecated notice I add for fixing this in 1.0.

@bsodmike
Copy link

bsodmike commented Feb 25, 2024

Hi James,

Latest postcard has a dependency on "heapless 0.7.17" which depends on atomic-polyfill. I'm trying to upgrade my dep tree to move to portable_atomic supports AtomicU64 (and heapless-v0.8 has this as a dep instead).

Do you think you can help with this please?

update: found the master branch resolves, this thanks https://github.com/jamesmunns/postcard/blob/main/Cargo.toml#L32

Cheers

@enbyted
Copy link

enbyted commented May 26, 2024

Hi,

In my view the best approach would be to get rid of other crates in the public API, as you proposed in #128 . However, I assume that releasing 2.0 might take a while, so as a temporary solution doing what you proposed here (having the 2 features flags) sounds reasonable.

In one of my projects I've used heapless 0.8 for quite a while before deciding on using postcard, which means that I either need to do a breaking downgrade now or implement my own heapless (0.8) compatibility for postcard. I guess I could also depend on postcard master, but I'm not really keen on doing so.

@Gerharddc
Copy link

Hi, just curious about the current state of progress in adding heapless-v0.8 support? It seems many (most even?) libraries have now moved on to 0.8 so it is becoming easy to run into a version clash issues when having multiple dependencies (just happened to me...)

@jamesmunns
Copy link
Owner Author

Someone has made an adapter for implementing to_vec using heapless v0.8: https://github.com/elrom/postcard-heapless-compat.

At some point in the future, I plan to add impls for both heapless v0.7 and v0.8 behind feature flags, and deprecating the top level methods to avoid confusion. The idea would be to then keep that shape (and required feature flags) for postcard v2.0.

@Gerharddc
Copy link

@jamesmunns thanks! I'm not sure how to use that adapter, but simply creating and using a fork of postcard that uses heapless-v0.8 seems straightforward enough. It appears that nothing inside postcard actually breaks with the update. Perhaps this could be considered as a change for postcard 1.2.0 (as in #211)?

@jamesmunns
Copy link
Owner Author

As mentioned at the top of this issue:

heapless types appear in the public interface, so upgrading it would be a breaking change.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
postcard-2.0 Tracking issues for an eventual 2.0 version of the postcard wire format (not currently planned)
Projects
None yet
Development

No branches or pull requests

4 participants