Skip to content

Commit dcf9c05

Browse files
committed
Merge branch 'main' of github.com:smithy-lang/smithy-kotlin into kn-main-ci-merge
2 parents 5916994 + cda5e0b commit dcf9c05

File tree

23 files changed

+527
-75
lines changed

23 files changed

+527
-75
lines changed
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"id": "39ca59b7-65d6-44da-85a6-84c26ad481e7",
3+
"type": "feature",
4+
"description": "Add additional TLS configuration options to HTTP engines.",
5+
"issues": [
6+
"awslabs/smithy-kotlin#820"
7+
]
8+
}
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"id": "47e8421b-f037-4968-9592-13cc3e237448",
3+
"type": "misc",
4+
"description": "Upgrade to Gradle 9.0.0"
5+
}

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
# Changelog
22

3+
## [1.5.6] - 08/21/2025
4+
5+
### Fixes
6+
* [#1285](https://github.com/awslabs/smithy-kotlin/issues/1285) ⚠️ **IMPORTANT**: Correctly return number of bytes read from chunked streams
7+
38
## [1.5.5] - 08/13/2025
49

510
## [1.5.4] - 08/07/2025

build.gradle.kts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
import aws.sdk.kotlin.gradle.dsl.configureJReleaser
66
import aws.sdk.kotlin.gradle.dsl.configureLinting
77
import aws.sdk.kotlin.gradle.util.typedProp
8+
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
89

910
buildscript {
1011
// NOTE: buildscript classpath for the root project is the parent classloader for the subprojects, we
@@ -46,9 +47,9 @@ val testJavaVersion = typedProp<String>("test.java.version")?.let {
4647
}
4748

4849
allprojects {
49-
if (rootProject.typedProp<Boolean>("kotlinWarningsAsErrors") == true) {
50-
tasks.withType<org.jetbrains.kotlin.gradle.tasks.KotlinCompile> {
51-
compilerOptions.allWarningsAsErrors = true
50+
tasks.withType<KotlinCompile> {
51+
compilerOptions {
52+
allWarningsAsErrors = true
5253
}
5354
}
5455

codegen/protocol-tests/build.gradle.kts

Lines changed: 22 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -95,51 +95,35 @@ tasks.generateSmithyProjections {
9595
}
9696
}
9797

98-
abstract class ProtocolTestTask @Inject constructor(private val project: Project) : DefaultTask() {
99-
/**
100-
* The projection
101-
*/
102-
@get:Input
103-
abstract val projectionName: Property<String>
104-
105-
/**
106-
* The projection root directory
107-
*/
108-
@get:Input
109-
abstract val projectionRootDirectory: Property<String>
110-
111-
@TaskAction
112-
fun runTests() {
113-
val projectionRootDir = project.file(projectionRootDirectory.get())
114-
println("[$projectionName] buildDir: $projectionRootDir")
115-
if (!projectionRootDir.exists()) {
116-
throw GradleException("$projectionRootDir does not exist")
117-
}
118-
val wrapper = if (System.getProperty("os.name").lowercase().contains("windows")) "gradlew.bat" else "gradlew"
119-
val gradlew = project.rootProject.file(wrapper).absolutePath
120-
121-
// NOTE - this still requires us to publish to maven local.
122-
project.exec {
123-
workingDir = projectionRootDir
124-
executable = gradlew
125-
args = listOf("test")
126-
}
127-
}
128-
}
129-
13098
smithyBuild.projections.forEach {
13199
val protocolName = it.name
100+
val dirProvider = smithyBuild
101+
.smithyKotlinProjectionPath(protocolName)
102+
.map { file(it.toString()) }
132103

133-
tasks.register<ProtocolTestTask>("testProtocol-$protocolName") {
134-
dependsOn(tasks.generateSmithyProjections)
104+
tasks.register<Exec>("testProtocol-$protocolName") {
135105
group = "Verification"
136-
projectionName.set(it.name)
137-
projectionRootDirectory.set(smithyBuild.smithyKotlinProjectionPath(it.name).map { it.toString() })
106+
dependsOn(tasks.generateSmithyProjections)
107+
108+
doFirst {
109+
val dir = dirProvider.get()
110+
require(dir.exists()) { "$dir does not exist" }
111+
112+
val wrapper = if (System.getProperty("os.name").lowercase().contains("windows")) {
113+
"gradlew.bat"
114+
} else {
115+
"gradlew"
116+
}
117+
val gradlew = rootProject.layout.projectDirectory.file(wrapper).asFile.absolutePath
118+
119+
workingDir = dir
120+
executable = gradlew
121+
args = listOf("test")
122+
}
138123
}
139124
}
140125

141126
tasks.register("testAllProtocols") {
142127
group = "Verification"
143-
val allTests = tasks.withType<ProtocolTestTask>()
144-
dependsOn(allTests)
128+
dependsOn(tasks.matching { it.name.startsWith("testProtocol-") })
145129
}

codegen/smithy-kotlin-codegen/src/main/kotlin/software/amazon/smithy/kotlin/codegen/rendering/waiters/KotlinJmespathExpressionVisitor.kt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -164,6 +164,7 @@ class KotlinJmespathExpressionVisitor(
164164

165165
val codegen = buildString {
166166
val nullables = buildList {
167+
// FIXME In some cases we are unnecessarily handling nulls here, leading to compiler warnings. SDK-KT-786
167168
if (left.shape?.isNullable == true || left.nullable) add("${left.identifier} == null")
168169
if (right.shape?.isNullable == true || right.nullable) add("${right.identifier} == null")
169170
}

dokka-smithy/build.gradle.kts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@ tasks.withType<org.jetbrains.kotlin.gradle.tasks.KotlinCompile> {
3535
compilerOptions {
3636
jvmTarget.set(JvmTarget.JVM_1_8)
3737
freeCompilerArgs.add("-Xjdk-release=1.8")
38-
allWarningsAsErrors.set(false) // FIXME Dokka bundles stdlib into the classpath, causing an unfixable warning
3938
}
4039
}
4140

gradle.properties

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,10 @@ kotlinx.atomicfu.enableNativeIrTransformation=false
1414
org.gradle.jvmargs=-Xmx2G -XX:MaxMetaspaceSize=1G
1515

1616
# SDK
17-
sdkVersion=1.5.6-SNAPSHOT
17+
sdkVersion=1.5.7-SNAPSHOT
1818

1919
# codegen
20-
codegenVersion=0.35.6-SNAPSHOT
20+
codegenVersion=0.35.7-SNAPSHOT
2121

2222
# FIXME Remove after Dokka 2.0 Gradle plugin is stable
2323
org.jetbrains.dokka.experimental.gradle.pluginMode=V2Enabled

gradle/libs.versions.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
kotlin-version = "2.2.0"
33
dokka-version = "2.0.0"
44

5-
aws-kotlin-repo-tools-version = "0.4.30-kn"
5+
aws-kotlin-repo-tools-version = "0.4.43"
66

77
# libs
88
coroutines-version = "1.10.2"
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3-
distributionUrl=https://services.gradle.org/distributions/gradle-8.14.2-bin.zip
3+
distributionUrl=https://services.gradle.org/distributions/gradle-9.0.0-bin.zip
44
networkTimeout=10000
55
zipStoreBase=GRADLE_USER_HOME
66
zipStorePath=wrapper/dists

0 commit comments

Comments
 (0)