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.
- Update copyright years by @jchadwick-buf in #77
- Prepare GitHub docs for shift to buf.build/docs by @jrinehart-buf in #71
- CMake: Cleanup and improvements by @jchadwick-buf in #74
- CMake: Set up compile_commands.json automatically by @jchadwick-buf in #78
- Implement unified IPv4 and IPv6 parsers by @jchadwick-buf in #79, #85
- Implement unified e-mail address validation by @jchadwick-buf in #81
- Implement unified URI validation by @jchadwick-buf in #82
- Fix hostname, port, and enum validation by @jchadwick-buf in #83
- Fix URI host parsing and let isHostAndPort reject leading zeros in port number by @timostamm in #87
- Update cel-cpp to v0.11.0 by @jchadwick-buf in #86
- Initial bzlmod support by @jchadwick-buf in #88
- New conformance fixes by @jchadwick-buf in #89
- Upgrade to protovalidate v0.10.3, v0.10.4, v0.11.0 by @smaye81 in #73, @jchadwick-buf in #84, @jchadwick-buf in #90
- Rename constraint -> rule globally by @jchadwick-buf in #91
New Contributors
- @smaye81 made their first contribution in #73
- @jrinehart-buf made their first contribution in #71
- @timostamm made their first contribution in #87
Full Changelog: v0.5.0...v0.6.0