Skip to content

Commit

Permalink
Revert D58288489: Multisect successfully blamed "D58288489: [RN][Fuse…
Browse files Browse the repository at this point in the history
…box][iOS] Implement new HostTargetMetadata fields (iOS)" for one test failure (#44911)

Summary:
Pull Request resolved: #44911

This diff reverts D58288489
D58288489: [RN][Fusebox][iOS] Implement new HostTargetMetadata fields (iOS) by huntie causes the following test failure:

Tests affected:
- [fbsource//xplat/js/react-native-github/packages/react-native/ReactCommon/jsinspector-modern:testsAndroid - main](https://www.internalfb.com/intern/test/844425054538351/)

Here's the Multisect link:
https://www.internalfb.com/multisect/5466028
Here are the tasks that are relevant to this breakage:
T191385299: 50+ tests unhealthy for react_native

The backout may land if someone accepts it.

If this diff has been generated in error, you can Commandeer and Abandon it.

Changelog: [Internal]

Reviewed By: NickGerleman

Differential Revision: D58475289

fbshipit-source-id: 3a4476d1350c4986cdb673bdb4ac52af353a00ea
  • Loading branch information
cipolleschi authored and facebook-github-bot committed Jun 12, 2024
1 parent 297ded9 commit 11e5394
Show file tree
Hide file tree
Showing 6 changed files with 1 addition and 89 deletions.
7 changes: 0 additions & 7 deletions packages/react-native/React/Base/RCTBridge.mm
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
#import <jsinspector-modern/ReactCdp.h>
#import <optional>
#import "RCTDevLoadingViewProtocol.h"
#import "RCTInspectorUtils.h"
#import "RCTJSThread.h"
#import "RCTLog.h"
#import "RCTModuleData.h"
Expand Down Expand Up @@ -200,14 +199,8 @@ void RCTUIManagerSetDispatchAccessibilityManagerInitOntoMain(BOOL enabled)

facebook::react::jsinspector_modern::HostTargetMetadata getMetadata() override
{
auto metadata = [RCTInspectorUtils getHostMetadata];

return {
.appIdentifier = metadata.appIdentifier,
.deviceName = metadata.deviceName,
.integrationName = "iOS Bridge (RCTBridge)",
.platform = metadata.platform,
.reactNativeVersion = metadata.reactNativeVersion,
};
}

Expand Down
23 changes: 0 additions & 23 deletions packages/react-native/React/DevSupport/RCTInspectorUtils.h

This file was deleted.

42 changes: 0 additions & 42 deletions packages/react-native/React/DevSupport/RCTInspectorUtils.mm

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -223,11 +223,7 @@ bool HostTargetController::decrementPauseOverlayCounter() {
folly::dynamic hostMetadataToDynamic(const HostTargetMetadata& metadata) {
folly::dynamic result = folly::dynamic::object;

result["appIdentifier"] = metadata.appIdentifier.value_or(nullptr);
result["deviceName"] = metadata.deviceName.value_or(nullptr);
result["integrationName"] = metadata.integrationName.value_or(nullptr);
result["platform"] = metadata.platform.value_or(nullptr);
result["reactNativeVersion"] = metadata.reactNativeVersion.value_or(nullptr);

return result;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,7 @@ class HostCommandSender;
class HostTarget;

struct HostTargetMetadata {
std::optional<std::string> appIdentifier;
std::optional<std::string> deviceName;
std::optional<std::string> integrationName;
std::optional<std::string> platform;
std::optional<std::string> reactNativeVersion;
};

/**
Expand Down Expand Up @@ -94,8 +90,7 @@ class HostTargetDelegate {
virtual ~HostTargetDelegate();

/**
* Returns a metadata object describing the host. This is called on an
* initial response to @cdp ReactNativeApplication.enable.
* Returns a metadata object describing the host.
*/
virtual HostTargetMetadata getMetadata() = 0;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
#import <React/RCTConvert.h>
#import <React/RCTFabricSurface.h>
#import <React/RCTInspectorDevServerHelper.h>
#import <React/RCTInspectorUtils.h>
#import <React/RCTJSThread.h>
#import <React/RCTLog.h>
#import <React/RCTMockDef.h>
Expand Down Expand Up @@ -43,14 +42,8 @@ @interface RCTHost () <RCTReloadListener, RCTInstanceDelegate>

jsinspector_modern::HostTargetMetadata getMetadata() override
{
auto metadata = [RCTInspectorUtils getHostMetadata];

return {
.appIdentifier = metadata.appIdentifier,
.deviceName = metadata.deviceName,
.integrationName = "iOS Bridgeless (RCTHost)",
.platform = metadata.platform,
.reactNativeVersion = metadata.reactNativeVersion,
};
}

Expand Down

0 comments on commit 11e5394

Please sign in to comment.