[compiler][snap] More minimization improvements#463
Conversation
* A few new minimization strategies, removing function params and array/object pattern elements * Ensure that we preserve the same set of errors based on not just category+reason but also description.
Greptile OverviewGreptile SummaryThis PR extends the Snap minimizer by (1) ensuring error preservation compares One blocking issue: the minimizer’s AST traversals call Confidence Score: 2/5
Important Files Changed
|
Additional Comments (1)
This file calls Also appears at Prompt To Fix With AIThis is a comment left during a code review.
Path: compiler/packages/snap/src/minimize.ts
Line: 149:151
Comment:
**Invalid AST traversal**
This file calls `t.traverseFast(...)` in multiple places, but `@babel/types` doesn’t provide `traverseFast` (it’s from `@babel/traverse`). As written, `minimize()` will throw at runtime the first time it hits one of these calls. You likely want `import traverse, {traverseFast} from '@babel/traverse'` and then use `traverseFast(ast, ...)` (or replace these with `traverse(ast, { enter(path) { ... } })`).
Also appears at `compiler/packages/snap/src/minimize.ts:195`, `234`, `322`, `364`, `443`, etc.
How can I resolve this? If you propose a fix, please make it concise. |
|
Upstream PR was closed or merged. Code is synced via branch mirror. |
Mirror of facebook/react#35689
Original author: josephsavona