Skip to content

Releases: disneystreaming/smithy4s

v0.19.1: Alloy Version Bump

17 Apr 15:29
8d0ace7

Choose a tag to compare

What's Changed

Full Changelog: v0.19.0...v0.19.1

v0.18.51 - Scala Native 0.5 support

10 Apr 14:35
61d6db4

Choose a tag to compare

🎉 This release introduces a long-awaited Scala Native upgrade: 0.4.x -> 0.5.x. This is thanks to immense work across the ecosystem, with the final work done by @majk-p in #1821.

Releases starting from this one (0.18.51) will not be usable with Scala Native 0.4 series.

Other changes

Full Changelog: v0.18.50...v0.18.51

v0.19.0-RC1

06 Apr 17:33
88e61c8

Choose a tag to compare

What's Changed

Full Changelog: v0.19.0-M4...v0.19.0-RC1

v0.19.0

13 Apr 20:47
88e61c8

Choose a tag to compare

0.19.0

This release contains breaking changes. The sections below are ordered by likelihood of user impact.

Breaking Changes

Behavior change: @default(null) and @nullable (#1667)

The handling of @default(null) has changed to better align with Smithy semantics:

  • With @nullable: Fields use Nullable with default Nullable.Null.
  • Without @nullable: Fields are now generated as Option[T] with no default, instead of the previous behavior of non-optional fields with type-specific defaults (e.g., 0, false).
  • Sparse collections (@sparse): Member types are now rendered as Nullable rather than Option.

Removed deprecated APIs (#1877)

The following deprecated methods/constructors have been removed:

  • Document.EncoderCompiler.withExplicitDefaultsEncoding — use withFieldFilter instead
  • Metadata.EncoderCompiler.withExplicitDefaultsEncoding — use withFieldFilter instead
  • SimpleRestJsonBuilder(maxArity, explicitDefaultsEncoding, hostPrefixInjection) constructor — use .withXXX methods instead
  • JsoniterCodecCompiler deprecated overloads — use current API
  • Deprecated methods on Endpoint, RefinementProvider, Field, Alt, Schema
  • Deprecated extension methods in smithy4s.http4s.kernel

UnknownErrorResponse replaced by RawErrorResponse (#1570)

smithy4s.http.UnknownErrorResponse has been replaced with smithy4s.http.RawErrorResponse. The new type provides richer information about failed error decoding, including the status code, headers, body, and a FailedDecodeAttempt (either UnrecognisedDiscriminator or DecodingFailure).

@adt union smart constructor naming (#1370)

Smart constructors for @adt union members are now named after the member name instead of the member target, matching the behavior of non-ADT unions.

Default URI no longer includes localhost (#1341)

URIs constructed with a base URI of / no longer default to localhost as the host. Hostnames are now optional in the smithy4s URI model and default to None. This benefits frontend clients that want to reuse the browser's origin.

smithy4sRenderOptics build setting removed (#1566)

The smithy4sRenderOptics SBT/Mill setting has been removed. Optics can still be rendered using Smithy metadata (global) or traits (selective).

Bijection and Surjection no longer extend Function (#1794, #1887)

This prevents their use as implicit conversions in Scala 2. If you relied on passing a Bijection or Surjection directly where a Function was expected, call .to or .from explicitly.

transform moved to extension methods (#1735)

The transform method previously generated as a final def in service algebras is now an extension method. For Scala 2.12 compatibility, additional variants are generated for F[_] and F[_, _] shaped instances alongside the default F[_, _, _, _, _].

-Xsource:3 enabled for Scala 2.13 (#1878)

Smithy4s core modules are now compiled with -Xsource:3 under Scala 2.13. This should not affect most users, but may surface new warnings if you depend on smithy4s internals that changed behavior under this flag.

Query parameter model change (#1870)

Metadata.query changed from Map[String, Seq[String]] to Map[String, Seq[Option[String]]] to support valueless query parameters (e.g., ?foo without =value). queryFlattened now returns Vector[(String, Option[String])]. New addQueryParamOpt and addMultipleQueryParamsOpt methods were added; existing addQueryParam delegates to them.

New Features

New primitive types: LocalDate, LocalTime, Duration, OffsetDateTime (#1787)

These types are now part of the smithy4s primitive set with full codec support.

@alloy#preserveKeyOrder support

Map types annotated with @alloy#preserveKeyOrder are rendered as SeqMap (Scala 2.13+) or ListMap (Scala 2.12) to preserve insertion order.

Mill 1.x support

The Mill codegen plugin now supports Mill 1.x (tested with 1.1.2), in addition to 0.11.x and 0.12.x.

Codegen cross-compiled to Scala 3

The codegen module is now cross-compiled against Scala 3, in addition to Scala 2.12 and 2.13.

Effectful client codecs (#1910)

UnaryClientCompiler and UnaryClientEndpoint now have make overloads accepting Response => F[Boolean] for protocols where determining success requires effectful inspection (e.g., HTTP/2 trailers).

Low-Level / Library Author Changes

These changes primarily affect users who write custom SchemaVisitor implementations or build libraries on top of smithy4s internals.

CollectionTag unsealed (#1819)

CollectionTag is now a regular trait instead of sealed. Third-party libraries can implement custom collection builders. Existing exhaustive matches on CollectionTag subtypes will need a wildcard case — use the tag's iterator/fromIterator methods for unknown subtypes.

MapTag added (#1818)

New MapTag trait for efficient creation of map-like types.

OptionalTag added (#1826)

New OptionalTag trait (with default ScalaOptionTag) for efficient creation of option-like types.

EncoderK type member change (#1519)

EncoderK's second type parameter is now a type member (type Result).

EnumerationSchema rework

The enumeration schema was reworked to eliminate an OOM pitfall and improve SchemaVisitor ergonomics. The total function that previously could cause memory issues has been replaced with a more efficient representation.

Binary-compatible-friendly codegen in core (#1900)

The alloy and smithy namespaces are now generated in core with binary-compatible-friendly mode enabled.

Generated meta trait service implementations (#1901)

The handwritten Java TraitService implementations for smithy4s meta traits in the protocol module have been replaced with generated ones. This should not affect users unless they were programmatically using those traits directly.

New Contributors

Full Changelog: v0.18.47...v0.19.0

v0.18.50

25 Mar 13:55
2f84d73

Choose a tag to compare

What's Changed

Full Changelog: v0.18.49...v0.18.50

v0.19.0-M4 SBT 2 support added

13 Mar 20:29
57a442e

Choose a tag to compare

What's Changed

Full Changelog: v0.19.0-M3...v0.19.0-M4

v0.19.0-M3

10 Mar 20:16
30f2959

Choose a tag to compare

What's Changed

New Contributors

Full Changelog: v0.19.0-M2...v0.19.0-M3

v0.18.49

04 Mar 21:22
ae1d949

Choose a tag to compare

What's Changed

  • Fix Long literal rendering to add L suffix by @Copilot in #1898
  • Backport mill 1.x support to series/0.18 by @rochala in #1899

New Contributors

  • @Copilot made their first contribution in #1898
  • @rochala made their first contribution in #1899

Full Changelog: v0.18.48...v0.18.49

v0.18.48

23 Feb 17:54
6f8d499

Choose a tag to compare

What's Changed

  • series/0.18: Update codegen of numbers when using dynamic bindings by @a-morales in #1886
  • Add type params to struct and union in codegen schemas by @kyri-petrou in #1893

New Contributors

Full Changelog: v0.18.47...v0.18.48

v0.19.0-M2: update codegen of numbers when using dynamic bindings.

09 Feb 20:19
0bd68b3

Choose a tag to compare

What's Changed

  • Update codegen of numbers when using dynamic bindings by @a-morales in #1885

Full Changelog: v0.19.0-M1...v0.19.0-M2