Skip to content

v0.6.0

Latest
Compare
Choose a tag to compare
@jchadwick-buf jchadwick-buf released this 24 Apr 17:32
· 2 commits to main since this release
ad2d011

Breaking Changes

As of protovalidate v0.11.0, the term "constraint" has been removed in favor of using the term "rule" to universally refer to rule values, rule definitions, and so forth. This has resulted in some identifiers in protovalidate-cc changing as well. The public type buf::validate::ConstraintViolation is now buf::validate::RuleViolation.

Some of the validation behavior has changed. In most cases, these changes are backwards-compatible, i.e. values that previously passed validation should continue to pass validation. However, the rules for e-mail validation have changed. protovalidate-cc now uses the e-mail address grammar specified by the WHATWG HTML specification across all implementations. Previously, the e-mail validation varied between implementations, although we had previously adopted part of the HTML e-mail address grammar previously (in that case, loosening the restrictions a bit) - now we are fully adhering to that grammar. This may result in some values that were formerly considered valid to be considered invalid, but in practice, it is expected to be very unlikely to encounter such values.

What's Changed

A wide range of improvements are present in this release. We are now using cel-cpp v0.11.0 and we have reduced the set of custom patches we carry; now the only patches we carry for cel-cpp are to add support for Windows and CMake. We no longer depend on BSD sockets on UNIX or winsock32 on Windows, as we replaced code that uses the system networking stack to validate addresses, instead using built-in parsers that closely follow the relevant RFC grammar, allowing protovalidate implementations to be more consistent, especially across platforms. The developer experience is improved as well: when using CMake on protovalidate-cc directly (as opposed to embedding it within another project,) we will automatically set up compile_commands.json in the current directory by default, enabling clangd and other clang tools to function while you work on protovalidate-cc. We also now have support for bzlmod, but since cel-cpp is not in the BCR, we can not put protovalidate-cc in the BCR and you will need to manually set up an archive override for cel-cpp.

New Contributors

Full Changelog: v0.5.0...v0.6.0