Skip to content

Shaperef#295

Merged
jterapin merged 9 commits into
decaffrom
shaperef
May 5, 2025
Merged

Shaperef#295
jterapin merged 9 commits into
decaffrom
shaperef

Conversation

@mullermp
Copy link
Copy Markdown
Contributor

@mullermp mullermp commented May 2, 2025

Remove MemberShape as a concept and use ShapeRef which contains the shape target and any traits it has. Some "container" seems to be necessary for codec traversal (we will wrap them in shape ref if not provided) - and operation input/output/errors aren't technically member shapes but rather references (because they have target shapes in the model). Currently, the visitor patterns are very awkward, for traits that must be checked at the member layer and then the shape layer (for example timestampFormat). This also removes some awkward accessors on shapes like "member by location name"

Copy link
Copy Markdown
Contributor

@jterapin jterapin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I just reviewed the ShapeRef section - I have additional thoughts but I will share them offline.

Comment thread projections/weather/lib/weather/schema.rb Outdated
Comment thread gems/smithy-schema/lib/smithy-schema/shapes.rb Outdated
Comment thread gems/smithy-schema/lib/smithy-schema/shapes.rb
@mullermp mullermp marked this pull request as ready for review May 4, 2025 17:07
Copy link
Copy Markdown
Contributor Author

@mullermp mullermp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Notes for self

Timestamp: Smithy::Schema::Shapes::TimestampShape
Union: Smithy::Schema::Shapes::UnionShape
BigDecimal: Smithy::Schema::Shapes::bigDecimal
BigInteger: Smithy::Schema::Shapes::bigInteger
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I need to fix these.

Comment thread gems/smithy-schema/lib/smithy-schema/shapes.rb
Comment thread gems/smithy-client/lib/smithy-client/rpc_v2_cbor/response_parser.rb
Comment thread gems/smithy-client/lib/smithy-client/rpc_v2_cbor/request_builder.rb
Comment thread gems/smithy-client/lib/smithy-client/param_validator.rb
Comment thread gems/smithy-cbor/lib/smithy-cbor/serializer.rb
Comment on lines +45 to +46
# @return [String, nil]
attr_reader :location_name
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could we add a description here?

@jterapin jterapin merged commit 05fe88e into decaf May 5, 2025
17 checks passed
@jterapin jterapin deleted the shaperef branch May 5, 2025 16:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants