Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 10 additions & 7 deletions workflow-runtime/api/workflow-runtime.api
Original file line number Diff line number Diff line change
Expand Up @@ -89,24 +89,27 @@ public final class com/squareup/workflow1/WorkflowInterceptor$RenderContextInter

public final class com/squareup/workflow1/WorkflowInterceptor$RenderPassSkipped : com/squareup/workflow1/WorkflowInterceptor$RuntimeUpdate {
public static final field INSTANCE Lcom/squareup/workflow1/WorkflowInterceptor$RenderPassSkipped;
public fun equals (Ljava/lang/Object;)Z
public fun hashCode ()I
public fun toString ()Ljava/lang/String;
}

public final class com/squareup/workflow1/WorkflowInterceptor$RenderingConflated : com/squareup/workflow1/WorkflowInterceptor$RuntimeUpdate {
public static final field INSTANCE Lcom/squareup/workflow1/WorkflowInterceptor$RenderingConflated;
public fun equals (Ljava/lang/Object;)Z
public fun hashCode ()I
public fun toString ()Ljava/lang/String;
}

public final class com/squareup/workflow1/WorkflowInterceptor$RenderingProduced : com/squareup/workflow1/WorkflowInterceptor$RuntimeUpdate {
public static final synthetic fun box-impl (Lcom/squareup/workflow1/RenderingAndSnapshot;)Lcom/squareup/workflow1/WorkflowInterceptor$RenderingProduced;
public static fun constructor-impl (Lcom/squareup/workflow1/RenderingAndSnapshot;)Lcom/squareup/workflow1/RenderingAndSnapshot;
public fun <init> (Lcom/squareup/workflow1/RenderingAndSnapshot;)V
public final fun component1 ()Lcom/squareup/workflow1/RenderingAndSnapshot;
public final fun copy (Lcom/squareup/workflow1/RenderingAndSnapshot;)Lcom/squareup/workflow1/WorkflowInterceptor$RenderingProduced;
public static synthetic fun copy$default (Lcom/squareup/workflow1/WorkflowInterceptor$RenderingProduced;Lcom/squareup/workflow1/RenderingAndSnapshot;ILjava/lang/Object;)Lcom/squareup/workflow1/WorkflowInterceptor$RenderingProduced;
public fun equals (Ljava/lang/Object;)Z
public static fun equals-impl (Lcom/squareup/workflow1/RenderingAndSnapshot;Ljava/lang/Object;)Z
public static final fun equals-impl0 (Lcom/squareup/workflow1/RenderingAndSnapshot;Lcom/squareup/workflow1/RenderingAndSnapshot;)Z
public final fun getRenderingAndSnapshot ()Lcom/squareup/workflow1/RenderingAndSnapshot;
public fun hashCode ()I
public static fun hashCode-impl (Lcom/squareup/workflow1/RenderingAndSnapshot;)I
public fun toString ()Ljava/lang/String;
public static fun toString-impl (Lcom/squareup/workflow1/RenderingAndSnapshot;)Ljava/lang/String;
public final synthetic fun unbox-impl ()Lcom/squareup/workflow1/RenderingAndSnapshot;
}

public abstract interface class com/squareup/workflow1/WorkflowInterceptor$RuntimeUpdate {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import kotlinx.coroutines.CoroutineScope
import kotlinx.coroutines.Job
import kotlin.coroutines.CoroutineContext
import kotlin.coroutines.coroutineContext
import kotlin.jvm.JvmInline
import kotlin.reflect.KType

/**
Expand Down Expand Up @@ -172,22 +171,21 @@ public interface WorkflowInterceptor {
* A render pass has been skipped by an optimization, multiple actions are applied before
* the runtime produces a rendering.
*/
public object RenderPassSkipped : RuntimeUpdate
public data object RenderPassSkipped : RuntimeUpdate
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We avoid using data in public API, remember? Seems like this would be fine as just object / class.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The arguments for not using data classes in public API don't apply to objects, since they contain no data by definition.

And the data class was previously a value class, which is even more impossible to change than a data class, so this is no more constrained.


/**
* The runtime skipped producing a rendering, conflating it to the next rendering after the next
* render pass.
*/
public object RenderingConflated : RuntimeUpdate
public data object RenderingConflated : RuntimeUpdate

/**
* This runtime has produced a new rendering after at least one render pass.
*
* @param renderingAndSnapshot This is the rendering and snapshot that was passed out of the
* Workflow runtime.
*/
@JvmInline
public value class RenderingProduced<R>(
public data class RenderingProduced<R>(
public val renderingAndSnapshot: RenderingAndSnapshot<R>
) : RuntimeUpdate

Expand Down
Loading