microsoft / microsoft/react-native-windows

Unfork JSRuntimeFactory Files

Open
#13,172 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Deforking enhancement Integration Follow-up Workstream: Releases and Integrations
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
  1. Remove override
  2. 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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.