-
Notifications
You must be signed in to change notification settings - Fork 33
chore: Build service clients with exact dependencies #953
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
Conversation
import software.amazon.smithy.swift.codegen.integration.ProtocolGenerator | ||
import kotlin.jvm.optionals.getOrNull | ||
|
||
val SERVICE_CLIENT_JSON_NAME = "Dependencies.json" |
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 type generates a JSON file containing an array with the names of the client's dependencies.
This will be used later when constructing Package.swift
.
@@ -40,7 +40,7 @@ class 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.
Just cleanup below.
@@ -98,6 +98,7 @@ class SwiftSettings( | |||
COPYRIGHT_NOTICE, | |||
VISIBILITY, | |||
FOR_PROTOCOL_TESTS, | |||
INTERNAL_CLIENT, |
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.
Forgot to add this when I added the internalClient
property... it silences a bunch of Kotlin codegen warnings.
import software.amazon.smithy.swift.codegen.TestContext | ||
import software.amazon.smithy.swift.codegen.defaultSettings | ||
import software.amazon.smithy.swift.codegen.protocolgeneratormocks.MockHTTPAWSJson11ProtocolGenerator | ||
|
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.
Very simple test class for the new service client JSON generator.
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.
Naming suggestion for better clarity
@@ -0,0 +1,39 @@ | |||
/* |
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.
Suggestion on naming: something like DependencyJSONGenerator
is probably more clearer than ServiceClientJSONGenerator
. Relevant to all places where this name is used.
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.
Renamed as suggested.
Description of changes
Removes the package manifest generator & replaces it with a generator for JSON that describes dependencies.
Scope
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.