You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@wolfv, could you assign this to me. I have already started working on it.
If I understand it correctly, that "sorted" macro is basically just a code linter, right? At first I thought it might sort the fields for you, but it looks like all it does is raise a compilation error if you haven't sorted these fields yourself.
Hi @travishathaway yes, exactly, it's a compile-time linter so to say :)
Unfortunately it doesn't work when renaming fields with the serde rename function so sometimes we have to take care "manually". I tried once to make it work but it was pretty hard.
It's also not strictly necessary that the fields are sorted, but I think it's good to encode the alphabetical ordering so that we know how to "reproducibly" create the JSON files in any language :)
For reproducibility reasons we want to ensure that fields are serialized in a deterministic (alphabetical) order.
To achieve this, we have a macro in
rattler_macros
that ensures that all struct fields are sorted alphabetically.We need to apply this to more structs, such as
IndexJson
AboutJson
The text was updated successfully, but these errors were encountered: