Skip to content

Commit 4eaa965

Browse files
authored
fix(251): fix 251 gateway compilation (#5514)
API signature changed in 251 beta
1 parent e1cf155 commit 4eaa965

File tree

5 files changed

+31
-17
lines changed

5 files changed

+31
-17
lines changed

buildSrc/src/main/kotlin/software/aws/toolkits/gradle/intellij/IdeVersions.kt

-4
Original file line numberDiff line numberDiff line change
@@ -100,10 +100,6 @@ object IdeVersions {
100100
),
101101
Profile(
102102
name = "2024.2",
103-
gateway = ProductProfile(
104-
sdkVersion = "242.23726-EAP-CANDIDATE-SNAPSHOT",
105-
bundledPlugins = listOf("org.jetbrains.plugins.terminal")
106-
),
107103
community = ProductProfile(
108104
sdkVersion = "2024.2",
109105
bundledPlugins = commonPlugins + listOf(
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
// Copyright 2025 Amazon.com, Inc. or its affiliates. All Rights Reserved.
2+
// SPDX-License-Identifier: Apache-2.0
3+
package compat.com.jetbrains.gateway.thinClientLink
4+
5+
import com.jetbrains.gateway.thinClientLink.LinkedClientManager
6+
import com.jetbrains.rd.util.lifetime.Lifetime
7+
import java.net.URI
8+
9+
fun startNewClient(lifetime: Lifetime, initialLink: URI, remoteIdentity: String?, onStarted: () -> Unit) =
10+
LinkedClientManager.getInstance().startNewClient(lifetime, initialLink, remoteIdentity, onStarted)
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
// Copyright 2025 Amazon.com, Inc. or its affiliates. All Rights Reserved.
2+
// SPDX-License-Identifier: Apache-2.0
3+
package compat.com.jetbrains.gateway.thinClientLink
4+
5+
import com.jetbrains.gateway.thinClientLink.LinkedClientManager
6+
import com.jetbrains.rd.util.lifetime.Lifetime
7+
import java.net.URI
8+
9+
fun startNewClient(lifetime: Lifetime, initialLink: URI, remoteIdentity: String?, onStarted: () -> Unit) =
10+
LinkedClientManager.getInstance().startNewClient(lifetime, initialLink, remoteIdentity, null, onStarted)

plugins/toolkit/jetbrains-gateway/src/software/aws/toolkits/jetbrains/gateway/connection/workflow/StartBackend.kt

+10-12
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,9 @@
44
package software.aws.toolkits.jetbrains.gateway.connection.workflow
55

66
import com.jetbrains.gateway.api.GatewayConnectionHandle
7-
import com.jetbrains.gateway.thinClientLink.LinkedClientManager
87
import com.jetbrains.rd.util.lifetime.LifetimeDefinition
9-
import com.jetbrains.rd.util.lifetime.onTermination
108
import com.jetbrains.rd.util.reactive.adviseEternal
9+
import compat.com.jetbrains.gateway.thinClientLink.startNewClient
1110
import kotlinx.coroutines.delay
1211
import kotlinx.coroutines.runBlocking
1312
import software.aws.toolkits.core.utils.getLogger
@@ -50,16 +49,15 @@ class StartBackend(
5049
val clientHandle = ThinClientTrackerService.getInstance().associate(envId) {
5150
val start = System.currentTimeMillis()
5251
val thinClientHandle = try {
53-
LinkedClientManager.getInstance()
54-
.startNewClient(lifetime, localLink, URLEncoder.encode(message("caws.workspace.backend.title"), Charsets.UTF_8)) {
55-
CodecatalystTelemetry.devEnvironmentWorkflowStatistic(
56-
project = null,
57-
userId = lazilyGetUserId(),
58-
result = TelemetryResult.Succeeded,
59-
duration = System.currentTimeMillis() - start.toDouble(),
60-
codecatalystDevEnvironmentWorkflowStep = "startThinClient",
61-
)
62-
}
52+
startNewClient(lifetime, localLink, URLEncoder.encode(message("caws.workspace.backend.title"), Charsets.UTF_8)) {
53+
CodecatalystTelemetry.devEnvironmentWorkflowStatistic(
54+
project = null,
55+
userId = lazilyGetUserId(),
56+
result = TelemetryResult.Succeeded,
57+
duration = System.currentTimeMillis() - start.toDouble(),
58+
codecatalystDevEnvironmentWorkflowStep = "startThinClient",
59+
)
60+
}
6361
} catch (e: Throwable) {
6462
CodecatalystTelemetry.devEnvironmentWorkflowStatistic(
6563
project = null,

settings.gradle.kts

+1-1
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ file("plugins").listFiles()?.forEach root@ {
163163
if (it.name == "jetbrains-gateway") {
164164
when (providers.gradleProperty("ideProfileName").get()) {
165165
// buildSrc is evaluated after settings so we can't key off of IdeVersions.kt
166-
"2023.3", "2024.1" -> {
166+
"2023.3", "2024.1", "2024.2" -> {
167167
return@forEach
168168
}
169169
}

0 commit comments

Comments
 (0)