Closed coladarci closed 3 years ago
Ahhh, so this is coming from :erlang.binary_to_term/1
? Its a good point and its on me (too) since backwards compatibility is important. Let me do some experiments today and see if I can make that work.
I’m not sure it’s fair to say it’s on you - your library IS backwards compatible, it just makes the assumption that money structs are created with that version of the library (which feels very fair); we are doing some oddness on our end.
That said, if it’s an easy win it’d help us out or a jam, of sorts!
Thanks as always for the collaboration. It was an easy fix. Published ex_money version 5.5.1 with the following changelog entry:
t:Money
that has no :format_options
key. That can happen if re-hydrating a t:Money
using :erlang.binary_to_term/1
from an older version of ex_money
that doesn't have the :format_options
key in the struct. Thanks to @coladarci. Fixes #123.
This is totally on us with a bad decision, but out of curiosity, how hard would it be to make the latest change backwards compatible for Money objects stored in ETF Pre release?
🤦♂️