Skip to content

Commit

Permalink
wip: update to latest pull of smithy/endpoints_refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
ianbotsf committed Sep 15, 2023
1 parent c93d4c3 commit 7bed378
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 4 deletions.
2 changes: 1 addition & 1 deletion codegen/smithy-aws-kotlin-codegen/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ dependencies {
api("software.amazon.smithy:smithy-aws-iam-traits:$smithyVersion")
api("software.amazon.smithy:smithy-aws-cloudformation-traits:$smithyVersion")
api("software.amazon.smithy:smithy-protocol-test-traits:$smithyVersion")
implementation("software.amazon.smithy:smithy-aws-rules-engine:$smithyVersion")
implementation("software.amazon.smithy:smithy-aws-endpoints:$smithyVersion")

testImplementation("org.junit.jupiter:junit-jupiter:$junitVersion")
testImplementation("org.junit.jupiter:junit-jupiter-params:$junitVersion")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ class AwsEndpointDelegator : EndpointDelegator {
},
)
}

if (rules != null) {
ctx.delegator.useFileWriter(defaultProviderSymbol) {
DefaultEndpointProviderGenerator(it, rules, defaultProviderSymbol, providerSymbol, paramsSymbol, endpointFunctions, awsEndpointPropertyRenderers).render()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,24 @@ abstract class AwsHttpBindingProtocolGenerator : HttpBindingProtocolGenerator()
}

override fun generateProtocolUnitTests(ctx: ProtocolGenerator.GenerationContext) {
val ignoredTests = TestMemberDelta(
setOf(
// FIXME - compression not yet supported, see https://github.com/awslabs/smithy-kotlin/issues/955
"SDKAppliedContentEncoding_awsJson1_0",
"SDKAppliedContentEncoding_awsJson1_1",
"SDKAppliedContentEncoding_awsQuery",
"SDKAppliedContentEncoding_ec2Query",
"SDKAppliedContentEncoding_restJson1",
"SDKAppliedContentEncoding_restXml",
"SDKAppendedGzipAfterProvidedEncoding_restJson1",
"SDKAppendedGzipAfterProvidedEncoding_restXml",
"SDKAppendsGzipAndIgnoresHttpProvidedEncoding_awsJson1_0",
"SDKAppendsGzipAndIgnoresHttpProvidedEncoding_awsJson1_1",
"SDKAppendsGzipAndIgnoresHttpProvidedEncoding_awsQuery",
"SDKAppendsGzipAndIgnoresHttpProvidedEncoding_ec2Query",
)
)

// The following can be used to generate only a specific test by name.
// val targetedTest = TestMemberDelta(setOf("RestJsonComplexErrorWithNoMessage"), TestContainmentMode.RUN_TESTS)

Expand All @@ -64,6 +82,7 @@ abstract class AwsHttpBindingProtocolGenerator : HttpBindingProtocolGenerator()
requestTestBuilder,
responseTestBuilder,
errorTestBuilder,
ignoredTests,
).generateProtocolTests()
}

Expand Down
6 changes: 3 additions & 3 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ org.gradle.jvmargs=-Xmx6g -XX:MaxMetaspaceSize=2G
sdkVersion=0.32.2-SNAPSHOT

# codegen
smithyVersion=1.34.0-SNAPSHOT
smithyVersion=1.38.0-SNAPSHOT
smithyGradleVersion=0.6.0
# smithy-kotlin codegen and runtime are versioned together
smithyKotlinVersion=0.27.3
smithyKotlinVersion=0.27.4-SNAPSHOT

# kotlin
kotlinVersion=1.8.22
Expand All @@ -37,4 +37,4 @@ mockkVersion=1.13.3
slf4jVersion=2.0.6

# dokka config (values specified at build-time as needed)
smithyKotlinDocBaseUrl=https://sdk.amazonaws.com/kotlin/api/smithy-kotlin/api/$smithyKotlinVersion/
smithyKotlinDocBaseUrl=https://sdk.amazonaws.com/kotlin/api/smithy-kotlin/api/$smithyKotlinVersion/

0 comments on commit 7bed378

Please sign in to comment.