-
Notifications
You must be signed in to change notification settings - Fork 188
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
Constrained shapes that reach @sensitive
shapes don't implement Debug
#2582
Comments
david-perez
added a commit
that referenced
this issue
Apr 17, 2023
Constrained shapes should always be able to `#[derive(Debug)]`. Fixes #2582.
1 task
unexge
pushed a commit
that referenced
this issue
Apr 24, 2023
) Constrained shapes should always be able to `#[derive(Debug)]`. Fixes #2582. ## Testing The modified integration test fails without this patch applied. ## Checklist <!--- If a checkbox below is not applicable, then please DELETE it rather than leaving it unchecked --> - [x] I have updated `CHANGELOG.next.toml` if I made changes to the smithy-rs codegen or runtime crates ---- _By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice._ Co-authored-by: Matteo Bigoi <1781140+crisidev@users.noreply.github.com>
rcoh
pushed a commit
that referenced
this issue
Apr 24, 2023
) Constrained shapes should always be able to `#[derive(Debug)]`. Fixes #2582. ## Testing The modified integration test fails without this patch applied. ## Checklist <!--- If a checkbox below is not applicable, then please DELETE it rather than leaving it unchecked --> - [x] I have updated `CHANGELOG.next.toml` if I made changes to the smithy-rs codegen or runtime crates ---- _By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice._ Co-authored-by: Matteo Bigoi <1781140+crisidev@users.noreply.github.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Minimal reproducer:
Generates:
And so we get:
The mistake is around here:
https://github.com/awslabs/smithy-rs/blob/35f2f27a8380a1310c264a386e162cd9f2180137/codegen-server/src/main/kotlin/software/amazon/smithy/rust/codegen/server/smithy/ConstrainedShapeSymbolMetadataProvider.kt#L46-L48
Here, we're not adding
#[derive(Debug)]
on the constrained shapeConstrainedList
becausecontainerDefaultMetadata(shape, model).derives
does not includeDebug
: indeed,SensitiveStructure
does not#[derive(Debug)]
because it implementsDebug
manually.The text was updated successfully, but these errors were encountered: