smithy/designs
Michael Dowling a6b06611aa Leave Primitive* prelude shapes in 2.0
We previously rewrote models that target smithy.api#Primtive*
shapes to target their prelude counterparts that do not have the
Primitive prefix. For example, smithy.api#PrimitiveInteger would
become smithy.api#Integer. The rationale being that because optionality
is now controlled on members rather than based on the shape targeted by
a member, there is no longer a reason to use Primitive* shapes in 2.0
models.

The problem is that rewriting the shape targets during the loading
process can remove information that tooling might need to determine if
a shape was considered optional in IDL 1.0 (usually in fringe cases).

If a member previously targets PrimitiveInteger and is rewritten to
target Integer, but the member is also marked as required, then the
ModelUpgrader can't add the default trait to the member. If optionality
isn't determined based on the required trait, then a tool has no way
to know that a member that targets Integer previously targeted
PrimitiveInteger, thereby losing information.

Instead of removing Primitive* shapes, we will keep them in 2.0 and
mark them as deprecated. To point this out to end users, I added
validation (that really should have already existed) to detect when
a shape refers to a deprecated shape. However, because we don't want
to break previous test cases and because models should be able to
deprecate shapes without breaking test cases, DeprecatedShape does not
need to be explicitly handled by Smithy errorfile test runners. This
matches the special casing added for DeprecatedTrait and
ModelDeprecation.
2022-08-10 16:15:08 -07:00
..
defaults-and-model-evolution.md Leave Primitive* prelude shapes in 2.0 2022-08-10 16:15:08 -07:00
enum-shapes.md Add support for custom default values 2022-08-10 16:15:08 -07:00
inline-io.md Simplify inlined IO ABNF 2022-08-10 16:15:08 -07:00
mixins.md Add mixin documentation 2022-08-10 16:15:08 -07:00
operation-input-output-and-unit-types.md Update zero value proposal and implementation 2022-08-10 16:15:08 -07:00
resource-properties.md Add resource properties structure and validation (#1213) 2022-08-10 16:15:08 -07:00