Skip to content

Commit 23ae6ce

Browse files
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

1 file changed

+0
-1
lines changed

compiler/packages/babel-plugin-react-compiler/src/Validation/ValidatePreservedManualMemoization.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
* LICENSE file in the root directory of this source tree.
66
*/
77

8-
import prettyFormat from 'pretty-format';
98
import {CompilerError, ErrorSeverity} from '../CompilerError';
109
import {
1110
DeclarationId,

0 commit comments

Comments
 (0)