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

More cases on Positional TestModel #599

Open
robin-aws opened this issue Sep 21, 2024 · 1 comment
Open

More cases on Positional TestModel #599

robin-aws opened this issue Sep 21, 2024 · 1 comment
Labels
TestModels Relates to Testing the code generator via the TestModels directory

Comments

@robin-aws
Copy link
Contributor

Positional should have an operation with positional on only output (would have caught many typos in Rust support), and resource operations too.

@robin-aws robin-aws added the TestModels Relates to Testing the code generator via the TestModels directory label Sep 21, 2024
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)
ShubhamChaturvedi7 pushed a commit that referenced this issue Oct 18, 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)
@rishav-karanjit
Copy link
Member

rishav-karanjit commented Nov 5, 2024

I ended up satisfying this (more test in test model) in a PR and also found Java and Rust codegen has soundness issue. To close this issue we would need to fix this soundness gaps so that new test model can be merged.

#683

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