Commit 4dad7bd
Allow SDK to be built with unknown traits in models (upgrading Smithy to 1.29.0 as part of it) (#2547)
## Motivation and Context
Addresses #2104
## Description
This PR allows us to build `aws-sdk-rust` even with unknown traits
present in the AWS models. This requires `Smithy` 1.29.0 that includes
[support](smithy-lang/smithy#1685) for an extension
property,
[allowUnknownTraits](https://smithy.io/2.0/guides/building-models/gradle-plugin.html?highlight=allowunknowntraits#smithy-extension-properties).
## Testing
Manually added a unknown trait into an AWS model like so:
```
diff --git a/aws/sdk/aws-models/sts.json b/aws/sdk/aws-models/sts.json
--- a/aws/sdk/aws-models/sts.json
+++ b/aws/sdk/aws-models/sts.json
@@ -69,6 +69,7 @@
"aws.auth#sigv4": {
"name": "sts"
},
+ "aws.protocols#awsQuery2": {},
"aws.protocols#awsQuery": {},
```
and confirmed `/gradlew :aws:sdk:assemble` built SDK successfully. Also
verified that without `allowUnknownTraits = true` in
`aws/sdk/build.gradle.kts`, `/gradlew :aws:sdk:assemble` failed with the
above unknown trait.
----
_By submitting this pull request, I confirm that you can use, modify,
copy, and redistribute this contribution, under the terms of your
choice._
---------
Co-authored-by: Yuki Saito <awsaito@amazon.com>1 parent 950ee78 commit 4dad7bd
File tree
3 files changed
+16
-3
lines changed- aws/sdk
- codegen-server/src/main/kotlin/software/amazon/smithy/rust/codegen/server/smithy/generators/protocol
3 files changed
+16
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
| 23 | + | |
23 | 24 | | |
24 | 25 | | |
25 | 26 | | |
| |||
Lines changed: 14 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
810 | 810 | | |
811 | 811 | | |
812 | 812 | | |
813 | | - | |
814 | | - | |
| 813 | + | |
| 814 | + | |
| 815 | + | |
| 816 | + | |
| 817 | + | |
| 818 | + | |
| 819 | + | |
| 820 | + | |
| 821 | + | |
| 822 | + | |
815 | 823 | | |
816 | 824 | | |
817 | 825 | | |
| |||
830 | 838 | | |
831 | 839 | | |
832 | 840 | | |
| 841 | + | |
| 842 | + | |
| 843 | + | |
| 844 | + | |
833 | 845 | | |
834 | 846 | | |
835 | 847 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
21 | | - | |
| 21 | + | |
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
| |||
0 commit comments