microsoft / react-native-windows

A framework for building native Windows apps with React.
https://microsoft.github.io/react-native-windows/
Other
16.26k stars 1.14k forks source link

Unfork JSRuntimeFactory Files #13172

Open TatianaKapos opened 4 months ago

TatianaKapos commented 4 months ago

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

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

chrisglein commented 4 months ago

Based on getRuntimeTargetDelegate and jsinspector_modern this may be related to the debugging changes. Overrides have integration blocked to move. This is from post 0.74 main changes. Given the amount of traffic we'll be having to get hermes direct debugging working in 0.74, there will certainly be conflicts with these forks as we move forward.

TatianaKapos commented 1 month ago

Removing from my assignment, while this is an integration follow-up issue it require a lot of knowledge around Hermes to debug and is not straightforward. I can keep an eye on it but is not prioritized work for me