[sprout] Enable sprout on all new fixtures
--- Rename `SproutOnlyFilterTodoRemove.ts` to `SproutTodoFilter.ts`. I've tried to group the skipped fixtures by difficulty and add comments about what need to be done, also happy to change the structure of this. From this point, sprout will run on all new fixtures by default. If the fixture forgets to export a `FIXTURE_ENTRYPOINT`, sprout will fail with this error. <img width="853" alt="Screenshot 2023-08-15 at 5 59 32 PM" src="https://github.com/facebook/react-forget/assets/34200447/0f80d650-1dc1-4df4-9710-e49acbb424b0"> See #1961 for an example of how to annotate existing skipped fixtures or new ones. The `README.md` is also updated with a guide.
Mofei Zhang committed
Aug 16, 2023 at 15:38 UTC
9d1a842a833bc16766a2ae34266934cf287949fc
4 files changed
+532
-77
compiler/forget/packages/sprout/README.md
+34
-19
@@ -1,33 +1,23 @@
1
-## Sprout
1
+## Sprout 🌱
2
React Forget test framework that executes compiler fixtures.
3
4
-Currently, Sprout runs each fixture with a known set of inputs and annotations. We hope to add fuzzing capabilities to Sprout, synthesizing sets of program inputs based on type and/or effect annotations.
4
+Currently, Sprout runs each fixture with a known set of inputs and annotations. Sprout compares execution outputs (i.e. return values and console logs) of original source code and the corresponding Forget-transformed version.
5
+We hope to add fuzzing capabilities to Sprout, synthesizing sets of program inputs based on type and/or effect annotations.
6
6
-Sprout is currently WIP and only executes files listed in `src/SproutOnlyFilterTodoRemove.ts`.
7
+Sprout is now enabled for all fixtures! If Sprout cannot execute your fixture due to some technical limitations, add your fixture to `packages/sprout/src/SproutTodoFilter.ts` with a comment explaining why.
8
8
-### Milestones:
9
-- [x] Render fixtures with React runtime / `testing-library/react`.
10
-- [x] Make Sprout CLI -runnable and report results in process exit code.
11
- After this point:
12
- - Sprout can be enabled by default and added to the Github Actions pipeline.
13
- - `SproutOnlyFilterTodoRemove` can be renamed to `SproutSkipFilter`.
14
- - All new tests should provide a `FIXTURE_ENTRYPOINT`.
15
-- [ ] Annotate `FIXTURE_ENTRYPOINT` (fn entrypoint and params) for rest of fixtures.
16
-- [ ] Edit rest of fixtures to use shared functions or define their own helpers.
17
-- [ ] *(optional)* Store Sprout output as snapshot files. i.e. each fixture could have a `fixture.js`, `fixture.snap.md`, and `fixture.sprout.md`.
9
19
-### Constraints
20
-Each fixture test executed by Sprout needs to export a `FIXTURE_ENTRYPOINT`, a single function and parameter set with the following type signature.
10
+### How to use Sprout
11
+Each fixture test executed by Sprout needs to export const `FIXTURE_ENTRYPOINT` object with the following type signature.
12
13
```js
23
-type FIXTURE_ENTRYPOINT<T> = {
14
+type FixtureEntrypoint<T> = {
15
// function to be invoked
16
fn: ((...params: Array<T>) => any),
17
// params to pass to fn
18
params: Array<T>,
28
- // true if fn should be rendered as a React Component
29
- // i.e. returns jsx or primitives
30
- isComponent?: boolean,
19
+ // true if fn should be rendered as a React Component (i.e. returns jsx)
20
+ isComponent: boolean,
21
}
22
```
23
@@ -44,3 +34,28 @@ export const FIXTURE_ENTRYPOINT = {
34
};
35
```
36
37
+Additional notes:
38
+- If your fixture needs a helper function, the current solution is to define it in the same fixture file.
39
+
40
+- If your fixture needs to import from an external module, we currently only support importing from `react` (see Milestones todo list).
41
+
42
+- Any fixture can use React hooks, but they need to be first imported. We may later enforce that only `isComponent: true` fixtures can use React hooks.
43
+ ```ts
44
+ import {useState} from 'react';
45
+ ```
46
+
47
+- If your fixture wants to export multiple functions to Sprout to run, please split up the fixture into multiple files (e.g. `test-case-1`, `test-case-2`, etc).
48
+
49
+- Sprout currently runs each fixture in an iife to prevent variable collisions, but it does not run fixtures in isolation. Please do not write to globals or mutate React library module state in fixtures.
50
+
51
+### Milestones:
52
+- [x] Render fixtures with React runtime / `testing-library/react`.
53
+- [x] Make Sprout CLI -runnable and report results in process exit code.
54
+ After this point:
55
+ - Sprout can be enabled by default and added to the Github Actions pipeline.
56
+ - `SproutOnlyFilterTodoRemove` can be renamed to `SproutSkipFilter`.
57
+ - All new tests should provide a `FIXTURE_ENTRYPOINT`.
58
+- [ ] Annotate `FIXTURE_ENTRYPOINT` (fn entrypoint and params) for rest of fixtures (see `SproutTodoFilter.ts`).
59
+- [ ] Edit rest of fixtures to use shared functions or define their own helpers.
60
+- [ ] *(optional)* Store Sprout output as snapshot files. i.e. each fixture could have a `fixture.js`, `fixture.snap.md`, and `fixture.sprout.md`.
61
+- [ ] Add support for `fbt`.
compiler/forget/packages/sprout/src/SproutOnlyFilterTodoRemove.ts
deleted
-55
@@ -1,55 +0,0 @@
1
-const onlyFilter = new Set([
2
- "alias-nested-member-path",
3
- // // TODO: fix invalid .set call
4
- // // "assignment-variations-complex-lvalue-array",
5
- "assignment-variations-complex-lvalue",
6
- "assignment-variations",
7
- "chained-assignment-expressions",
8
- "computed-call-evaluation-order",
9
- "const-propagation-into-function-expression-primitive",
10
- "constant-propagation-for",
11
- "constant-propagation-while",
12
- "constant-propagation",
13
- "do-while-continue",
14
- "do-while-simple",
15
- "expression-with-assignment",
16
- "for-of-break",
17
- "for-of-conditional-break",
18
- "for-of-continue",
19
- "for-of-destructure",
20
- "for-of-simple",
21
- "function-declaration-reassign",
22
- "function-declaration-redeclare",
23
- "lambda-reassign-primitive",
24
- "lambda-reassign-shadowed-primitive",
25
- "property-call-evaluation-order",
26
- "reactive-scope-grouping",
27
- "sequentially-constant-progagatable-if-test-conditions",
28
- "simple-function-1",
29
- // TODO: uses jsx (requires React)
30
- // "sketchy-code-rules-of-hooks",
31
- "ssa-complex-multiple-if",
32
- "ssa-complex-single-if",
33
- // TODO: fix infinite loop
34
- // "ssa-for-trivial-update",
35
- "ssa-for",
36
- "ssa-if-else",
37
- "ssa-objectexpression-phi",
38
- "ssa-property-call",
39
- "ssa-property",
40
- "ssa-return",
41
- "ssa-simple-phi",
42
- "ssa-simple",
43
- "ssa-single-if",
44
- "ssa-switch",
45
- "ssa-throw",
46
- // TODO: fix infinite loop
47
- // "ssa-while-no-reassign",
48
- "ssa-while",
49
- "type-field-load",
50
- "type-test-field-store",
51
- "type-test-primitive",
52
- "update-expression-constant-propagation",
53
-]);
54
-
55
-export default onlyFilter;
compiler/forget/packages/sprout/src/SproutTodoFilter.ts
new
+495
@@ -0,0 +1,495 @@
1
+const skipFilter = new Set([
2
+ /**
3
+ * Category A:
4
+ * Tests with 0 parameters and 0 refs to external values
5
+ */
6
+ // TODO: fix invalid .set call
7
+ "assignment-variations-complex-lvalue-array",
8
+ // TODO: uses jsx (requires React)
9
+ "sketchy-code-rules-of-hooks",
10
+ // TODO: fix infinite loop
11
+ "ssa-for-trivial-update",
12
+ // TODO: fix infinite loop
13
+ "ssa-while-no-reassign",
14
+
15
+ /**
16
+ * Category B:
17
+ * Tests with at least one param and 0 refs to external values
18
+ */
19
+ "array-access-assignment",
20
+ "array-expression-spread",
21
+ "array-map-frozen-array",
22
+ "array-map-mutable-array-mutating-lambda",
23
+ "array-pattern-params",
24
+ "array-properties",
25
+ "array-property-call",
26
+ "assignment-expression-computed",
27
+ "assignment-expression-nested-path",
28
+ "bug_object-pattern",
29
+ "bug.useMemo-deps-array-not-cleared",
30
+ "capture_mutate-across-fns",
31
+ "capture-indirect-mutate-alias",
32
+ "capturing-arrow-function-1",
33
+ "capturing-func-mutate-2",
34
+ "capturing-func-mutate-3",
35
+ "capturing-func-mutate-nested",
36
+ "capturing-func-mutate",
37
+ "capturing-function-1",
38
+ "capturing-function-alias-computed-load-2",
39
+ "capturing-function-alias-computed-load-3",
40
+ "capturing-function-alias-computed-load-4",
41
+ "capturing-function-alias-computed-load",
42
+ "capturing-function-decl",
43
+ "capturing-function-skip-computed-path",
44
+ "capturing-function-within-block",
45
+ "capturing-member-expr",
46
+ "capturing-nested-member-call",
47
+ "capturing-nested-member-expr-in-nested-func",
48
+ "capturing-nested-member-expr",
49
+ "capturing-variable-in-nested-block",
50
+ "capturing-variable-in-nested-function",
51
+ "complex-while",
52
+ "component",
53
+ "cond-deps-conditional-member-expr",
54
+ "conditional-break-labeled",
55
+ "conditional-set-state-in-render",
56
+ "constant-computed",
57
+ "constant-propagation-phi",
58
+ "dce-loop",
59
+ "debugger-memoized",
60
+ "debugger",
61
+ "declare-reassign-variable-in-closure",
62
+ "delete-computed-property",
63
+ "delete-property",
64
+ "dependencies-outputs",
65
+ "dependencies",
66
+ "destructure-direct-reassignment",
67
+ "destructuring-array-default",
68
+ "destructuring-array-param-default",
69
+ "destructuring-assignment-array-default",
70
+ "destructuring-assignment",
71
+ "destructuring-object-default",
72
+ "destructuring-object-param-default",
73
+ "destructuring",
74
+ "disable-jsx-memoization",
75
+ "do-while-break",
76
+ "do-while-compound-test",
77
+ "dominator",
78
+ "early-return",
79
+ "escape-analysis-destructured-rest-element",
80
+ "escape-analysis-jsx-child",
81
+ "escape-analysis-logical",
82
+ "escape-analysis-non-escaping-interleaved-allocating-dependency",
83
+ "escape-analysis-non-escaping-interleaved-allocating-nested-dependency",
84
+ "escape-analysis-non-escaping-interleaved-primitive-dependency",
85
+ "escape-analysis-not-conditional-test",
86
+ "escape-analysis-not-if-test",
87
+ "escape-analysis-not-switch-case",
88
+ "escape-analysis-not-switch-test",
89
+ "expression-with-assignment-dynamic",
90
+ "extend-scopes-if",
91
+ "fbt-params",
92
+ "for-empty-update-with-continue",
93
+ "for-empty-update",
94
+ "for-logical",
95
+ "for-return",
96
+ "function-declaration-simple",
97
+ "function-param-assignment-pattern",
98
+ "globals-Boolean",
99
+ "globals-Number",
100
+ "globals-String",
101
+ "holey-array-pattern-dce-2",
102
+ "holey-array-pattern-dce",
103
+ "holey-array",
104
+ "independently-memoize-object-property",
105
+ "infer-phi-primitive",
106
+ "inverted-if-else",
107
+ "inverted-if",
108
+ "jsx-empty-expression",
109
+ "jsx-fragment",
110
+ "jsx-namespaced-name",
111
+ "lambda-mutated-non-reactive-to-reactive",
112
+ "lambda-mutated-ref-non-reactive",
113
+ "logical-expression-object",
114
+ "logical-expression",
115
+ "nested-function-shadowed-identifiers",
116
+ "nonoptional-load-from-optional-memberexpr",
117
+ "object-computed-access-assignment",
118
+ "object-expression-string-literal-key",
119
+ "object-literal-spread-element",
120
+ "object-pattern-params",
121
+ "optional-member-expression-chain",
122
+ "overlapping-scopes-interleaved-by-terminal",
123
+ "overlapping-scopes-interleaved",
124
+ "overlapping-scopes-shadowed",
125
+ "overlapping-scopes-shadowing-within-block",
126
+ "overlapping-scopes-while",
127
+ "overlapping-scopes-within-block",
128
+ "prop-capturing-function-1",
129
+ "reactive-scopes-if",
130
+ "reactive-scopes",
131
+ "reactivity-analysis-interleaved-reactivity",
132
+ "reassign-object-in-context",
133
+ "reassign-primitive-in-context",
134
+ "reassignment-separate-scopes",
135
+ "reduce-reactive-cond-memberexpr-join",
136
+ "reduce-reactive-uncond-deps-nonoverlap-descendant",
137
+ "reduce-reactive-uncond-deps-nonoverlap-direct",
138
+ "reduce-reactive-uncond-deps-overlap-descendant",
139
+ "reduce-reactive-uncond-deps-overlap-direct",
140
+ "reduce-reactive-uncond-deps-subpath-order1",
141
+ "reduce-reactive-uncond-deps-subpath-order2",
142
+ "reduce-reactive-uncond-deps-subpath-order3",
143
+ "return-conditional",
144
+ "return-undefined",
145
+ "reverse-postorder",
146
+ "same-variable-as-dep-and-redeclare-maybe-frozen",
147
+ "same-variable-as-dep-and-redeclare",
148
+ "simple-scope",
149
+ "ssa-arrayexpression",
150
+ "ssa-cascading-eliminated-phis",
151
+ "ssa-for-of",
152
+ "ssa-multiple-phis",
153
+ "ssa-nested-loops-no-reassign",
154
+ "ssa-nested-partial-phi",
155
+ "ssa-nested-partial-reassignment",
156
+ "ssa-non-empty-initializer",
157
+ "ssa-objectexpression",
158
+ "ssa-property-alias-if",
159
+ "ssa-reassign",
160
+ "ssa-renaming-ternary-destruction",
161
+ "ssa-renaming-ternary",
162
+ "ssa-renaming-unconditional-ternary",
163
+ "ssa-renaming-via-destructuring",
164
+ "ssa-renaming",
165
+ "ssa-sibling-phis",
166
+ "switch-with-fallthrough",
167
+ "ternary-assignment-expression",
168
+ "ternary-expression",
169
+ "trivial",
170
+ "type-args-test-binary-operator",
171
+ "type-cast-expression.flow",
172
+ "unary-expr",
173
+ "unconditional-break-label",
174
+ "unused-array-middle-element",
175
+ "unused-array-rest-element",
176
+ "unused-conditional",
177
+ "unused-logical",
178
+ "unused-object-element-with-rest",
179
+ "unused-object-element",
180
+ "update-expression-in-sequence",
181
+ "update-expression-on-function-parameter",
182
+ "update-expression",
183
+ "useMemo-inlining-block-return",
184
+ "useMemo-inverted-if",
185
+ "useMemo-labeled-statement-unconditional-return",
186
+ "useMemo-logical",
187
+ "useMemo-multiple-if-else",
188
+ "useMemo-nested-ifs",
189
+ "useMemo-switch-no-fallthrough",
190
+ "useMemo-switch-return",
191
+ "while-break",
192
+ "while-conditional-continue",
193
+ "while-logical",
194
+ "while-property",
195
+ // Category B with multiple entrypoints,
196
+ "conditional-break",
197
+
198
+ /**
199
+ * Category C:
200
+ * Tests with at 0 params and at least one ref to external values
201
+ */
202
+ "alias-capture-in-method-receiver-and-mutate",
203
+ "alias-capture-in-method-receiver",
204
+ "alias-nested-member-path-mutate",
205
+ "chained-assignment-context-variable",
206
+ "concise-arrow-expr",
207
+ "const-propagation-into-function-expression-global",
208
+ "declare-reassign-variable-in-function-declaration",
209
+ "lambda-mutate-shadowed-object",
210
+ "lambda-with-fbt",
211
+ "recursive-function-expr",
212
+ "ref-current-aliased-no-added-to-dep",
213
+ "ref-current-field-not-added-to-dep",
214
+ "ref-current-not-added-to-dep",
215
+ "ref-current-optional-field-no-added-to-dep",
216
+ "ref-current-write-not-added-to-dep",
217
+ "rewrite-phis-in-lambda-capture-context",
218
+ "rules-of-hooks-0e2214abc294",
219
+ "rules-of-hooks-1ff6c3fbbc94",
220
+ "rules-of-hooks-23dc7fffde57",
221
+ "rules-of-hooks-2bec02ac982b",
222
+ "rules-of-hooks-2e405c78cb80",
223
+ "rules-of-hooks-33a6e23edac1",
224
+ "rules-of-hooks-347b0dae66f1",
225
+ "rules-of-hooks-485bf041f55f",
226
+ "rules-of-hooks-7e52f5eec669",
227
+ "rules-of-hooks-844a496db20b",
228
+ "rules-of-hooks-8f1c2c3f71c9",
229
+ "rules-of-hooks-9d7879272ff6",
230
+ "rules-of-hooks-c1e8c7f4c191",
231
+ "rules-of-hooks-c5d1f3143c4c",
232
+ "rules-of-hooks-cfdfe5572fc7",
233
+ "rules-of-hooks-e5dd6caf4084",
234
+ "sketchy-code-exhaustive-deps",
235
+ "ssa-property-alias-mutate",
236
+ "ssa-property-mutate-2",
237
+ "ssa-property-mutate-alias",
238
+ "ssa-property-mutate",
239
+ "ssa-reassign-in-rval",
240
+ "store-via-call",
241
+ "store-via-new",
242
+ "tagged-template-literal",
243
+ "transitive-alias-fields",
244
+ "type-binary-operator",
245
+ "type-test-field-load-binary-op",
246
+ "type-test-polymorphic",
247
+ "type-test-return-type-inference",
248
+ "use-callback-simple",
249
+ // defines two functions
250
+ "simple-alias",
251
+
252
+ /**
253
+ * Category D:
254
+ * Tests with one or more params, with external references.
255
+ */
256
+ "alias-computed-load",
257
+ "allocating-primitive-as-dep-nested-scope",
258
+ "allocating-primitive-as-dep",
259
+ "allow-passing-refs-as-props",
260
+ "array-at-closure",
261
+ "array-at-effect",
262
+ "array-at-mutate-after-capture",
263
+ "array-join",
264
+ "array-push-effect",
265
+ "arrow-function-expr-gating-test",
266
+ "assignment-in-nested-if",
267
+ "await-side-effecting-promise",
268
+ "await",
269
+ "builtin-jsx-tag-lowered-between-mutations",
270
+ "call-args-assignment",
271
+ "call-args-destructuring-assignment",
272
+ "call-spread",
273
+ "call-with-independently-memoizable-arg",
274
+ "capture-param-mutate",
275
+ "capturing-fun-alias-captured-mutate-2",
276
+ "capturing-fun-alias-captured-mutate-arr-2",
277
+ "capturing-func-alias-captured-mutate-arr",
278
+ "capturing-func-alias-captured-mutate",
279
+ "capturing-func-alias-computed-mutate",
280
+ "capturing-func-alias-mutate",
281
+ "capturing-func-alias-receiver-computed-mutate",
282
+ "capturing-func-alias-receiver-mutate",
283
+ "capturing-func-simple-alias",
284
+ "capturing-function-capture-ref-before-rename",
285
+ "capturing-function-conditional-capture-mutate",
286
+ "capturing-function-member-expr-arguments",
287
+ "capturing-function-member-expr-call",
288
+ "capturing-function-renamed-ref",
289
+ "capturing-function-runs-inference",
290
+ "capturing-function-shadow-captured",
291
+ "capturing-reference-changes-type",
292
+ "codegen-emit-imports-same-source",
293
+ "codegen-emit-make-read-only",
294
+ "computed-call-spread",
295
+ "computed-load-primitive-as-dependency",
296
+ "computed-store-alias",
297
+ "console-readonly",
298
+ "constant-propagation-into-function-expressions",
299
+ "context-variable-reassigned-outside-of-lambda",
300
+ "destructure-capture-global",
301
+ "destructuring-mixed-scope-and-local-variables-with-default",
302
+ "destructuring-mixed-scope-declarations-and-locals",
303
+ "destructuring-property-inference",
304
+ "do-while-conditional-break",
305
+ "do-while-early-unconditional-break",
306
+ "fbt-params-complex-param-value",
307
+ "for-of-mutate",
308
+ "function-expression-captures-value-later-frozen-jsx",
309
+ "function-expression-maybe-mutates-hook-return-value",
310
+ "function-expression-with-store-to-parameter",
311
+ "global-jsx-tag-lowered-between-mutations",
312
+ "holey-array-expr",
313
+ "hook-inside-logical-expression",
314
+ "immutable-hooks",
315
+ "inadvertent-mutability-readonly-class",
316
+ "inadvertent-mutability-readonly-lambda",
317
+ "infer-computed-delete",
318
+ "infer-global-object",
319
+ "infer-property-delete",
320
+ "infer-types-through-type-cast.flow",
321
+ "inner-memo-value-not-promoted-to-outer-scope-dynamic",
322
+ "inner-memo-value-not-promoted-to-outer-scope-static",
323
+ "issue852",
324
+ "issue933-disjoint-set-infinite-loop",
325
+ "jsx-member-expression-tag-grouping",
326
+ "jsx-member-expression",
327
+ "jsx-spread",
328
+ "jsx-tag-evaluation-order-non-global",
329
+ "jsx-tag-evaluation-order",
330
+ "lambda-capture-returned-alias",
331
+ "method-call-computed",
332
+ "method-call-fn-call",
333
+ "method-call",
334
+ "nested-optional-member-expr",
335
+ "nested-scopes-hook-call",
336
+ "new-spread",
337
+ "obj-literal-cached-in-if-else",
338
+ "obj-literal-mutated-after-if-else",
339
+ "obj-mutated-after-if-else-with-alias",
340
+ "obj-mutated-after-if-else",
341
+ "obj-mutated-after-nested-if-else-with-alias",
342
+ "object-properties",
343
+ "optional-call-chained",
344
+ "optional-call-logical",
345
+ "optional-call-simple",
346
+ "optional-call-with-independently-memoizable-arg",
347
+ "optional-call-with-optional-property-load",
348
+ "optional-call",
349
+ "optional-computed-load-static",
350
+ "optional-computed-member-expression",
351
+ "optional-member-expression-call-as-property",
352
+ "optional-member-expression-with-optional-member-expr-as-property",
353
+ "optional-member-expression",
354
+ "optional-method-call",
355
+ "optional-receiver-method-call",
356
+ "optional-receiver-optional-method",
357
+ "primitive-alias-mutate",
358
+ "primitive-as-dep-nested-scope",
359
+ "primitive-as-dep",
360
+ "property-assignment",
361
+ "property-call-spread",
362
+ "reactive-dependencies-non-optional-properties-inside-optional-chain",
363
+ "reactivity-analysis-reactive-via-mutation-of-computed-load",
364
+ "reactivity-analysis-reactive-via-mutation-of-property-load",
365
+ "reassigned-phi-in-returned-function-expression",
366
+ "reassignment-conditional",
367
+ "reassignment",
368
+ "reduce-reactive-cond-deps-cfg-condexpr",
369
+ "reduce-reactive-cond-deps-cfg-ifelse",
370
+ "reduce-reactive-cond-deps-cfg-nested-ifelse-missing",
371
+ "reduce-reactive-cond-deps-cfg-nested-ifelse",
372
+ "reduce-reactive-cond-deps-cfg-switch-missing-case",
373
+ "reduce-reactive-cond-deps-cfg-switch-missing-default",
374
+ "reduce-reactive-cond-deps-cfg-switch",
375
+ "reduce-reactive-cond-deps-no-uncond",
376
+ "reduce-reactive-cond-deps-promote-uncond",
377
+ "reduce-reactive-cond-deps-subpath-order1",
378
+ "reduce-reactive-cond-deps-subpath-order2",
379
+ "reduce-reactive-cond-deps-superpath-order1",
380
+ "reduce-reactive-cond-deps-superpath-order2",
381
+ "reduce-reactive-dependencies-optional-member-expression",
382
+ "reduce-reactive-deps-cond-scope",
383
+ "reduce-reactive-deps-join-uncond-scopes-cond-deps",
384
+ "ref-current-aliased-not-added-to-dep-2",
385
+ "ref-current-not-added-to-dep-2",
386
+ "ref-in-effect",
387
+ "regexp-literal",
388
+ "remove-memoization-kitchen-sink",
389
+ "repro-reassign-to-variable-without-mutable-range",
390
+ "repro-scope-missing-mutable-range",
391
+ "repro",
392
+ "rules-of-hooks-0592bd574811",
393
+ "simple",
394
+ "ssa-leave-case",
395
+ "ssa-property-alias-alias-mutate-if",
396
+ "ssa-property-alias-mutate-if",
397
+ "ssa-property-alias-mutate-inside-if",
398
+ "ssa-renaming-ternary-destruction-with-mutation",
399
+ "ssa-renaming-ternary-with-mutation",
400
+ "ssa-renaming-unconditional-ternary-with-mutation",
401
+ "ssa-renaming-unconditional-with-mutation",
402
+ "ssa-renaming-via-destructuring-with-mutation",
403
+ "ssa-renaming-with-mutation",
404
+ "switch-global-propertyload-case-test",
405
+ "switch-non-final-default",
406
+ "switch",
407
+ "tagged-template-in-hook",
408
+ "temporary-accessed-outside-scope",
409
+ "temporary-at-start-of-value-block",
410
+ "temporary-property-load-accessed-outside-scope",
411
+ "timers",
412
+ "todo-function-expression-captures-value-later-frozen",
413
+ "uninitialized-declaration-in-reactive-scope",
414
+ "unknown-hooks-do-not-assert",
415
+ "unused-logical-assigned-to-variable",
416
+ "unused-optional-method-assigned-to-variable",
417
+ "unused-ternary-assigned-to-variable",
418
+ "useEffect-arg-memoized",
419
+ "useEffect-nested-lambdas",
420
+ "useMemo-if-else-multiple-return",
421
+ "useMemo-independently-memoizeable",
422
+ "useMemo-named-function",
423
+ "useMemo-return-empty",
424
+ "useMemo-simple",
425
+ // defines multiple functions
426
+ "alias-while",
427
+ "babel-existing-react-import",
428
+ "babel-existing-react-kitchensink-import",
429
+ "call",
430
+ "codegen-instrument-forget-gating-test",
431
+ "codegen-instrument-forget-test",
432
+ "conditional-on-mutable",
433
+ "constructor",
434
+ "frozen-after-alias",
435
+ "gating-test-export-default-function",
436
+ "gating-test-export-function-and-default",
437
+ "gating-test-export-function",
438
+ "gating-test",
439
+ "hook-call",
440
+ "hooks-freeze-arguments",
441
+ "hooks-freeze-possibly-mutable-arguments",
442
+ "independent-across-if",
443
+ "independent",
444
+ "interdependent-across-if",
445
+ "interdependent",
446
+ "multi-arrow-expr-export-gating-test",
447
+ "multi-arrow-expr-gating-test",
448
+ "mutable-lifetime-loops",
449
+ "mutable-lifetime-with-aliasing",
450
+ "mutable-liverange-loop",
451
+ "sequence-expression",
452
+ "ssa-call-jsx-2",
453
+ "ssa-call-jsx",
454
+ "ssa-newexpression",
455
+ "ssa-shadowing",
456
+ "template-literal",
457
+
458
+ // TODO: we should be able to support these
459
+ "fbt-call",
460
+ "fbt-call-complex-param-value",
461
+ "fbt-template-string-same-scope",
462
+ "reactscript-basic.flow",
463
+
464
+ // TODO: we probably want to always skip these
465
+ "rules-of-hooks/rules-of-hooks-0592bd574811",
466
+ "rules-of-hooks/rules-of-hooks-0e2214abc294",
467
+ "rules-of-hooks/rules-of-hooks-1ff6c3fbbc94",
468
+ "rules-of-hooks/rules-of-hooks-23dc7fffde57",
469
+ "rules-of-hooks/rules-of-hooks-2bec02ac982b",
470
+ "rules-of-hooks/rules-of-hooks-2e405c78cb80",
471
+ "rules-of-hooks/rules-of-hooks-33a6e23edac1",
472
+ "rules-of-hooks/rules-of-hooks-347b0dae66f1",
473
+ "rules-of-hooks/rules-of-hooks-485bf041f55f",
474
+ "rules-of-hooks/rules-of-hooks-4f6c78a14bf7",
475
+ "rules-of-hooks/rules-of-hooks-7e52f5eec669",
476
+ "rules-of-hooks/rules-of-hooks-844a496db20b",
477
+ "rules-of-hooks/rules-of-hooks-8f1c2c3f71c9",
478
+ "rules-of-hooks/rules-of-hooks-9a47e97b5d13",
479
+ "rules-of-hooks/rules-of-hooks-9d7879272ff6",
480
+ "rules-of-hooks/rules-of-hooks-c1e8c7f4c191",
481
+ "rules-of-hooks/rules-of-hooks-c5d1f3143c4c",
482
+ "rules-of-hooks/rules-of-hooks-cfdfe5572fc7",
483
+ "rules-of-hooks/rules-of-hooks-df4d750736f3",
484
+ "rules-of-hooks/rules-of-hooks-dfde14171fcd",
485
+ "rules-of-hooks/rules-of-hooks-e5dd6caf4084",
486
+ "rules-of-hooks/rules-of-hooks-e66a744cffbe",
487
+ "rules-of-hooks/rules-of-hooks-eacfcaa6ef89",
488
+ "rules-of-hooks/rules-of-hooks-fe6042f7628b",
489
+
490
+ // new fixtures added during rebase
491
+ "constant-propagate-global-phis-constant",
492
+ "constant-propagate-global-phis"
493
+]);
494
+
495
+export default skipFilter;
compiler/forget/packages/sprout/src/runner.ts
+3
-3
@@ -14,7 +14,7 @@ import * as readline from "readline";
14
import * as RunnerWorker from "./runner-worker";
15
import yargs from "yargs";
16
import { hideBin } from "yargs/helpers";
17
-import SproutOnlyFilterTodoRemove from "./SproutOnlyFilterTodoRemove";
17
+import SproutTodoFilter from "./SproutTodoFilter";
18
import { FILTER_FILENAME } from "fixture-test-utils";
19
20
const WORKER_PATH = require.resolve("./runner-worker");
@@ -179,8 +179,8 @@ export async function main(opts: RunnerOptions): Promise<void> {
179
let allFixtures: Map<string, TestFixture> = getFixtures(testFilter);
180
181
allFixtures = new Map(
182
- Array.from(allFixtures.entries()).filter(([filename, _]) =>
183
- SproutOnlyFilterTodoRemove.has(filename)
182
+ Array.from(allFixtures.entries()).filter(
183
+ ([filename, _]) => !SproutTodoFilter.has(filename)
184
)
185
);
186