Releases: disneystreaming/smithy4s
v0.19.1: Alloy Version Bump
v0.18.51 - Scala Native 0.5 support
🎉 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
- Fix bug around Lazy caching and update Lazy model by @a-morales in #1857
Full Changelog: v0.18.50...v0.18.51
v0.19.0-RC1
What's Changed
- Port effectful client codecs to series/0.19 by @denisrosca in #1910
- Bump alloy to 0.3.37 by @denisrosca in #1912
- Sync 018 019 mar2026 1 by @lewisjkl in #1913
Full Changelog: v0.19.0-M4...v0.19.0-RC1
v0.19.0
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 useNullablewith defaultNullable.Null. - Without
@nullable: Fields are now generated asOption[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 asNullablerather thanOption.
Removed deprecated APIs (#1877)
The following deprecated methods/constructors have been removed:
Document.EncoderCompiler.withExplicitDefaultsEncoding— usewithFieldFilterinsteadMetadata.EncoderCompiler.withExplicitDefaultsEncoding— usewithFieldFilterinsteadSimpleRestJsonBuilder(maxArity, explicitDefaultsEncoding, hostPrefixInjection)constructor — use.withXXXmethods insteadJsoniterCodecCompilerdeprecated 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
- @kyri-petrou made their first contribution in #1893
- @Milyardo made their first contribution in #1895
- @Copilot made their first contribution in #1898
- @rochala made their first contribution in #1899
Full Changelog: v0.18.47...v0.19.0
v0.18.50
What's Changed
- Add effectful
makeoverloads to UnaryClientCompiler and UnaryClientEndpoint by @denisrosca in #1908 - Bump alloy to 0.3.37 by @denisrosca in #1911
Full Changelog: v0.18.49...v0.18.50
v0.19.0-M4 SBT 2 support added
What's Changed
Full Changelog: v0.19.0-M3...v0.19.0-M4
v0.19.0-M3
What's Changed
- series/0.18: Update codegen of numbers when using dynamic bindings by @a-morales in #1886
- Remove function surjection by @lewisjkl in #1887
- Mill1x support by @yisraelU in #1892
- Add type params to
structandunionin codegen schemas by @kyri-petrou in #1893 - Sync 018 019 feb2026 2 by @lewisjkl in #1894
- [0.19] Render fields marked nullable as smithy4s.Nullable rather than Option by @Milyardo in #1895
- Fix Long literal rendering to add
Lsuffix by @Copilot in #1898 - Backport mill 1.x support to series/0.18 by @rochala in #1899
- 0.19: Generate meta traits by @kubukoz in #1901
- set up bincompat-friendly core codegen by @lewisjkl in #1900
- Sync 018 019 by @yisraelU in #1907
New Contributors
- @kyri-petrou made their first contribution in #1893
- @Milyardo made their first contribution in #1895
- @Copilot made their first contribution in #1898
- @rochala made their first contribution in #1899
Full Changelog: v0.19.0-M2...v0.19.0-M3
v0.18.49
v0.18.48
What's Changed
- series/0.18: Update codegen of numbers when using dynamic bindings by @a-morales in #1886
- Add type params to
structandunionin codegen schemas by @kyri-petrou in #1893
New Contributors
- @kyri-petrou made their first contribution in #1893
Full Changelog: v0.18.47...v0.18.48
v0.19.0-M2: update codegen of numbers when using dynamic bindings.
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