Skip to content

Commit

Permalink
chore: update kotlin to 1.8.22; kotlinx.coroutines to 1.7.3 (#909)
Browse files Browse the repository at this point in the history
  • Loading branch information
aajtodd authored Aug 7, 2023
1 parent 03aa83f commit 507f673
Show file tree
Hide file tree
Showing 9 changed files with 20 additions and 33 deletions.
5 changes: 5 additions & 0 deletions .changes/1cd85099-9aa4-492a-a4b8-72e01da5d633.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"id": "1cd85099-9aa4-492a-a4b8-72e01da5d633",
"type": "misc",
"description": "Upgrade Kotlin to 1.8.22"
}
5 changes: 5 additions & 0 deletions .changes/70eb72c8-2b3d-4853-8d6f-98ea28474eb6.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"id": "70eb72c8-2b3d-4853-8d6f-98ea28474eb6",
"type": "misc",
"description": "Upgrade kotlinx.coroutines to 1.7.3"
}
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ private fun getDefaultRuntimeVersion(): String {
// publishing info
const val RUNTIME_GROUP: String = "aws.smithy.kotlin"
val RUNTIME_VERSION: String = System.getProperty("smithy.kotlin.codegen.clientRuntimeVersion", getDefaultRuntimeVersion())
val KOTLIN_COMPILER_VERSION: String = System.getProperty("smithy.kotlin.codegen.kotlinCompilerVersion", "1.8.10")
val KOTLIN_COMPILER_VERSION: String = System.getProperty("smithy.kotlin.codegen.kotlinCompilerVersion", "1.8.22")

enum class SourceSet {
CommonMain,
Expand Down
9 changes: 4 additions & 5 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,16 @@ kotlin.incremental.js=true
kotlin.incremental.multiplatform=true
kotlin.mpp.stability.nowarn=true
kotlin.native.ignoreDisabledTargets=true
kotlin.mpp.enableCompatibilityMetadataVariant=true

# SDK
sdkVersion=0.24.1-SNAPSHOT
sdkVersion=0.25.0-SNAPSHOT

# kotlin
kotlinVersion=1.8.10
kotlinVersion=1.8.22
dokkaVersion=1.7.10

# kotlin libraries
coroutinesVersion=1.6.4
coroutinesVersion=1.7.3
ktorVersion=2.2.2
atomicFuVersion=0.19.0
kotlinxSerializationVersion=1.4.1
Expand Down Expand Up @@ -42,4 +41,4 @@ kamlVersion=0.49.0
slf4jVersion=2.0.6

# crt
crtKotlinVersion=0.6.8
crtKotlinVersion=0.7.0-SNAPSHOT
21 changes: 0 additions & 21 deletions runtime/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -88,24 +88,3 @@ subprojects {
dokkaPlugin(project(":dokka-smithy"))
}
}

task<org.jetbrains.kotlin.gradle.testing.internal.KotlinTestReport>("rootAllTest") {
destinationDir = File(project.buildDir, "reports/tests/rootAllTest")
val rootAllTest = this
subprojects {
afterEvaluate {
if (tasks.findByName("allTests") != null) {
val provider = tasks.named("allTests")
val allTestsTaskProvider = provider as TaskProvider<org.jetbrains.kotlin.gradle.testing.internal.KotlinTestReport>
rootAllTest.addChild(allTestsTaskProvider)
rootAllTest.dependsOn(allTestsTaskProvider)
}
}
}

beforeEvaluate {
project.gradle.taskGraph.whenReady {
rootAllTest.maybeOverrideReporting(this)
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ public class ReadChannelBodyStream(
override fun sendRequestBody(buffer: MutableBuffer): Boolean =
doSendRequestBody(buffer).also { if (it) producerJob.complete() }

@OptIn(ExperimentalCoroutinesApi::class)
@OptIn(DelicateCoroutinesApi::class)
private fun doSendRequestBody(buffer: MutableBuffer): Boolean {
// ensure the request context hasn't been cancelled
callContext.ensureActive()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ import kotlin.coroutines.CoroutineContext
* Implements the CRT stream response interface which proxies the response from the CRT to the SDK
* @param conn The HTTP connection used to make the request. Will be closed when the response handler completes
*/
@OptIn(ExperimentalCoroutinesApi::class)
@OptIn(ExperimentalCoroutinesApi::class, DelicateCoroutinesApi::class)
internal class SdkStreamResponseHandler(
private val conn: HttpClientConnection,
private val callContext: CoroutineContext,
Expand Down
2 changes: 1 addition & 1 deletion runtime/runtime-core/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ buildscript {
}

plugins {
kotlin("plugin.serialization") version "1.8.0"
kotlin("plugin.serialization") version "1.8.21"
}

description = "Core runtime for Smithy clients and services generated by smithy-kotlin"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,14 @@ import kotlin.test.Test
import kotlin.test.assertEquals
import kotlin.time.Duration.Companion.seconds
import kotlin.time.ExperimentalTime
import kotlin.time.TimeSource

private const val TOLERANCE = 0.0000005

@OptIn(ExperimentalTime::class, ExperimentalCoroutinesApi::class)
class AdaptiveRetryIntegrationTest {
@Test
fun testCubicCases() = runTest {
val timeSource = testTimeSource as TimeSource.WithComparableMarks
val timeSource = testTimeSource
val testCases = adaptiveRetryCubicTestCases.deserializeYaml(CubicTestCase.serializer())

testCases.forEach { (name, tc) ->
Expand Down Expand Up @@ -68,7 +67,7 @@ class AdaptiveRetryIntegrationTest {

@Test
fun testE2eCases() = runTest {
val timeSource = testTimeSource as TimeSource.WithComparableMarks
val timeSource = testTimeSource
val testCases = adaptiveRetryE2eTestCases.deserializeYaml(E2eTestCase.serializer())
val config = AdaptiveRateLimiter.Config.Default
val rateMeasurer = AdaptiveRateMeasurer(config, timeSource)
Expand Down

0 comments on commit 507f673

Please sign in to comment.