Skip to content

Compat note for RawValue/flattening & tagged enum #1252

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

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

uniphil
Copy link

@uniphil uniphil commented Apr 1, 2025

It's not obvious that RawValue can't be used with serveral serde features, and the runtime errors are quite opaque. From the number of issues on github and annecdotally, people get bit by this fairly often.

This change simply adds a note to RawValue's doc comments about two such scenarios that it won't work with. The phrasing could probably be improved/tightned up and maybe links could be added to explain why? My brain is just fried from running into both cases today and not getting anything done as a result.

Alternately

Related issues

uniphil added 2 commits April 1, 2025 16:27
It's not obvious that RawValue can't be used with serveral serde features, and the runtime errors are quite opaque. From the number of issues on github and annecdotally, people get bit by this fairly often.

This change simply adds a note to RawValue's doc comments about two such scenarios that it won't work with. The phrasing could probably be improved/tightned up and maybe links could be added to explain why? My brain is just fried from running into both cases today and not getting anything done as a result.

Alternately
-----------

- It seems like these cases might be resolveable by serde-rs/serde#1183 . Maybe this doc comment could reference that issue directly, instead.

- Maybe the error messages could somehow be improved?
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

1 participant