Skip to content
Unverified Commit 198c5009 authored by david-perez's avatar david-perez Committed by GitHub
Browse files

Disallow `@uniqueItems`-constrained list shapes that reach a map shape (#2375)

* Disallow `@uniqueItems`-constrained list shapes that reach a map shape

The server SDK codegen generates Rust code that does not compile when a
`@uniqueItems`-constrained list shape reaches a map shape, essentially
because `std::collections::HashMap` does not implement
`std::hash::Hash`.

A ticket with the Smithy team was opened in awslabs/smithy#1567 to
disallow such models.

This commit makes it so that codegen aborts with an informative message
when such models are encountered, instead of going ahead and producing
code that does not compile.

This commit also slightly adjusts the error messages produced when
unsupported constraint traits are found.

* ./gradlew ktlintFormat
parent b9f8090c
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment