Skip to content

Commit 4ceced9

Browse files
authored
Name the right env var in Fantom's heap snapshot error
## Summary: When a JS heap snapshot fails because Hermes has no memory instrumentation, `takeJSMemoryHeapSnapshot` tells you to run Fantom with `FANTOM_ENABLE_MEMORY_INSTRUMENTATION=1`. Fantom reads `FANTOM_ENABLE_JS_MEMORY_INSTRUMENTATION`, and global setup rejects any other `FANTOM_` variable, so following the hint stops the run with "Unexpected Fantom environment variable". This makes the message name the variable Fantom actually reads. Fixes #60063 ## Changelog: [INTERNAL] [FIXED] - Name the right env var in Fantom's heap snapshot error ## Test Plan: Ran the Fantom Jest config with `FANTOM_ENABLE_MEMORY_INSTRUMENTATION=1`: global setup throws "Unexpected Fantom environment variable". With `FANTOM_ENABLE_JS_MEMORY_INSTRUMENTATION=1` it gets past validation and stops on the expected "Memory instrumentation is not supported in CI or OSS environments" check, so the new hint points at the accepted variable. Message-only change. Differential Revision: D132533350 Pull Request resolved: #60065
1 parent 600b2b3 commit 4ceced9

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎private/react-native-fantom/src/index.js‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -791,7 +791,7 @@ export function takeJSMemoryHeapSnapshot(): void {
791791
// a very specific shape).
792792
errorMessage +=
793793
' If you want to take JS heap snapshots in optimized builds, ' +
794-
'please call Fantom with FANTOM_ENABLE_MEMORY_INSTRUMENTATION=1 ' +
794+
'please call Fantom with FANTOM_ENABLE_JS_MEMORY_INSTRUMENTATION=1 ' +
795795
'(only works locally with Buck).';
796796
}
797797

0 commit comments

Comments
 (0)