-
Notifications
You must be signed in to change notification settings - Fork 95
feat: Add code generator build plugin to service clients #2058
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
base: epic/sbs
Are you sure you want to change the base?
Conversation
| // Smithy plugins | ||
| static var SmithyCodeGenerator: Self { .plugin(name: "SmithyCodeGenerator", package: "smithy-swift") } | ||
| } | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This file is just code-generated from the Package.base.txt above.
| rm -rf Sources/Services/* | ||
| rm -rf Tests/Services/* | ||
| rm -rf SmokeTests/* | ||
| rm -rf Sources/Core/AWSIdentity/InternalClients/* |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove the internal clients before development codegen & allow them to be regenerated.
| extension Target.PluginUsage { | ||
| // Smithy plugins | ||
| static var SmithyCodeGenerator: Self { .plugin(name: "SmithyCodeGenerator", package: "smithy-swift") } | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This extension is a convenience for use when installing the plugin into service clients.
| dependencies: internalAWSSTSDependencies, | ||
| path: "Sources/Core/AWSSDKIdentity/InternalClients/InternalAWSSTS/Sources/InternalAWSSTS" | ||
| path: "Sources/Core/AWSSDKIdentity/InternalClients/InternalAWSSTS/Sources/InternalAWSSTS", | ||
| plugins: [.SmithyCodeGenerator] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here & below, the code generator plugin is added to the 4 internal clients and to all AWS service targets.
| .contentsOfDirectory(atPath: "../smithy-swift/Sources") | ||
| .sorted() | ||
| .filter { $0 != "libxml2" } // Ignore libxml module | ||
| .filter { $0 != "SmithyCodegenCLI" } // Ignore codegen component |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Omits non-public codegen components from generated docs.
Description of changes
Companion PR smithy-lang/smithy-swift#999 creates a build tool plugin for native-Swift code generation.
This PR inserts the new code generator plugin into both internal and public service targets.
New/existing dependencies impact assessment, if applicable
No new dependencies were added to this change.
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.