-
Notifications
You must be signed in to change notification settings - Fork 8
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
OrphanedShapes TestModel #622
Comments
The more fundamental inconsistency is the fact that smithy-dafny generates code for all shapes in a namespace, instead of in the service closure as the other Smithy code generators do. Including orphaned shapes is the main consequence. There may be others. The Rust codegen currently special-cases an orphaned "input structure" in the DDB model because of this. (Edit: actually it's on the branch I haven't merged yet: https://github.com/smithy-lang/smithy-dafny/blob/robin-aws/support-dependencies-on-rust/codegen/smithy-dafny-codegen/src/main/java/software/amazon/polymorph/smithyrust/generator/RustAwsSdkShimGenerator.java#L324-L326) See also #605. |
I skipped over the actual issue title in my response. I do think we should eventually make smithy-dafny more consistent with the other At the same time the So if the test case you want is about local service config shapes, that implies augmenting the |
Smithy-Dafny .NET and Java support "orphaned shapes".
"Orphaned shapes" are shapes that exist in a Smithy model, but aren't discovered by Smithy-Core's shape discovery mechanism.
Smithy-Core will only discover and generate code for shapes that are attached to a service via the service's
and recursive traversals of the connected shapes.
If a shape is defined in a Smithy model, but not used in a LocalService's operations or errors, codegens that use Smithy-Core's shape discovery will not generate code for the shape.
The expectation from Smithy-Dafny .NET/Java is that code is generated for these shapes.
The text was updated successfully, but these errors were encountered: