-
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
Align need for orphaned shape generation better with Smithy code generation recommendations/idioms #627
Comments
Note: in the meantime, it would be really Groovy if Smithy Danfy's various code generators could consolidate on the same shape selection logic. That is difficult, but would be Groovy. |
FYI the standard solution for orphaned shapes is to add dummy operations to bring them into the service closure. That's probably our best option until Smithy itself broadly supports a proper feature for adding shapes to the closure, or "types" code generation that isn't driven by the closure. |
That is not an acceptable solution, Because that would add Dummy operations to our public interfaces. That will not earn customer trust. |
We could have some silly trait that comes back and deletes the dummy operations... If we had a trait/member on the local service trait, Finally, if we refactor the models to ensure that all of a service's errors are listed on the service, |
Splitting this off from #622, which is about testing for the current state better, whereas this issue is about improving the current state.
Local services need to generate code for shapes not in the service closure for at least two different reasons:
@localService$config
member.smithy-dafny generally generates code for all shapes in a namespace to get around this, but this can be surprising and makes it harder to re-use logic from other
smithy-<lang>
code generators.Being able to generate just types from shapes without a dummy service attached is a very common Smithy feature request, and a general feature may land in the future we can use here.
The text was updated successfully, but these errors were encountered: