Releases: ahamez/protox
Releases · ahamez/protox
v2.0.1
v2.0.0
2.0.0
Added
schema/0
to access the underlying definition of a message.
Changed
- Minimal supported Elixir version is now 1.15.
- BREAKING CHANGE: encoding functions now return the size alongside iodata.
Previously, one had to use:binary.list_to_bin/1
to flatten the iodata and then usebyte_size
, defeating the purpose of having an iodata. Furthermore, it provides a significant performance boost. - BREAKING CHANGE:
Protox.decode!
andProtox.decode
no longer raise or return an error if a message don't have all required fields set. We should let the user decide whether it's a problem. - BREAKING CHANGE: Rename
InvalidFieldAttribute
toInvalidFieldAttributeError
for consistency.
Removed
- BREAKING CHANGE: Drop support of JSON encoding and decoding.
The implementation was half-baked, it's preferable to have the library focused. Even Google doesn't recommend using JSON: "In short, there are many good reasons why Google prefers to use the standard wire format for virtually everything rather than ProtoJSON format". - BREAKING CHANGE: Remove
:path
option in favor of the already existing:paths
option, which covers the same functionality. - BREAKING CHANGE: Remove
:keep_unknown_fields
option (the corresponding--keep-unknown-fields
option for the mix taskprotox.generate
is also removed). They are now always kept.
It added complexity to the generation logic while not providing any value as one can simply ignore those fields and as it's mandatory to parse them correctly. - BREAKING CHANGE: Remove generated
defs/0
(functionality remains available throughschema/0
). - BREAKING CHANGE: Remove generated
field_def/1
(functionality remains available throughschema/0
). - BREAKING CHANGE: Remove generated
file_options/0
(functionality remains available throughschema/0
). - BREAKING CHANGE: Remove generated
required_fields/0
(functionality remains available throughschema/0
). - BREAKING CHANGE: Remove generated
syntax/0
(functionality remains available throughschema/0
). - BREAKING CHANGE: Remove generated
encode/1
from strings for enums. - BREAKING CHANGE: Remove
Protox.Encode.encode/1
andProtox.Encode.encode!/1
(functionality remains available in generated modules and inProtox
).
v1.7.8
What's Changed
- Fix warnings of unknown JSON modules when a JSON library is not installed
Full Changelog: v1.7.7...v1.7.8
v1.7.7
What's Changed
- Fix launch by removing :propcheck from extra applications
Full Changelog: v1.7.6...v1.7.7
v1.7.6
v1.7.5
v1.7.4
1.7.2
- Fix typespec of enum encode function (thanks to https://github.com/wingyplus)