Skip to content

Commit 4200e9a

Browse files
author
Steven Yuan
authored
chore: upgrade Smithy to 1.23.0, upgrade Smithy Gradle to 0.6.0 (#676)
1 parent 230751e commit 4200e9a

File tree

4 files changed

+13
-9
lines changed

4 files changed

+13
-9
lines changed
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"id": "57c0a5a3-d499-4a0c-9930-54fd363a88b5",
3+
"type": "misc",
4+
"description": "Upgrade Smithy to 1.23.0, upgrade Smithy Gradle to 0.6.0"
5+
}

codegen/smithy-aws-kotlin-codegen/src/main/kotlin/aws/sdk/kotlin/codegen/customization/BoxServices.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ import software.amazon.smithy.kotlin.codegen.model.isNumberShape
1212
import software.amazon.smithy.model.Model
1313
import software.amazon.smithy.model.neighbor.Walker
1414
import software.amazon.smithy.model.shapes.*
15-
import software.amazon.smithy.model.traits.BoxTrait
1615
import software.amazon.smithy.model.transform.ModelTransformer
1716
import software.amazon.smithy.utils.ToSmithyBuilder
1817

@@ -85,7 +84,8 @@ class BoxServices : KotlinIntegration {
8584
get() = isBooleanShape || isNumberShape
8685

8786
private fun <T> box(shape: T): Shape where T : Shape, T : ToSmithyBuilder<T> {
88-
return (shape.toBuilder() as AbstractShapeBuilder<*, T>).addTrait(BoxTrait()).build()
87+
return (shape.toBuilder() as AbstractShapeBuilder<*, T>)
88+
.addTrait(@Suppress("DEPRECATION") software.amazon.smithy.model.traits.BoxTrait()).build()
8989
}
9090

9191
private fun boxNumber(shape: NumberShape): Shape = when (shape) {

codegen/smithy-aws-kotlin-codegen/src/test/kotlin/aws/sdk/kotlin/codegen/customization/BoxServicesTest.kt

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ import software.amazon.smithy.kotlin.codegen.test.newTestContext
1212
import software.amazon.smithy.kotlin.codegen.test.prependNamespaceAndService
1313
import software.amazon.smithy.kotlin.codegen.test.toSmithyModel
1414
import software.amazon.smithy.model.shapes.StructureShape
15-
import software.amazon.smithy.model.traits.BoxTrait
1615
import kotlin.test.Test
1716
import kotlin.test.assertFalse
1817
import kotlin.test.assertTrue
@@ -51,10 +50,10 @@ class BoxServicesTest {
5150
struct.members().forEach {
5251
val target = transformed.expectShape(it.target)
5352
if (target.isBooleanShape || target.isNumberShape) {
54-
assertTrue(it.hasTrait<BoxTrait>())
53+
assertTrue(it.hasTrait<@Suppress("DEPRECATION") software.amazon.smithy.model.traits.BoxTrait>())
5554
} else {
56-
assertFalse(target.hasTrait<BoxTrait>())
57-
assertFalse(it.hasTrait<BoxTrait>())
55+
assertFalse(target.hasTrait<@Suppress("DEPRECATION") software.amazon.smithy.model.traits.BoxTrait>())
56+
assertFalse(it.hasTrait<@Suppress("DEPRECATION") software.amazon.smithy.model.traits.BoxTrait>())
5857
}
5958
}
6059
}

gradle.properties

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ org.gradle.jvmargs=-Xmx6g -XX:MaxMetaspaceSize=2G
99
sdkVersion=0.17.5-SNAPSHOT
1010

1111
# codegen
12-
smithyVersion=1.22.0
13-
smithyGradleVersion=0.5.3
12+
smithyVersion=1.23.0
13+
smithyGradleVersion=0.6.0
1414
# smithy-kotlin codegen and runtime are versioned together
1515
smithyKotlinVersion=0.12.4
1616

@@ -39,4 +39,4 @@ slf4jVersion=1.7.36
3939

4040
# dokka config (values specified at build-time as needed)
4141
smithyKotlinPackageListUrl=
42-
smithyKotlinDocBaseUrl=https://docs.aws.amazon.com/sdk-for-kotlin/latest/reference/smithy-kotlin
42+
smithyKotlinDocBaseUrl=https://docs.aws.amazon.com/sdk-for-kotlin/latest/reference/smithy-kotlin

0 commit comments

Comments
 (0)