-
Notifications
You must be signed in to change notification settings - Fork 223
RFC30: Add tests to ensure that serde attributes are not added to error types
#2803
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
base: main
Are you sure you want to change the base?
Conversation
b15959c to
4f65d8d
Compare
...st/kotlin/software/amazon/smithy/rust/codegen/core/smithy/generators/BuilderGeneratorTest.kt
Show resolved
Hide resolved
...st/kotlin/software/amazon/smithy/rust/codegen/core/smithy/generators/BuilderGeneratorTest.kt
Outdated
Show resolved
Hide resolved
...st/kotlin/software/amazon/smithy/rust/codegen/core/smithy/generators/BuilderGeneratorTest.kt
Outdated
Show resolved
Hide resolved
Co-authored-by: John DiSanti <[email protected]>
...st/kotlin/software/amazon/smithy/rust/codegen/core/smithy/generators/BuilderGeneratorTest.kt
Show resolved
Hide resolved
Were these mistakenly added to the error builders, or to the errors themselves? |
This PR was a response to this #2637 PR. I added |
serde attributes are not added to error typesserde attributes are not added to error types
|
OK. Looks good. I will approve and merge once CI passes. |
2641a83 to
fbdf459
Compare
74330c1 to
5863495
Compare
…degen/core/smithy/generators/BuilderGeneratorTest.kt
…degen/core/smithy/generators/BuilderGeneratorTest.kt
| val credentials = model.lookup<StructureShape>("com.test#Credentials") | ||
| val secretStructure = model.lookup<StructureShape>("com.test#SecretStructure") | ||
| val structWithInnerSecretStructure = model.lookup<StructureShape>("com.test#StructWithInnerSecretStructure") | ||
| val error = model.lookup<StructureShape>("com.test#MyError") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I added this to get the shape of an error.
|
Hey, The CI returned an error but it's fixed now. |
|
this looks good. Should we also have some sort of test that looks at the generated |
|
This test doesn't affect For a context, please check this comment. |
|
I just clicked I think this one can be merged once it passes the tests. |
Motivation and Context
This is a sub-PR of #2615
During the development, I mistakenly added
serdeattributes toerrorrelated data types.This tests ensures that error types are not added.
Test that this PR adds will pass without the
serdeattributes.Description
Adds test on
codegen-core/src/test/kotlin/software/amazon/smithy/rust/codegen/core/smithy/generators/BuilderGeneratorTest.ktTesting
Checklist
CHANGELOG.next.tomlif I made changes to the smithy-rs codegen or runtime cratesCHANGELOG.next.tomlif I made changes to the AWS SDK, generated SDK code, or SDK runtime cratesBy submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.