-
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
Implement smithy-dafny-codegen
library that supports dafny-client-codegen
smithy-build.json plugin for AWS SDK generation
#151
Comments
dafny-codgen
Gradle plugin that supports AWS SDK generationdafny-codgen
SmithyBuildPlugin plugin that supports AWS SDK generation
Corrected my understanding: there's one big "Smithy Gradle plugin" (https://github.com/awslabs/smithy-gradle-plugin/). Smithy has its own plugin mechanism that we need to implement: https://github.com/awslabs/smithy/blob/main/smithy-build/src/main/java/software/amazon/smithy/build/SmithyBuildPlugin.java |
dafny-codgen
SmithyBuildPlugin plugin that supports AWS SDK generationsmithy-dafny-codgen
library that supports dafny-codegen
smithy-build.json plugin for AWS SDK generation
Note to self - check on the current best practice for configuring client region. |
smithy-dafny-codgen
library that supports dafny-codegen
smithy-build.json plugin for AWS SDK generationsmithy-dafny-codegen
library that supports dafny-codegen
smithy-build.json plugin for AWS SDK generation
smithy-dafny-codegen
library that supports dafny-codegen
smithy-build.json plugin for AWS SDK generationsmithy-dafny-codegen
library that supports dafny-codegen
smithy-build.json plugin for AWS SDK generation
smithy-dafny-codegen
library that supports dafny-codegen
smithy-build.json plugin for AWS SDK generationsmithy-dafny-codegen
library that supports dafny-client-codegen
smithy-build.json plugin for AWS SDK generation
Note I'm going to cut a PR to add a new |
I have to do a bit more to hook it up to the CI, but this should help clarify the requirements beyond the issue description: https://github.com/awslabs/polymorph/tree/smithy-client-codegen-test-model/TestModels/aws-sdks/sqs |
Another wrinkle: Smithy codegen has a notion of "edition": https://smithy.io/2.0/guides/building-codegen/configuring-the-generator.html#edition That applies equally well to |
Co-authored-by: Valerie Lambert <lavaleri@amazon.com> Co-authored-by: Alex Chew <alex-chew@users.noreply.github.com>
This will support the standard workflow for generating a client for a given Smithy model, as described here: https://smithy.io/2.0/guides/using-code-generation/generating-a-client.html. Ours will only support AWS service models at first, since the implementation will emit Dafny and target language code to wrap up existing AWS SDKs.
This should be mostly wrapping up existing functionality in this tool. There are some minor open design questions about how to configure things, since in our case we will be emitting a project that will handle one or more Dafny-supported target languages.
The workflow for users should be perfectly parallel to how it works for other
smithy-<language>
tools:software.amazon.smithy
Gradle pluginsmithy-dafny-codegen
library as an implementation dependencydafny-codegen
Smithy build plugin in asmithy-build.json
file.A typical
smithy-build.json
file might look something like this:(The configuration for a given SmithyBuildPlugin seems to be an arbitrary JSON object, and we'll likely need more properties)
Given this configuration, the plugin should output a "complete Dafny project" just as other codegen plugins do - e.g. see this documentation about the
typescript-codegen
plugin: https://smithy.io/2.0/guides/using-code-generation/generating-a-client.html#add-the-codegen-plugin. The definition of a "Dafny project" is fuzzy at the time of writing this, however. I would suggest generating a Makefile to build the result for the configured target languages, which will involve invokingdafny
as well as target language tooling. In the future there should be more Dafny-native support for project management, such as dafny-lang/dafny#3169 and/or dafny-lang/dafny#2907, at which point we can offer a more standard output style option.The text was updated successfully, but these errors were encountered: