Repository navigation
Fantom's tester is not rebuilt after a change to ReactCommon: Gradle calls buildFantomTester up to date and yarn fantom runs the old tester #59723
Description
Description
After I change a C++ file outside private/react-native-fantom/tester (in ReactCommon, ReactCxxPlatform or a prepared third-party dependency), yarn workspace @react-native/fantom build reports buildFantomTester UP-TO-DATE, CMake never runs, and yarn fantom keeps running the tester built before the change. The tests pass or fail against code that is no longer in the tree.
configureFantomTester declares the tester's own folder as its only input and the CMake build tree's generated files as its output (build.gradle.kts L182-L187); buildFantomTester declares only those generated files as its input (L214-L218), which testerBuildOutputFileTree limits to *.cmake, *.marks, compiler_depends.ts, Makefile and link.txt. None of them changes when a source file outside the tester folder does, so Gradle skips both tasks. CMake itself tracks every source and header: running buildFantomTester with --rerun builds the change in.
Letting CMake decide, for example by marking buildFantomTester with outputs.upToDateWhen { false } so it always runs cmake --build (which does nothing when nothing changed), or by declaring the source folders CMake compiles from as its inputs, would make yarn workspace @react-native/fantom build build what is in the tree.
Steps to reproduce
git clone https://github.com/YevheniiKotyrlo/react-native-fantom-reproducer && cd react-native-fantom-reproducer./fantom/reproduce.sh stale-tester-after-react-common-change(needs Docker). It clonesreact/react-nativeatmainand builds Fantom's tester as CI does, then:- prints the tester's SHA-256 and runs
yarn fantom packages/react-native/Libraries/Components/View/__tests__/View-itest.js; - applies
fantom/null-write-in-load-script.patch, which makesReactInstance::loadScriptin ReactCommon write through a null pointer, runsyarn workspace @react-native/fantom build, prints the SHA-256 and runs the test again; - runs
./gradlew :private:react-native-fantom:buildFantomTester --rerun, prints the SHA-256 and runs the test once more.
- prints the tester's SHA-256 and runs
Expected: the build in step 2 compiles the change, and View-itest.js dies of SIGSEGV in step 2.
Actual: on main at f1f1474, step 2's build reports configureFantomTester UP-TO-DATE and buildFantomTester UP-TO-DATE, the tester's SHA-256 is unchanged, and all 232 tests pass on the old tester. Only step 3 rebuilds it: the SHA-256 changes and the test dies of SIGSEGV.
React Native Version
0.88.0 (reproduced on main at f1f1474)
Affected Platforms
Build - Linux
Output of npx @react-native-community/cli info
System:
OS: Linux 6.18 Ubuntu 22.04.5 LTS 22.04.5 LTS (Jammy Jellyfish)
CPU: (24) x64 AMD Ryzen 9 9950X3D 16-Core Processor
Memory: 121.74 GB / 125.63 GB
Shell:
version: 5.1.16
path: /bin/bash
Binaries:
Node:
version: 22.14.0
path: /usr/local/bin/node
Yarn:
version: 1.22.22
path: /usr/local/bin/yarn
npm:
version: 10.9.2
path: /usr/local/bin/npm
Watchman: Not Found
SDKs:
Android SDK:
API Levels:
- "37"
Build Tools:
- 37.0.0
Android NDK: 28.2.13676358
IDEs:
Android Studio: Not Found
Languages:
Java:
version: 17.0.20.1
path: /usr/bin/javac
Ruby:
version: 3.0.2
path: /usr/bin/ruby
npmPackages:
"@react-native-community/cli": Not Found
react: Not Found
react-native: Not Found
npmGlobalPackages:
"*react-native*": Not Found
Android:
hermesEnabled: Not found
newArchEnabled: Not found
iOS:
hermesEnabled: Not found
newArchEnabled: Not found
Stacktrace or Logs
react-native f1f147405888d6ffbcab40e59a05df7aa21ddc7e, committed 2026-10-31T14:33:21+00:00
clang version 23.1.3 (https://github.com/llvm/llvm-project 0d261d1ca552c95a8f007e061c787ac7132fbcbc)
== the stock tester
7c13020dcecf1385a84f08fa6808ea0775c518cff51114c5cd797ae91157c362 private/react-native-fantom/build/tester/fantom_tester
PASS fantom packages/react-native/Libraries/Components/View/__tests__/View-itest.js (11.638 s)
Tests: 232 passed, 232 total
== ReactInstance::loadScript writes through a null pointer; yarn workspace @react-native/fantom build
> Task :private:react-native-fantom:configureFantomTester UP-TO-DATE
> Task :private:react-native-fantom:buildFantomTester UP-TO-DATE
BUILD SUCCESSFUL in 3s
7c13020dcecf1385a84f08fa6808ea0775c518cff51114c5cd797ae91157c362 private/react-native-fantom/build/tester/fantom_tester
PASS fantom packages/react-native/Libraries/Components/View/__tests__/View-itest.js (5.275 s)
Tests: 232 passed, 232 total
== ./gradlew :private:react-native-fantom:buildFantomTester --rerun
> Task :private:react-native-fantom:configureFantomTester UP-TO-DATE
> Task :private:react-native-fantom:buildFantomTester
BUILD SUCCESSFUL in 4s
c7be7623242c05ee8af710d4e3bca8438f60f3da10a0cad028df280adc515bcf private/react-native-fantom/build/tester/fantom_tester
FAIL fantom packages/react-native/Libraries/Components/View/__tests__/View-itest.js
Command failed (status code: (empty), signal: SIGSEGV): /react-native/private/react-native-fantom/build/tester/fantom_tester --bundlePath /react-native/private/react-native-fantom/.out/js-builds/run-1793467239988/1793467247967-View-itest.js.bundle.js --featureFlags {"enableNativeCSSParsing":false,"enableCppPropsIteratorSetter":false} --minLogLevel error
Tests: 0 total
MANDATORY Reproducer
https://github.com/YevheniiKotyrlo/react-native-fantom-reproducer
Screenshots and Videos
No response
Activity