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

Feedback request: How to handle unsupported "self-describing-only" attributes #2674

Open
jamesmunns opened this issue Jan 13, 2024 · 0 comments

Comments

@jamesmunns
Copy link
Contributor

jamesmunns commented Jan 13, 2024

Hey there,

There are a number of attributes that can be used in serde that seem to cause problems with non-self describing formats like postcard. Some issues include:

This is unfortunate, as in many cases (I don't have a comprehensive list of all affected attributes):

  • The code will still compile
  • Serialization will usually succeed (at least: return without Error)
  • Deserialization will fail (return an Error), or will deserialize incorrectly (returns wrong data).

Is there any way you are aware of to do one of the following?

  • Skip these attrs, or
  • Make them a compile time error

Right now my only answer is "don't do that", and I should probably add a bigger warning about it, as it is a thing that people often hit, particularly when they are using the same data formats with different wire formats (e.g. a JSON-to-postcard adapter).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant