Skip to content

Commit f6ee63f

Browse files
Pipe Worker Output Action Names
1 parent 0a219dc commit f6ee63f

File tree

2 files changed

+7
-6
lines changed

2 files changed

+7
-6
lines changed

workflow-core/src/commonMain/kotlin/com/squareup/workflow1/Sink.kt

+3-1
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,9 @@ internal suspend fun <
8585
) {
8686
suspendCancellableCoroutine<Unit> { continuation ->
8787
val resumingAction = object : WorkflowAction<PropsT, StateT, OutputT>() {
88-
override fun toString(): String = "sendAndAwaitApplication($action)"
88+
// Pipe through debugging name to the original action.
89+
override val debuggingName: String
90+
get() = action.debuggingName
8991

9092
override fun Updater.apply() {
9193
// Don't execute anything if the caller was cancelled while we were in the queue.

workflow-core/src/commonMain/kotlin/com/squareup/workflow1/WorkerWorkflow.kt

+4-5
Original file line numberDiff line numberDiff line change
@@ -89,13 +89,12 @@ internal suspend fun <OutputT> runWorker(
8989
}
9090

9191
private class EmitWorkerOutputAction<P, S, O>(
92-
private val worker: Worker<*>,
93-
private val renderKey: String,
92+
worker: Worker<*>,
93+
renderKey: String,
9494
private val output: O,
9595
) : WorkflowAction<P, S, O>() {
96-
override val debuggingName: String
97-
get() = CommonKClassTypeNamer.uniqueName(EmitWorkerOutputAction::class) +
98-
"(worker=$worker, key=$renderKey)"
96+
override val debuggingName: String =
97+
"EmitWorkerOutputAction(worker=$worker, key=$renderKey)"
9998

10099
override fun Updater.apply() {
101100
setOutput(output)

0 commit comments

Comments
 (0)