Releases: disneystreaming/smithy4s
v0.13.1: Fix issue with sbt plugin cache key
tl;dr
There was an issue with v0.13.0 when builds using the sbt plugin had no colocated smithy files, but were pulling remote jars as dependencies. This release contains a fix for this.
What's Changed
- Update jsoniter-scala-core to 2.13.24 by @scala-steward in #220
- Fix sbt plugin regression by @lewisjkl in #221
Full Changelog: v0.13.0...v0.13.1
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
Improved Smithy model loading
This PR includes an important fix with regards to how Smithy4s used to load the Smithy model during codegen. Instead of relying on classpath scanning functionality. We provide our dependencies directly, via the same mechanism that you can provide your dependencies. In turn, our dependencies are resolved at runtime, with coursier
.
We introduced this change because of problems occurring when dependencies found on the build classpath (your build tool dependencies) included Smithy definitions.
What's Changed
- Pull dependencies rather than scanning the build classpath by @daddykotex in #201
- Update jsoniter-scala-core to 2.13.18 by @scala-steward in #203
- Nix flake: devShell -> devShells.default by @kubukoz in #204
Full Changelog: v0.12.15...v0.12.16
v0.12.15: hotfix rendering of imports
What's Changed
- Update jsoniter-scala-core to 2.13.17 by @scala-steward in #197
- Fix packed-imput imports logic by @Baccata in #199
Full Changelog: v0.12.14...v0.12.15
v0.12.14 : improve rendered import statements when packedInputs are applied
Fixes an issue that leads to too many import statements being rendered when the smithy4s.meta#packedInputs
trait is applied
on services or operations.
What's Changed
- Update jsoniter-scala-core to 2.13.14 by @scala-steward in #190
- Add Untagged to the defaults hint masks by @daddykotex in #188
- Add unit tests to prove that constraints work with untagged unions by @Baccata in #187
- Update jsoniter-scala-core to 2.13.15 by @scala-steward in #191
- Update jsoniter-scala-core to 2.13.16 by @scala-steward in #192
- fix unused imports on operations when packed inputs is applied by @yisraelU in #194
- Update sbt-scalajs, scalajs-compiler, ... to 1.10.0 by @scala-steward in #165
Full Changelog: v0.12.13...v0.12.14
v0.12.13 : untagged unions
Highlights
- untagged unions are now supported in the simpleRestJson protocol, via the
smithy4s.api#untagged
shape. This encoding for unions should be discouraged, as it implies an attempt to decode - fixes a bug where hints applied to union members would not be taken into consideration
- avoids serialising an empty object for requests that are not supposed to have body components
What's Changed
- Support untagged union by @daddykotex in #178
- Update/jsoniter scala core 2.13.13 by @daddykotex in #179
- Update jsoniter-scala-core to 2.13.13 by @scala-steward in #175
- Update smithy-model to 1.21.0 by @scala-steward in #183
- Update smithy-aws-traits, smithy-build, ... to 1.21.0 by @scala-steward in #182
- Union member fix by @Baccata in #186
- Update sbt-scalafix to 0.10.0 by @scala-steward in #170
- http4s make body empty when metadata is total by @lewisjkl in #171
Full Changelog: v0.12.12...v0.12.13
v0.12.12
What's Changed
- Remove duplicated hint from codecs by @daddykotex in #177
- Add core's generated sources to jars by @kubukoz in #184
Full Changelog: v0.12.11...v0.12.12
v0.12.11: BigInt Rendering Fix
What's Changed
Full Changelog: v0.12.10...v0.12.11
v0.12.10: Tests module update
v0.12.9: aws-related fixes
- Fixes a rendering issue related to streamed operations
- Fixes a rendering collision problem that may occur with the timestamp type
- Fixes content type not being set correctly when performing calls to aws
What's Changed
- Update fs2-core to 3.2.7 by @scala-steward in #156
- Update jsoniter-scala-core to 2.13.9 by @scala-steward in #157
- Update jsoniter-scala-core to 2.13.10 by @scala-steward in #158
- Update jsoniter-scala-core to 2.13.11 by @scala-steward in #159
- Update jsoniter-scala-core to 2.13.12 by @scala-steward in #162
- Fix codegen rendering for AWS Kinesis service by @andyjayne in #166
- Fix Content-Type for AWS service requests using http4s client by @andyjayne in #168
New Contributors
- @andyjayne made their first contribution in #166
Full Changelog: v0.12.8...v0.12.9