Commit 23ae6ce
committed
Update on "[compiler] ValidatePreservedManualMemoization reports detailed errors"
This pass didn't previously report the precise difference btw inferred/manual dependencies unless a debug flag was set. But the error message is really good (nice job mofeiz): the only catch is that in theory the inferred dep could be a temporary that can't trivially be reported to the user.
But the messages are really useful for quickly verifying why the compiler couldn't preserve memoization. So here we switch to outputting a detailed message about the discrepancy btw inferred/manual deps so long as the inferred dep root is a named variable. I also slightly adjusted the message to handle the case where there is no diagnostic, which can occur if there were no manual deps but the compiler inferred a dependency.
[ghstack-poisoned]1 parent 7ff06dd commit 23ae6ce
File tree
1 file changed
+0
-1
lines changed- compiler/packages/babel-plugin-react-compiler/src/Validation
1 file changed
+0
-1
lines changedcompiler/packages/babel-plugin-react-compiler/src/Validation/ValidatePreservedManualMemoization.ts
Lines changed: 0 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
8 | | - | |
9 | 8 | | |
10 | 9 | | |
11 | 10 | | |
| |||
0 commit comments