Skip to content

Commit b167c33

Browse files
committed
Update shared KLS module
Migrate async.run to .execute
1 parent 43358b5 commit b167c33

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

adapter/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ dependencies {
2626
implementation 'org.eclipse.lsp4j:org.eclipse.lsp4j.debug:0.6.0'
2727
implementation 'org.jetbrains.kotlin:kotlin-stdlib'
2828
implementation 'org.jetbrains.kotlin:kotlin-reflect'
29-
implementation 'com.github.fwcd.kotlin-language-server:shared:2db25b8de902eecfbc072f7a8529877cd05aa780'
29+
implementation 'com.github.fwcd.kotlin-language-server:shared:542d635b9fc9e41eb732ba40ef10742b33a92acc'
3030
// The Java Debug Interface classes (com.sun.jdi.*)
3131
implementation files("${System.properties['java.home']}/../lib/tools.jar")
3232
testImplementation 'junit:junit:4.12'

adapter/src/main/kotlin/org/javacs/ktda/adapter/KotlinDebugAdapter.kt

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ class KotlinDebugAdapter(
8080
return response
8181
}
8282

83-
override fun launch(args: Map<String, Any>) = launcherAsync.run {
83+
override fun launch(args: Map<String, Any>) = launcherAsync.execute {
8484
performInitialization()
8585

8686
val projectRoot = (args["projectRoot"] as? String)?.let { Paths.get(it) }
@@ -169,7 +169,7 @@ class KotlinDebugAdapter(
169169
LOG.info("Sent exit event")
170170
}
171171

172-
override fun attach(args: Map<String, Any>) = async.run {
172+
override fun attach(args: Map<String, Any>) = async.execute {
173173
performInitialization()
174174

175175
val projectRoot = (args["projectRoot"] as? String)?.let { Paths.get(it) }
@@ -220,7 +220,7 @@ class KotlinDebugAdapter(
220220

221221
override fun restart(args: RestartArguments): CompletableFuture<Void> = notImplementedDAPMethod()
222222

223-
override fun disconnect(args: DisconnectArguments) = async.run {
223+
override fun disconnect(args: DisconnectArguments) = async.execute {
224224
debuggee?.exit()
225225
}
226226

@@ -245,7 +245,7 @@ class KotlinDebugAdapter(
245245

246246
override fun setFunctionBreakpoints(args: SetFunctionBreakpointsArguments): CompletableFuture<SetFunctionBreakpointsResponse> = notImplementedDAPMethod()
247247

248-
override fun setExceptionBreakpoints(args: SetExceptionBreakpointsArguments) = async.run {
248+
override fun setExceptionBreakpoints(args: SetExceptionBreakpointsArguments) = async.execute {
249249
args.filters
250250
.map(converter::toInternalExceptionBreakpoint)
251251
.toSet()
@@ -263,15 +263,15 @@ class KotlinDebugAdapter(
263263
}
264264
}
265265

266-
override fun next(args: NextArguments) = async.run {
266+
override fun next(args: NextArguments) = async.execute {
267267
debuggee!!.threadByID(args.threadId)?.stepOver()
268268
}
269269

270-
override fun stepIn(args: StepInArguments) = async.run {
270+
override fun stepIn(args: StepInArguments) = async.execute {
271271
debuggee!!.threadByID(args.threadId)?.stepInto()
272272
}
273273

274-
override fun stepOut(args: StepOutArguments) = async.run {
274+
override fun stepOut(args: StepOutArguments) = async.execute {
275275
debuggee!!.threadByID(args.threadId)?.stepOut()
276276
}
277277

@@ -283,7 +283,7 @@ class KotlinDebugAdapter(
283283

284284
override fun goto_(args: GotoArguments): CompletableFuture<Void> = notImplementedDAPMethod()
285285

286-
override fun pause(args: PauseArguments) = async.run {
286+
override fun pause(args: PauseArguments) = async.execute {
287287
val threadId = args.threadId
288288
val success = debuggee!!.threadByID(threadId)?.pause()
289289
if (success ?: false) {

0 commit comments

Comments
 (0)