Skip to content

Address some TODOs#293

Merged
mullermp merged 8 commits into
decaffrom
todos
Apr 29, 2025
Merged

Address some TODOs#293
mullermp merged 8 commits into
decaffrom
todos

Conversation

@mullermp
Copy link
Copy Markdown
Contributor

Deleted some TODOs or addressed them.

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.

Nice clean up!

Comment thread gems/smithy-cbor/lib/smithy-cbor/decoder.rb
def union(shape, values, target = nil)
# TODO: delete target instead of checking key?
def union(shape, values, target = nil) # rubocop:disable Metrics/AbcSize
raise ArgumentError, "union value includes more than one key, received: #{values.keys}" if values.size > 1
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.

So we would want to raise than using the first key/value that we encounter? (I think using the first key/value was the V3 behavior if I remember correctly)

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'm not sure here. Kevin seems to suggest we should raise. I think using the first might be preferred, but then we have to code around __type which I can't seem to find any details for in cbor.

Comment thread gems/smithy-client/lib/smithy-client/plugins/stub_responses.rb Outdated
Comment thread gems/smithy/lib/smithy/model.rb
Comment thread gems/smithy-cbor/lib/smithy-cbor/codec.rb
Comment thread projections/shapes/lib/shapes/client.rb
@mullermp mullermp merged commit e4ec448 into decaf Apr 29, 2025
14 checks passed
@mullermp mullermp deleted the todos branch April 29, 2025 17:44
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