Skip to content

Commit 983107e

Browse files
committed
fix(251): fix 251 gateway compilation
API signature changed in 251 beta
1 parent 4acde6e commit 983107e

File tree

3 files changed

+30
-12
lines changed
  • plugins/toolkit/jetbrains-gateway

3 files changed

+30
-12
lines changed
Lines changed: 10 additions & 0 deletions
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)
Lines changed: 10 additions & 0 deletions
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

Lines changed: 10 additions & 12 deletions
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,

0 commit comments

Comments
 (0)