microsoft / microsoft/react-native-windows
Unfork JSRuntimeFactory Files
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 17.3k
- Forks
- 1.2k
- Avg merge
- 1d 13h
- Merged PRs (30d)
- 33
Description
Problem Description
Recent integration brought in this PR which added the method getRuntimeTargetDelegate to JSRuntime and changes how we pass the RuntimeTarget. HermesRuntime does not implement this method but because it's a virtual method, Hermes needs too if we want to unfork these files.
Current Forked Files
- JSExecutor.cpp
- JSExector.h
- NativeToJsBridge.cpp
- JSRuntimeFactory.cpp
- JSRuntimeFactory.h
- ReactInstance.cpp
Currently these files are set to an older version in the integration.
Steps To Reproduce
- Remove override
- Will get this error message
Error LNK2001 unresolved external symbol "public: virtual class facebook::react::jsinspector_modern::RuntimeTargetDelegate & __cdecl facebook::react::JSRuntime::getRuntimeTargetDelegate(void)" (?getRuntimeTargetDelegate@JSRuntime@react@facebook@@UEAAAEAVRuntimeTargetDelegate@jsinspector_modern@23@XZ) Microsoft.ReactNative D:\react-native-windows\vnext\Microsoft.ReactNative\HermesRuntimeHolder.obj
Expected Results
Should not get an error message
CLI version
npx react-native -v
Environment
npx react-native info
Target Platform Version
10.0.22321
Target Device(s)
Desktop
Visual Studio Version
Visual Studio 2022
Build Configuration
Debug
Snack, code example, screenshot, or link to a repository
No response
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by comparing the six listed forked files—JSExecutor.cpp, JSExector.h, NativeToJsBridge.cpp, JSRuntimeFactory.cpp, JSRuntimeFactory.h, and ReactInstance.cpp—with the referenced React Native integration. Check HermesRuntimeHolder and the getRuntimeTargetDelegate path, then verify the files can be unforked without the reported LNK2001 error in the Debug Windows build.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp, react-native
- Domain
- desktop
- Issue type
- Refactor
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100