Unverified Commit 1446cad4 authored by John DiSanti's avatar John DiSanti Committed by GitHub
Browse files

Upgrade to Smithy 1.43 (#3349)

_By submitting this pull request, I confirm that you can use, modify,
copy, and redistribute this contribution, under the terms of your
choice._
parent e652d6a6
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -36,6 +36,7 @@ import software.amazon.smithy.rust.codegen.core.rustlang.writable
import software.amazon.smithy.rust.codegen.core.smithy.generators.LibRsCustomization
import software.amazon.smithy.rust.codegen.core.smithy.generators.LibRsSection
import software.amazon.smithy.rust.codegen.core.testutil.testDependenciesOnly
import software.amazon.smithy.rustsdk.AwsCargoDependency.awsConfig
import software.amazon.smithy.rustsdk.AwsCargoDependency.awsRuntime
import java.nio.file.Files
import java.nio.file.Paths
@@ -143,6 +144,7 @@ class DynamoDbTestDependencies : LibRsCustomization() {
class S3TestDependencies(private val codegenContext: ClientCodegenContext) : LibRsCustomization() {
    override fun section(section: LibRsSection): Writable =
        writable {
            addDependency(awsConfig(codegenContext.runtimeConfig).toDevDependency().withFeature("behavior-version-latest"))
            addDependency(AsyncStd)
            addDependency(BytesUtils.toDevDependency())
            addDependency(FastRand.toDevDependency())
+12 −2
Original line number Diff line number Diff line
@@ -762,9 +762,19 @@ class RustWriter private constructor(
                        }
                    } else if (memberSymbol.defaultValue() is Default.NonZeroDefault) {
                        val default = Node.printJson((memberSymbol.defaultValue() as Default.NonZeroDefault).value)
                        when (shape) {
                            // We know that the default is 'true' since it's the only possible non-zero default
                            // for a boolean. Don't explicitly check against `true` to avoid a clippy lint.
                            is BooleanShape ->
                                rustBlock("if !${variable.asValue()}") {
                                    block(variable)
                                }

                            else ->
                                rustBlock("if ${variable.asValue()} != $default") {
                                    block(variable)
                                }
                        }
                    } else {
                        rustBlock("") {
                            block(variable)
+1 −1
Original line number Diff line number Diff line
@@ -21,7 +21,7 @@ kotlin.code.style=official

# codegen
smithyGradlePluginVersion=0.7.0
smithyVersion=1.42.0
smithyVersion=1.43.0

# kotlin
kotlinVersion=1.9.20