Stop being pedantic by default

Up to now, the xmpp-rs projects have been very strict about incoming
data. This has served us, as developers of the libraries, well,
uncovering bugs in our and remote implementations which we could then
get fixed.

However, this behaviour is unexpected to users of the library. In the
XMPP world, unexpected child elements and attributes are generally
expected to be ignored. While this could be opted-into previously, the
feature flag for that sounded more dangerous than it was
("disable-validation"). In addition, the tribal knowledge needed to know
about that feature flag may not have reached some people who tried the
library and gave up because of that.

With this change, we make the non-pedantic behaviour the default. For
development and debugging purposes, users can always opt into the
pedantic behaviour as needed, using the newly-introduced `pedantic`
feature flags on all affected crates.
This commit is contained in:
Jonas Schäfer 2026-03-27 12:07:53 +01:00
commit e2dcd8ac66
41 changed files with 99 additions and 107 deletions

View file

@ -18,6 +18,10 @@ XXXX-YY-ZZ RELEASER <admin@example.com>
- bind::BindFeature::required is now a bool, thanks to xsos flag.
- jingle_rtp::Description::rtcp_mux is now a bool flag too.
- stream_limits::Limits now extract directly to NonZeroU32.
- Removed the `disable-validation` feature and made the behaviour the
new default. That way, unknown child elements and attributes will
not be rejected by xmpp-parsers by default anymore. The `pedantic`
feature can be used to opt into the previous default behaviour.
* Improvements:
- Make Prioritys inner i8 pub, which had been broken since the
conversion to xso. (!632)