Skip to content

v0.13.0 : Schema overhaul

Compare
Choose a tag to compare
@Baccata Baccata released this 19 May 13:55
b25026c

This release is the first one of the 0.13.x series. It is (very) binary incompatible with the 0.12.x series.

Highlights

core abstractions

The central point of this release is the complete overhaul of the Schema construct, to be a mere GADT, accompanied by a SchemaVisitor construct which is intended to eventually replace Schematic, as the SchemaVisitor gives the implementor control over the recursive call, and therefore allows to potentially delegate to other visitors, which should allow to clean up a number of weird things in this codebase and downstream ones. See #140.

The schema semantics have also changed to allow for capturing surjections, which are somewhat similar to bijections but can fail. These could be used in the future to capture type-refinements.

code-generation

This release also adds a smithy4s.meta#adtMember trait, as a way to allow for reducing the amount of nesting involved when unions have structure members. This is an opt-in, and enforces that the target structures cannot be used anywhere else, as doing so would result in the duplication of case classes in the companion objects of several ADTs, which would break least surprise but also maybe some caching by shapeId logic that could arise in the future. Kudos to @lewisjkl.

The rendering logic was also made more maintainable thanks to a bespoke string interpolator that helps drastically reduce the amount of dance steps needed to gather the imports that should be added at the top of a file. Kudos to @yisraelU for that.

Additionally, the code generator task in the SBT plugin was made more precise and should require calls to clean less often.

What's Changed

New Contributors

Full Changelog: v0.12.16...v0.13.0