-
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
feat: Support multiple models/dependencies in Rust, within a single crate #583
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…obin-aws/support-dependencies-on-rust # Conflicts: # codegen/smithy-dafny-codegen/src/main/java/software/amazon/polymorph/smithyrust/generator/AbstractRustShimGenerator.java # codegen/smithy-dafny-codegen/src/main/java/software/amazon/polymorph/smithyrust/generator/RustAwsSdkShimGenerator.java
robin-aws
force-pushed
the
robin-aws/support-dependencies-on-rust
branch
from
September 21, 2024 00:33
5a68849
to
cb609e7
Compare
This was referenced Sep 21, 2024
…obin-aws/support-dependencies-on-rust # Conflicts: # TestModels/Positional/runtimes/rust/src/operation/get_name.rs # TestModels/Positional/runtimes/rust/src/operation/get_resource.rs # TestModels/Positional/runtimes/rust/src/operation/get_resource_positional.rs # codegen/smithy-dafny-codegen/src/main/java/software/amazon/polymorph/smithyrust/generator/AbstractRustShimGenerator.java # codegen/smithy-dafny-codegen/src/main/java/software/amazon/polymorph/smithyrust/generator/RustLibraryShimGenerator.java
…obin-aws/support-dependencies-on-rust # Conflicts: # SmithyDafnyMakefile.mk # TestModels/aws-sdks/ddb-lite/runtimes/rust/src/conversions/attribute_value.rs # TestModels/aws-sdks/ddb/Makefile # TestModels/aws-sdks/kms/Makefile # TestModels/aws-sdks/kms/Model/model.json # codegen/smithy-dafny-codegen/src/main/java/software/amazon/polymorph/CodegenEngine.java # codegen/smithy-dafny-codegen/src/main/java/software/amazon/polymorph/smithyrust/generator/AbstractRustShimGenerator.java # codegen/smithy-dafny-codegen/src/main/java/software/amazon/polymorph/smithyrust/generator/RustAwsSdkShimGenerator.java # codegen/smithy-dafny-codegen/src/main/java/software/amazon/polymorph/smithyrust/generator/RustLibraryShimGenerator.java
…mithy-lang/smithy-dafny into robin-aws/support-dependencies-on-rust
robin-aws
changed the title
Robin aws/support dependencies on rust
feat: Support multiple models/dependencies in Rust, within a single crate
Oct 10, 2024
ajewellamz
previously approved these changes
Oct 10, 2024
ajewellamz
approved these changes
Oct 10, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Issue #, if available:
Resolves #576. Resolves #591. Resolves #590.
Description of changes:
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 aMAIN_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 underdeps::<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:
@positional
(testing followup tracked in More cases on Positional TestModel #599)Unit
type properly (testing followup tracked in SimpleUnit test model #602)Reviewer: I recommend skipping all TestModel changes except their makefiles. I also apologize for the size of this PR, but would also recommend biasing for merging this in order to lock down the progress - feel free to leave comments for cleanup to follow up with. Please do at least review the overall structure change for the sake of understanding.
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.