Skip to content

4.5.2 - Support odd Codable behaviors

Latest

Choose a tag to compare

@penny-for-vapor penny-for-vapor released this 27 Jun 09:23
21852a8

What's Changed

Support odd Codable behaviors by @gwynne in #242

Currently, LeafEncoder throws a fatal error if one attempts to encode more than one object into the same keyed or unkeyed encoding container. Doing so is incorrect use of the Codable API, but it is nonetheless a semi-common practice, and is also the only practical way to accomplish some things. This change lifts the restriction and allows such encoding to work as expected.

Also bumps the package’s Swift version requirement to 6.1 and converts the tests to SwiftTesting.

Reviewers

Thanks to the reviewers for their help:

This patch was released by @gwynne

Full Changelog: 4.5.1...4.5.2