Skip to content
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

SimpleUnit test model #602

Open
robin-aws opened this issue Sep 22, 2024 · 3 comments
Open

SimpleUnit test model #602

robin-aws opened this issue Sep 22, 2024 · 3 comments
Labels
TestModels Relates to Testing the code generator via the TestModels directory

Comments

@robin-aws
Copy link
Contributor

Having no input or output structure is a distinct case as well.

@robin-aws robin-aws added the TestModels Relates to Testing the code generator via the TestModels directory label Sep 22, 2024
@texastony
Copy link
Contributor

I bumped into this while working on Mutations for the MPL.
I think it is the Dafny code gen that does not support them,
as compared to the runtimes.

@robin-aws
Copy link
Contributor Author

I thought the Dafny codegen does support them, since it at least does the expected thing of generating method Foo() instead of method Foo(input: Unit) or whatever?

@texastony
Copy link
Contributor

Inputs are fine.
Outputs are the problem.
i.e: the Dafny code generator wants something to put in returns.

robin-aws added a commit that referenced this issue Oct 10, 2024
…rate (#583)

Modifies the polymorph code generation process for Rust to apply to all services in scope at once, to get around the fact that Dafny's Rust code generation (and hence smithy-dafny's as well) only supports a single crate at a time. The polymorph CLI now supports multiple `--namespace` options, and the makefile now requires a `MAIN_SERVICE_FOR_RUST` service name in order to still select a single primary service to generate at the top level of the crate. All other services are qualified under `deps::<service_name>`. This layout may be changed before GA but I assert it is better to merge this first in order to lock down progress in the CI.

To implement this change, introduced a `MergedServicesGenerator` which instantiates a separate generator for each service. The individual generators were changed throughout to use the root path/module name for the given service.

Also made several other improvements to support building the complete DB ESDK dependency graph:

* Fixed several bugs in the handling of `@positional` (testing followup tracked in #599)
* Handled the Smithy `Unit` type properly (testing followup tracked in #602)
* Properly handled introducing a single top-level error type for SDK wrappers, and wrapping errors from dependent services.
* Miscellaneous bug fixes exposed by the DB ESDK source.
* Deleted generated source for several test models to avoid review noise (and CI sensitivity to non-deterministic code generation)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
TestModels Relates to Testing the code generator via the TestModels directory
Projects
None yet
Development

No branches or pull requests

2 participants