There are definitely some tradeoffs being made here, but I think it has enough impact to be worth it.
I would like to try to land something we're moderately OK with and then try to iterate further from there, since the base/logging.h IWYU issues are likely to regress.
const ArrayExpectedSizeError& details);But at the very least, I'll think about ways to consolidate this a bit.
COMPONENT_EXPORT(MOJO_CPP_BINDINGS_BASE)I will admit that adding 6 new overloads isn't the best, but it seems unlikely we'll add more.
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
14 is the latest approved patch-set.
No files were changed between the latest approved patch-set and the submitted one.
Remove base/logging.h include from validation_errors.h
This header is included in many C++ source files generated from .mojom
and is fairly heavyweight. While moving the logging out of the headers
is straightforward, array validation failures generate a std::string
with some runtime details. `std::string_view` handles both cases nicely,
but there is value in minimizing the includes in this file as much as
possible. `const char*` and using `.c_str()` was the initial approach
considered, but discarded as a bit too hacky after some prototyping.
Instead, the helpers that create additional context for array validation
failures now return a struct with details about the failure. The various
validation error reporting functions have additional overloads that
internally stringify the details so that validation errors are still
reported in the exact same way.
gemini-cli was used to quickly prototype some ideas as well as implement
the overall CL, with some manual followups to improve naming and reduce
duplication.
One unintended side effect is a minor improvement in binary size, since
the new error detail structs are trivially destructible, unlike
std::string.
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |