Miguel Palhas
naps62.bsky.social
Miguel Palhas
@naps62.bsky.social
Rustacean | Building @ethuidev
@subvisual | @QuillFi | @spearbitDAO
serde(default) would actually be a footgun for us.

because it means json files with missing fields would potentially match multiple versions of the enum (since it'd just fallback to default).

setting a fixed version number ensured each file has an explicit non-ambiguous version number
April 22, 2025 at 3:55 PM
This is what we went with, but the cherry on top was to be able to ensure versioning through type-safety (i.e.: prevent us from changing the struct and forgetting to update version number, which would break on user's side)

not quite all the way, but this helped a lot: github.com/ethui/ethui/...
github.com
April 22, 2025 at 3:53 PM