Skip to content

v0.18.4

Compare
Choose a tag to compare
@kubukoz kubukoz released this 02 Jan 17:22
· 344 commits to series/0.18 since this release
v0.18.4
282aa90

This release fixes a bunch of bugs and introduces some minor semantic changes. Make sure to review them!

What's Changed

Update meaning of required in both codegen and runtime by @Baccata in #1301

Adjusts the behavior of required fields with defaults. Most importantly, it changes the behavior when the following conditions are all true:

  • @required is present on a member
  • @default (or = shorthand) is present on that member
  • the runtime value matches the default

e.g. @required s: String = "foo" with a runtime value of "foo".

In past releases, JSON codecs would not write such fields when serializing your data, unless configured to do so with the withExplicitDefaultsEncoding option. Starting with this release, @required fields will always be serialized in JSON, Documents and XML (as well as any other codecs that use getUnlessDefault or foreachUnlessDefault).

This isn't yet fixed in AWS ec2Query codecs. A fix is in the works.

Additional changelog information

Changes the behaviour of Field#getUnlessDefault and Field#foreachUnlessDefault to always take the value into consideration when the smithy.api#required trait is present on the field. This leads to field values being always serialised even when their values match their defaults, as this abides by least-surprise-principle.

Fix LSP rendering of the repository by @daddykotex in #1293

Fixes sbt's and mill's rendering of Maven repositories in smithy4sUpdateLSPConfig and smithy4s.codegen.LSP/updateConfig, respectively.

Avoid duplicate repos/deps/imports in the smithy-build.json by @daddykotex in #1299

In some cases, it was possible that using the LSP config tasks in sbt/mill would result in a repository appearing on the list more than once. This fix removes such duplication.

AwsCredentialsProvider should allow Instance Metadata Service base URI to be overridden using environment variable by @bpholt in #1306

Adds the ability to configure the base URI of the AWS Metadata Service with the AWS_EC2_METADATA_SERVICE_ENDPOINT variable, which is consistent with some official AWS SDKs.

Escape astrisks following slashes in documentation by @bpholt in #1304

Add support for Unit primitives when unfolding typed nodes by @denisrosca in #1325

Fixes an issue (#1297) in which Unit values couldn't be rendered in Smithy traits.

Fixes an issue (#1296) in which the code generator would fail with a stack overflow when rendering some recursive traits.

Library updates and internal changes

New Contributors

Full Changelog: v0.18.3...v0.18.4