Skip to content
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

Updating Smithy to 1.51.0 #3847

Merged
merged 3 commits into from
Sep 25, 2024
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ import software.amazon.smithy.rust.codegen.core.smithy.generators.protocol.Broke
import software.amazon.smithy.rust.codegen.core.smithy.generators.protocol.FailingTest
import software.amazon.smithy.rust.codegen.core.smithy.generators.protocol.ProtocolSupport
import software.amazon.smithy.rust.codegen.core.smithy.generators.protocol.ProtocolTestGenerator
import software.amazon.smithy.rust.codegen.core.smithy.generators.protocol.ServiceShapeId
import software.amazon.smithy.rust.codegen.core.smithy.generators.protocol.ServiceShapeId.AWS_JSON_10
import software.amazon.smithy.rust.codegen.core.smithy.generators.protocol.ServiceShapeId.REST_JSON
import software.amazon.smithy.rust.codegen.core.smithy.generators.protocol.ServiceShapeId.RPC_V2_CBOR
Expand Down Expand Up @@ -84,20 +83,7 @@ class ClientProtocolTestGenerator(
)

private val BrokenTests:
Set<BrokenTest> =
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice, good catch

setOf(
BrokenTest.ResponseTest(
ServiceShapeId.REST_JSON,
"RestJsonClientIgnoresDefaultValuesIfMemberValuesArePresentInResponse",
howToFixItFn = ::fixRestJsonClientIgnoresDefaultValuesIfMemberValuesArePresentInResponse,
inAtLeast = setOf("1.50.0"),
trackedIn =
setOf(
// TODO(https://github.com/smithy-lang/smithy/pull/2341)
"https://github.com/smithy-lang/smithy/pull/2341",
),
),
)
Set<BrokenTest> = setOf()

private fun fixRestJsonClientIgnoresDefaultValuesIfMemberValuesArePresentInResponse(
testCase: TestCase.ResponseTest,
Expand Down Expand Up @@ -296,7 +282,9 @@ class ClientProtocolTestGenerator(
"Operation" to codegenContext.symbolProvider.toSymbol(operationShape),
"RuntimePlugin" to RT.runtimePlugin(rc),
"SdkBody" to RT.sdkBody(rc),
"SharedResponseDeserializer" to RT.smithyRuntimeApiClient(rc).resolve("client::ser_de::SharedResponseDeserializer"),
"SharedResponseDeserializer" to
RT.smithyRuntimeApiClient(rc)
.resolve("client::ser_de::SharedResponseDeserializer"),
)
if (expectedShape.hasTrait<ErrorTrait>()) {
val errorSymbol = codegenContext.symbolProvider.symbolForOperationError(operationShape)
Expand Down
10 changes: 1 addition & 9 deletions gradle.properties
ysaito1001 marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
Expand Up @@ -2,31 +2,23 @@
# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
# SPDX-License-Identifier: Apache-2.0
#

# Rust MSRV (entered into the generated README)
rust.msrv=1.78.0

# To enable debug, swap out the two lines below.
# When changing this value, be sure to run `./gradlew --stop` to kill the Gradle daemon.
# org.gradle.jvmargs=-Xmx1024M -agentlib:jdwp=transport=dt_socket,server=y,suspend=y,address=localhost:5006
org.gradle.jvmargs=-Xmx1024M

# Version number to use for the generated stable runtime crates
smithy.rs.runtime.crate.stable.version=1.1.7

# Version number to use for the generated unstable runtime crates
smithy.rs.runtime.crate.unstable.version=0.60.6

kotlin.code.style=official

# codegen
smithyGradlePluginVersion=0.9.0
smithyVersion=1.50.0
smithyVersion=1.51.0
allowLocalDeps=false

# kotlin
kotlinVersion=1.9.20

# testing/utility
ktlintVersion=1.0.1
kotestVersion=5.8.0
Expand Down
Loading