-
Notifications
You must be signed in to change notification settings - Fork 28
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: Publish releases on Swift Package Registry #778
base: main
Are you sure you want to change the base?
Conversation
This reverts commit 50bbef6.
val SMITHY_FORM_URL = smithySwiftTargetNamed("SmithyFormURL") | ||
val SMITHY_WAITERS_API = smithySwiftTargetNamed("SmithyWaitersAPI") | ||
|
||
private fun smithySwiftTargetNamed(name: String): SwiftDependency { |
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 helper function makes the SwiftDependency declarations above a lot less repetitive.
Also, ignore the version numbers on Swift dependencies for now. A future PR will automatically set them from a configuration file.
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.
All of these smithy-swift SwiftDependencies were also changed so that smithy-swift is a Git dependency, not installed from registry.
"", | ||
"aws-crt-swift", | ||
DistributionMethod.GIT, | ||
) |
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.
The CRT SwiftDependency above is no longer used, and is deleted.
dependencies: [ | ||
"ClientRuntime", | ||
"SmithyHTTPAPI", | ||
.product(name: "AwsCommonRuntimeKit", package: "aws-crt-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.
SmithyTestUtil now needs this dependency on CRT (this was an oversight in the earlier TestInitializer PR.)
@@ -157,7 +157,7 @@ class SwiftWriter( | |||
// | |||
// Also leave out the headers when JSON or the version file is being written, | |||
// as indicated by the file extension. | |||
val isPackageManifest = listOf(PACKAGE_MANIFEST_NAME, (PACKAGE_MANIFEST_NAME + ".swift")).contains(fullPackageName) | |||
val isPackageManifest = PACKAGE_MANIFEST_NAME.contains(fullPackageName) |
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.
Simpler logic that achieves the same (determining if this file is a package manifest.
There is also a codegen test (see below) to ensure that manifests are written correctly.
@@ -30,6 +30,7 @@ open class HttpProtocolServiceClient( | |||
ClientRuntimeTypes.Core.Client, | |||
) { | |||
writer.write("public static let clientName = \$S", serviceSymbol.name) | |||
writer.write("public static let version = \$S", ctx.settings.moduleVersion) |
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.
The client gains this version property, which is used over in the accompanying AWS SDK PR to set the client version in the user agent.
Issue #
awslabs/aws-sdk-swift#1553
Description of changes
smithy-swift
back to being distributed via Gitversion
property to service clients so they are aware of their own version & can report it in the user agentScope
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.