Skip to content

Commit 44397aa

Browse files
Migrate Parametrized Tests to Burst
Publish workflow-runtime-android module because we forgot to originally.
1 parent 5f14c66 commit 44397aa

File tree

13 files changed

+1646
-2017
lines changed

13 files changed

+1646
-2017
lines changed

workflow-core/api/workflow-core.api

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -178,6 +178,23 @@ public final class com/squareup/workflow1/RuntimeConfigOptions$Companion {
178178
public final fun getRENDER_PER_ACTION ()Ljava/util/Set;
179179
}
180180

181+
public final class com/squareup/workflow1/RuntimeConfigOptions$Companion$RuntimeOptions : java/lang/Enum {
182+
public static final field CONFLATE Lcom/squareup/workflow1/RuntimeConfigOptions$Companion$RuntimeOptions;
183+
public static final field DEFAULT Lcom/squareup/workflow1/RuntimeConfigOptions$Companion$RuntimeOptions;
184+
public static final field RENDER_ONLY Lcom/squareup/workflow1/RuntimeConfigOptions$Companion$RuntimeOptions;
185+
public static final field RENDER_ONLY_CONFLATE Lcom/squareup/workflow1/RuntimeConfigOptions$Companion$RuntimeOptions;
186+
public static final field RENDER_ONLY_CONFLATE_PARTIAL Lcom/squareup/workflow1/RuntimeConfigOptions$Companion$RuntimeOptions;
187+
public static final field RENDER_ONLY_CONFLATE_PARTIAL_STABLE Lcom/squareup/workflow1/RuntimeConfigOptions$Companion$RuntimeOptions;
188+
public static final field RENDER_ONLY_CONFLATE_STABLE Lcom/squareup/workflow1/RuntimeConfigOptions$Companion$RuntimeOptions;
189+
public static final field RENDER_ONLY_PARTIAL Lcom/squareup/workflow1/RuntimeConfigOptions$Companion$RuntimeOptions;
190+
public static final field RENDER_ONLY_PARTIAL_STABLE Lcom/squareup/workflow1/RuntimeConfigOptions$Companion$RuntimeOptions;
191+
public static final field STABLE Lcom/squareup/workflow1/RuntimeConfigOptions$Companion$RuntimeOptions;
192+
public static fun getEntries ()Lkotlin/enums/EnumEntries;
193+
public final fun getRuntimeConfig ()Ljava/util/Set;
194+
public static fun valueOf (Ljava/lang/String;)Lcom/squareup/workflow1/RuntimeConfigOptions$Companion$RuntimeOptions;
195+
public static fun values ()[Lcom/squareup/workflow1/RuntimeConfigOptions$Companion$RuntimeOptions;
196+
}
197+
181198
public abstract class com/squareup/workflow1/SessionWorkflow : com/squareup/workflow1/StatefulWorkflow {
182199
public fun <init> ()V
183200
public final fun initialState (Ljava/lang/Object;Lcom/squareup/workflow1/Snapshot;)Ljava/lang/Object;

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

Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,14 @@ public enum class RuntimeConfigOptions {
6666
*/
6767
@WorkflowExperimentalRuntime
6868
STABLE_EVENT_HANDLERS,
69+
70+
// /**
71+
// * If we have more actions to process that are queued on nodes not affected by the last
72+
// * action application, then we will continue to process those actions before another render
73+
// * pass.
74+
// */
75+
// @WorkflowExperimentalRuntime
76+
// DRAIN_EXCLUSIVE_ACTIONS,
6977
;
7078

7179
public companion object {
@@ -82,5 +90,77 @@ public enum class RuntimeConfigOptions {
8290
*/
8391
@WorkflowExperimentalRuntime
8492
public val ALL: RuntimeConfig = entries.toSet()
93+
94+
/**
95+
* Enum of all reasonable config options. Used especially for parameterized testing.
96+
*/
97+
@WorkflowExperimentalRuntime
98+
enum class RuntimeOptions(
99+
val runtimeConfig: RuntimeConfig
100+
) {
101+
DEFAULT(RENDER_PER_ACTION),
102+
RENDER_ONLY(setOf(RENDER_ONLY_WHEN_STATE_CHANGES)),
103+
CONFLATE(setOf(CONFLATE_STALE_RENDERINGS)),
104+
STABLE(setOf(STABLE_EVENT_HANDLERS)),
105+
106+
// DEA(setOf(DRAIN_EXCLUSIVE_ACTIONS)),
107+
RENDER_ONLY_CONFLATE(setOf(RENDER_ONLY_WHEN_STATE_CHANGES, CONFLATE_STALE_RENDERINGS)),
108+
RENDER_ONLY_PARTIAL(setOf(RENDER_ONLY_WHEN_STATE_CHANGES, PARTIAL_TREE_RENDERING)),
109+
110+
// RENDER_ONLY_DEA(setOf(RENDER_ONLY_WHEN_STATE_CHANGES, DRAIN_EXCLUSIVE_ACTIONS)),
111+
RENDER_ONLY_CONFLATE_STABLE(
112+
setOf(RENDER_ONLY_WHEN_STATE_CHANGES, CONFLATE_STALE_RENDERINGS, STABLE_EVENT_HANDLERS)
113+
),
114+
RENDER_ONLY_CONFLATE_PARTIAL(
115+
setOf(RENDER_ONLY_WHEN_STATE_CHANGES, CONFLATE_STALE_RENDERINGS, PARTIAL_TREE_RENDERING)
116+
),
117+
118+
// RENDER_ONLY_CONFLATE_DEA(
119+
// setOf(RENDER_ONLY_WHEN_STATE_CHANGES, CONFLATE_STALE_RENDERINGS, DRAIN_EXCLUSIVE_ACTIONS)
120+
// ),
121+
RENDER_ONLY_PARTIAL_STABLE(
122+
setOf(RENDER_ONLY_WHEN_STATE_CHANGES, PARTIAL_TREE_RENDERING, STABLE_EVENT_HANDLERS)
123+
),
124+
125+
// RENDER_ONLY_PARTIAL_DEA(
126+
// setOf(RENDER_ONLY_WHEN_STATE_CHANGES, PARTIAL_TREE_RENDERING, DRAIN_EXCLUSIVE_ACTIONS)
127+
// ),
128+
// RENDER_ONLY_DEA_STABLE(
129+
// setOf(RENDER_ONLY_WHEN_STATE_CHANGES, DRAIN_EXCLUSIVE_ACTIONS, STABLE_EVENT_HANDLERS)
130+
// ),
131+
RENDER_ONLY_CONFLATE_PARTIAL_STABLE(
132+
setOf(
133+
RENDER_ONLY_WHEN_STATE_CHANGES,
134+
CONFLATE_STALE_RENDERINGS,
135+
PARTIAL_TREE_RENDERING,
136+
STABLE_EVENT_HANDLERS,
137+
)
138+
),
139+
// RENDER_ONLY_CONFLATE_PARTIAL_DEA(
140+
// setOf(
141+
// RENDER_ONLY_WHEN_STATE_CHANGES,
142+
// CONFLATE_STALE_RENDERINGS,
143+
// PARTIAL_TREE_RENDERING,
144+
// DRAIN_EXCLUSIVE_ACTIONS,
145+
// )
146+
// ),
147+
// RENDER_ONLY_PARTIAL_STABLE_DEA(
148+
// setOf(
149+
// RENDER_ONLY_WHEN_STATE_CHANGES,
150+
// PARTIAL_TREE_RENDERING,
151+
// STABLE_EVENT_HANDLERS,
152+
// DRAIN_EXCLUSIVE_ACTIONS,
153+
// )
154+
// ),
155+
// RENDER_ONLY_CONFLATE_PARTIAL_STABLE_DEA(
156+
// setOf(
157+
// RENDER_ONLY_WHEN_STATE_CHANGES,
158+
// CONFLATE_STALE_RENDERINGS,
159+
// PARTIAL_TREE_RENDERING,
160+
// STABLE_EVENT_HANDLERS,
161+
// DRAIN_EXCLUSIVE_ACTIONS,
162+
// )
163+
// ),
164+
}
85165
}
86166
}

workflow-runtime-android/build.gradle.kts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ plugins {
44
id("android-defaults")
55
id("android-ui-tests")
66
id("app.cash.burst")
7+
id("published")
78
}
89

910
android {
Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
androidx.activity:activity-ktx:1.7.0
2+
androidx.activity:activity:1.7.0
3+
androidx.annotation:annotation-experimental:1.4.1
4+
androidx.annotation:annotation-jvm:1.8.1
5+
androidx.annotation:annotation:1.8.1
6+
androidx.arch.core:core-common:2.2.0
7+
androidx.arch.core:core-runtime:2.2.0
8+
androidx.autofill:autofill:1.0.0
9+
androidx.collection:collection-jvm:1.4.4
10+
androidx.collection:collection-ktx:1.4.4
11+
androidx.collection:collection:1.4.4
12+
androidx.compose.runtime:runtime-android:1.7.2
13+
androidx.compose.runtime:runtime-saveable-android:1.7.2
14+
androidx.compose.runtime:runtime-saveable:1.7.2
15+
androidx.compose.runtime:runtime:1.7.2
16+
androidx.compose.ui:ui-android:1.7.2
17+
androidx.compose.ui:ui-geometry-android:1.7.2
18+
androidx.compose.ui:ui-geometry:1.7.2
19+
androidx.compose.ui:ui-graphics-android:1.7.2
20+
androidx.compose.ui:ui-graphics:1.7.2
21+
androidx.compose.ui:ui-text-android:1.7.2
22+
androidx.compose.ui:ui-text:1.7.2
23+
androidx.compose.ui:ui-unit-android:1.7.2
24+
androidx.compose.ui:ui-unit:1.7.2
25+
androidx.compose.ui:ui-util-android:1.7.2
26+
androidx.compose.ui:ui-util:1.7.2
27+
androidx.compose:compose-bom:2024.09.02
28+
androidx.concurrent:concurrent-futures:1.1.0
29+
androidx.core:core-ktx:1.12.0
30+
androidx.core:core:1.12.0
31+
androidx.customview:customview-poolingcontainer:1.0.0
32+
androidx.emoji2:emoji2:1.2.0
33+
androidx.graphics:graphics-path:1.0.1
34+
androidx.interpolator:interpolator:1.0.0
35+
androidx.lifecycle:lifecycle-common-jvm:2.8.7
36+
androidx.lifecycle:lifecycle-common:2.8.7
37+
androidx.lifecycle:lifecycle-livedata-core:2.8.7
38+
androidx.lifecycle:lifecycle-process:2.8.7
39+
androidx.lifecycle:lifecycle-runtime-android:2.8.7
40+
androidx.lifecycle:lifecycle-runtime-compose-android:2.8.7
41+
androidx.lifecycle:lifecycle-runtime-compose:2.8.7
42+
androidx.lifecycle:lifecycle-runtime-ktx-android:2.8.7
43+
androidx.lifecycle:lifecycle-runtime-ktx:2.8.7
44+
androidx.lifecycle:lifecycle-runtime:2.8.7
45+
androidx.lifecycle:lifecycle-viewmodel-android:2.8.7
46+
androidx.lifecycle:lifecycle-viewmodel-ktx:2.8.7
47+
androidx.lifecycle:lifecycle-viewmodel-savedstate:2.8.7
48+
androidx.lifecycle:lifecycle-viewmodel:2.8.7
49+
androidx.profileinstaller:profileinstaller:1.3.1
50+
androidx.savedstate:savedstate-ktx:1.2.1
51+
androidx.savedstate:savedstate:1.2.1
52+
androidx.startup:startup-runtime:1.1.1
53+
androidx.tracing:tracing:1.0.0
54+
androidx.versionedparcelable:versionedparcelable:1.1.1
55+
com.google.guava:listenablefuture:1.0
56+
com.squareup.okio:okio-jvm:3.3.0
57+
com.squareup.okio:okio:3.3.0
58+
org.jetbrains.kotlin:kotlin-bom:2.0.21
59+
org.jetbrains.kotlin:kotlin-stdlib-common:2.0.21
60+
org.jetbrains.kotlin:kotlin-stdlib-jdk7:2.0.21
61+
org.jetbrains.kotlin:kotlin-stdlib-jdk8:2.0.21
62+
org.jetbrains.kotlin:kotlin-stdlib:2.0.21
63+
org.jetbrains.kotlinx:kotlinx-coroutines-android:1.7.3
64+
org.jetbrains.kotlinx:kotlinx-coroutines-bom:1.7.3
65+
org.jetbrains.kotlinx:kotlinx-coroutines-core-jvm:1.7.3
66+
org.jetbrains.kotlinx:kotlinx-coroutines-core:1.7.3
67+
org.jetbrains:annotations:23.0.0

workflow-runtime/build.gradle.kts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import com.squareup.workflow1.buildsrc.iosWithSimulatorArm64
33
plugins {
44
id("kotlin-multiplatform")
55
id("published")
6+
id("app.cash.burst")
67
}
78

89
kotlin {

0 commit comments

Comments
 (0)