Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rpcv2Cbor implementation does not work with constraints #3788

Closed
drganjoo opened this issue Aug 14, 2024 · 1 comment
Closed

Rpcv2Cbor implementation does not work with constraints #3788

drganjoo opened this issue Aug 14, 2024 · 1 comment
Assignees
Labels
high-priority High priority issue server Rust server SDK

Comments

@drganjoo
Copy link
Contributor

An SDK generated for a Smithy model with shapes that have constraint traits applied fails to compile. Instead of using the wrapping Rust type, the inner data type needs to be used.

The error produced is:

error[E0308]: mismatched types
   |
   |         encoder.str("rangeLongLabel").long(input.range_long_label);
   |                                       ---- ^^^^^^^^^^^^^^^^^^^^^^ expected `i64`, found `RangeLong`
   |                                       |
   |                                       arguments to this method are incorrect
   |
@drganjoo drganjoo added server Rust server SDK high-priority High priority issue labels Aug 14, 2024
@drganjoo drganjoo self-assigned this Aug 14, 2024
@drganjoo
Copy link
Contributor Author

drganjoo commented Oct 15, 2024

Fixed in: #3794

A test has been added that uses the constraints.smithy file to ensure the CBOR implementation works with all constraints.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
high-priority High priority issue server Rust server SDK
Projects
None yet
Development

No branches or pull requests

1 participant