mirror of
https://github.com/facebook/react-native.git
synced 2026-11-18 20:19:07 +00:00
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: https://github.com/react/react-native/pull/60065
This commit is contained in:
1 parent
600b2b3136
commit
4ceced9ccc
1 file changed
+1
-1
+1
-1
@@ -791,7 +791,7 @@ export function takeJSMemoryHeapSnapshot(): void {
|
||||
// a very specific shape).
|
||||
errorMessage +=
|
||||
' If you want to take JS heap snapshots in optimized builds, ' +
|
||||
'please call Fantom with FANTOM_ENABLE_MEMORY_INSTRUMENTATION=1 ' +
|
||||
'please call Fantom with FANTOM_ENABLE_JS_MEMORY_INSTRUMENTATION=1 ' +
|
||||
'(only works locally with Buck).';
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user