v0.13.0 : Schema overhaul
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
- Update jsoniter-scala-core to 2.13.19 by @scala-steward in #206
- Update jsoniter-scala-core to 2.13.20 by @scala-steward in #207
- Schema overhaul by @Baccata in #140
- Loosen constraints in aws-http4s by @kubukoz in #173
- Update sbt-header to 5.7.0 by @scala-steward in #195
- Update jsoniter-scala-core to 2.13.21 by @scala-steward in #208
- Rendering interpolator by @Baccata in #209
- Update jsoniter-scala-core to 2.13.22 by @scala-steward in #212
- Fix DynamicError's shapeId by @kubukoz in #214
- Use a simpler mechanism to detect file changes by @keynmol in #213
- Recursively return all the generated files by @keynmol in #215
- Support service errors in dynamic schema index by @kubukoz in #216
- Add options for rendering case class ADT members directly within union by @lewisjkl in #211
- Update jsoniter-scala-core to 2.13.23 by @scala-steward in #218
- Improve CLI docs by @daddykotex in #219
- Rewrite the model loading logic to avoid having to depend on publishL… by @Baccata in #217
New Contributors
Full Changelog: v0.12.16...v0.13.0