Commit Graph

19 Commits

Author SHA1 Message Date
Saad Najmi 0a48a72236 Remove deprecated Snapshot tests (#39720)
Summary:
These tests seem to have been deprecated for years, let's just remove them.

## Changelog:

[IOS] [REMOVED] - Remove deprecated Snapshot tests

Pull Request resolved: https://github.com/facebook/react-native/pull/39720

Test Plan: CI should pass

Reviewed By: cipolleschi

Differential Revision: D49809496

Pulled By: NickGerleman

fbshipit-source-id: d79f0a0896b190d071bda1eb837b3efa10dbbf3b
2023-10-03 04:33:53 -07:00
Saad Najmi 046ae12a6d Move kRCTPlatformName to RCTConstants.h (#39141)
Summary:
This PR is another one made with the intent to reduce the number of diffs between React Native and React Native macOS.

In https://github.com/facebook/react-native/commit/f7219ec02d71d2f0f6c71af4d5c3d4850a898fd8#diff-d091f6636e07dc62dd7d892489355707c43923ac15056fd2eb59d9a297d576a6 , we introduced `kRCTPlatformName`, which had already been in React Native macOS for a while (since we ifdef to either "ios" or "macos" in a number of places). This change moves the string up to a common header (dropping the "k" prefix) so we can refactor other strings that currently have a hardcoded "platform=ios" inside them.

## Changelog:

[IOS] [CHANGED] - Add RCTPlatformName to RCTConstants.h

Pull Request resolved: https://github.com/facebook/react-native/pull/39141

Test Plan: CI should pass

Reviewed By: NickGerleman

Differential Revision: D48656197

Pulled By: lunaleaps

fbshipit-source-id: b9ff08e2591d7553a1a452795f36d4405ddaa5b1
2023-08-28 17:04:29 -07:00
Phillip Pan 97efa25afa kill RCTRootViewIntegrationTests (#38871)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/38871

Changelog: [Internal]

these tests are the last callsite where we are getting event emitter off of RCTRootView... these particular tests have been disabled and they're like 8 years old, sooooooo i think it's just easier for me to delete them

Reviewed By: cipolleschi

Differential Revision: D48179389

fbshipit-source-id: 9fe36323606f53c9b6fde8b4c20d51a2cb1f6c9c
2023-08-22 19:45:27 -07:00
Stephanie Nicholson 55508b285a fix up -Wstrict-prototypes breaks
Summary: As title

Differential Revision: D45240712

fbshipit-source-id: bfb30643f11683c3bca3b66a5d602c1fd8e948dd
2023-04-24 11:42:18 -07:00
Saad Najmi 62faa797dd Remove more tvos remnants (#36240)
Summary:
I noticed this stale directory and snapshot tests for RN-Tester. We might as well just remove them.

## Changelog

[INTERNAL] [REMOVED] - Remove more tvos remnants

Pull Request resolved: https://github.com/facebook/react-native/pull/36240

Test Plan: CI should pass.

Reviewed By: cipolleschi

Differential Revision: D43495264

Pulled By: cortinico

fbshipit-source-id: 7286cf6805e12249db5d71bcaa9a91bc947102ca
2023-02-22 08:49:37 -08:00
Christoph Purrer abe76fbb56 Remove tvOS support rememants (#35214)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/35214

Changelog: [Internal]

Reviewed By: philIip

Differential Revision: D41058649

fbshipit-source-id: 16b1ec537d09e9ee50fe609417f62a146bc0f075
2022-11-07 03:07:05 -08:00
Nick Gerleman b655e69bad Fix RCTLoggingTests in OSS (#35085)
Summary:
fd91748146 added a condition not to pump an extra message when we didn't see symbolication warnings (which do not seem to show up in a stock internal build), but I missed that the test specific to RCTLogLevelError checked for string containment instead of equality, and the last assertion we process on log level is incorrect in OSS as a result.

Changelog:
[Internal][Fixed] - Fix RCTLoggingTests in OSS

Pull Request resolved: https://github.com/facebook/react-native/pull/35085

Test Plan:
`test_ios-Hermes` passes again in OSS: https://github.com/facebook/react-native/pull/35085 (JSC and Android failures look unrelated)

RCTLoggingTests still pass running `buck test //xplat/js/react-native-github/packages/rn-tester:RNTesterIntegrationTests`

Reviewed By: rshest

Differential Revision: D40699773

Pulled By: NickGerleman

fbshipit-source-id: 5acc8ec2b26a1f9acac2f070b85f1d65ee15a011
2022-10-26 01:43:19 -07:00
Nick Gerleman fd91748146 Fix deadlock in RCTLoggingTests
Summary:
Some portions of continuous test runs RNTesterIntegrationTests will hang for an hour when running in Sandcastle without outputting anything. Locally debugging, I see a deadlock waiting on a semaphore, where the test assumed an extraneous symbolication warning would be fired.

This change makes it so that we only look for the extraneous messages if we haven't already seen the target message, since they do not seem to show up in local testing. I also added assertions per semaphore that the log statement is propagated within a still very gracious 10 seconds. This means we still can see what tests are running/failing if this test has issues, instead of a deadlocked test runner with no output.

Changelog:
[Internal][Fixed] - Fix deadlock in RCTLoggingTests

Reviewed By: cipolleschi

Differential Revision: D40667275

fbshipit-source-id: ab78f3c2ef47e2fd740b1dad2a65912e9542301d
2022-10-25 14:15:42 -07:00
Ruslan Lesiutin 48db6be269 refactor(rn-tester): removed usage of AsyncStorage
Summary:
## Changelog:
[Internal][Changed] - removed usage of AsyncStorage inside rn-tester package

Reviewed By: NickGerleman, JTYim

Differential Revision: D40298838

fbshipit-source-id: fb08df690654f3b19e6f64f8893252092f0d8a27
2022-10-21 04:31:11 -07:00
Héctor Ramos 21c8837c12 Bump Circle CI macOS container to Xcode 14.0.1, Ruby to 2.7.6, CocoaPods 1.11.3 (#34884)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/34884

Xcode 14 is now stable. Updating CI to use latest Xcode command line tools.

The Circle CI 14.0.1 container ships with Ruby 2.7.6 and CocoaPods 1.11.3, see full manifest here: https://circle-macos-docs.s3.amazonaws.com/image-manifest/v8824/index.html

Changelog: [iOS][Changed] Bump to Ruby 2.7.6 and CocoaPods 1.11.3

Reviewed By: mdvacca

Differential Revision: D40148796

fbshipit-source-id: b1eab68e159ec3237ff2ef596163b73fc1e511e4
2022-10-11 18:27:25 -07:00
Ruslan Shestopalyuk 540ae39487 Fix race condition in RCTLoggingTests integration tests (#34858)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/34858

Changelog:

[iOS][Fixed] - Fix race condition in RCTLoggingTests integration tests

RCTLoggingTests work in the following way:
* Put a custom hook on logging (logging function) to intercept log messages
* Send several log messages via JS and see whether they hit the hook as expected

The problem with this approach was that there may be unexpected log messages, which squeeze inbetween the points of time when the hook was set and when the first message was sent.

There was a (now 6 years old!!!) fix to mitigate this problem, which was adding a lead pause of 2s to "make sure" that all the other possible log messages had been sent: https://github.com/facebook/react-native/pull/10568

That didn't actually guarantee fixing the problem in general, just partially mitigating it, as the race condition conceptually still remained there.

Here I take a different approach, which should guarantee that we skip all the rogue JS messages before we start sending and reading them on our own:
* Install the hook
* Log a "marker" message
* Pump the log until the marker appears - at this point we know that the hook has been definitely installed

Reviewed By: cipolleschi

Differential Revision: D40043442

fbshipit-source-id: b4aa617d27c2dcff26682dd72e47ec19cb0d11ca
2022-10-04 04:38:07 -07:00
Andres Suarez 8bd3edec88 Update copyright headers from Facebook to Meta
Reviewed By: aaronabramov

Differential Revision: D33367752

fbshipit-source-id: 4ce94d184485e5ee0a62cf67ad2d3ba16e285c8f
2021-12-30 15:11:21 -08:00
Nicola Corti aa4da248c1 Do not opt-out fbsource/xplat/js/react-native-github/packages from CLANGFORMAT
Summary:
As we're working on C++ code for RNTester to integrate Fabric, we should enable CLANGFORMAT for the files over there.

Changelog:
[Internal] [Changed] - Enable CLANGFORMAT on fbsource/xplat/js/react-native-github/packages

Reviewed By: ShikaSD

Differential Revision: D32493605

fbshipit-source-id: 7b5d63f6d2fae1a1aa1e782738953c8cd2cdbe4b
2021-11-18 04:44:46 -08:00
Ramanpreet Nara cf561b4052 Remove rootView.bridge access in RCTRootViewIntegrationTests
Summary:
RCTRootView exposes the RCTEventDispatcher directly via the .eventDispatcher property. So, there's no need to access the bridge to access the eventDispatcher.

Created from CodeHub with https://fburl.com/edit-in-codehub

Changelog: [Internal]

Reviewed By: sammy-SC

Differential Revision: D30753792

fbshipit-source-id: 5820d65c061e9b88382692dfc2791ed4a4841c0f
2021-09-06 04:57:38 -07:00
Christoph Nakazawa 3e77e15526 Continuous Integration cleanup
Reviewed By: yungsters

Differential Revision: D24700192

fbshipit-source-id: 239a8ad4848a41ad721a635d4ec37d990989f041
2020-11-05 06:09:36 -08:00
Mike Grabowski c95ee5ac18 feat: Enable Hermes to work on iOS (#29914)
Summary:
This PR makes it possible to build iOS applications with Hermes. Note that it doesn't work with `use_frameworks!` just yet.

Fixes https://github.com/facebook/react-native/issues/27845 (by downgrading iOS deployment target for RCT-Folly to 9.0)
Fixes https://github.com/facebook/react-native/issues/28810 (as above)

Checklist:
- [x] Adjust release scripts to create Hermes bytecode bundle
- [x] Release new Hermes npm package that includes iOS files (unreleased right now, if you want to try locally, you have to clone Hermes and `yarn link` its master to this project)
- [x] Test on a new React Native application in both Debug and Release (Device)
- [x] Test on an RNTester application in both Debug and Release (Device)
- [x] Add missing `i386` to Hermes framework and enable Bitcode
- [x] Inspect CI failures for possible regressions
- [x] Resolve Folly issue as reported https://github.com/facebook/react-native/issues/27845 and https://github.com/facebook/react-native/issues/28810
- [x] Release new Hermes and test against it that everything works

## Changelog

[IOS] [FEATURE] - Enable Hermes on iOS
[INTERNAL] - Upgrade to CocoaPods 1.10.0 to resolve Xcode 12.0 issues
[INTERNAL] - Upgrade to Xcode 12.0 on the CircleCI
[INTERNAL] - Fix building RNTester in Release mode
[INTERNAL] - Fix build-time errors of `libevent` with `use_frameworks!`
[INTERNAL] - Introduce `USE_HERMES` variable and test all RNTester configurations on the CI
[INTERNAL] - Do not fetch CocoaPods repository since we're using CDN anyway

Pull Request resolved: https://github.com/facebook/react-native/pull/29914

Test Plan:
Turn on `hermes_enabled` to true in your `Podfile`, install pods, and run the iOS application. Your app should be running Hermes now.

Preview: (note "Engine: Hermes")

<img width="395" alt="Screenshot 2020-09-09 at 19 22 32" src="https://user-images.githubusercontent.com/2464966/92631584-d7c01d80-f2d1-11ea-9b40-33d73db96a53.png">

Reviewed By: hramos

Differential Revision: D24684845

Pulled By: cpojer

fbshipit-source-id: 900cbe3bf9398a6fd4a773d552899a001bf5146b
2020-11-03 01:14:38 -08:00
Lulu Wu ea93151f21 Make RCTEventDispatcher TurboModule-compatible
Summary:
This diff ended up being a bit more complicated than I anticipated, since the source files in `ReactInternal` were depending on `RCTEventDispatcher`. I made the following changes:
1. Make `RCTEventDispatcher` a `protocol`, keep it in `ReactInternal`.
2. Rename the `RCTEventDispatcher` NativeModule to `RCTEventDispatcherModule`, make it conform to the `RCTEventEmitter` `protocol`, and move it to `CoreModules`.
3. Where necessary, replace categories of `RCTEventDispatcher` with functions.

Changelog:
[iOS][Added] - Make RCTEventDispatcher TurboModule-comaptible

Reviewed By: fkgozali

Differential Revision: D18439488

fbshipit-source-id: b3da15c29459fddf884519f33b0c3b8c036b5539
2020-10-14 02:40:10 -07:00
Tim Yung 982272932c RN: Remove fbjs/warning Dependency
Summary:
Replaces `fbjs/warning` call sites in React Native with `console.warn`. A few warnings will now log as warnings without the "Warning:" prefix.

Changelog:
[General][Changed] - Some warnings changed to use `console.warn` without the "Warning:" prefix.

Reviewed By: TheSavior, cpojer

Differential Revision: D22445946

fbshipit-source-id: 96b01e1bdee52b89ff3b808bc9d6cd494f6787f5
2020-08-25 14:15:35 -07:00
stealthanthrax 63992c0b96 Migrating RNTester to Packages Directory (#29567)
Summary:
## Changelog

<!-- Help reviewers and the release process by writing your own changelog entry. For an example, see:
https://github.com/facebook/react-native/wiki/Changelog
-->
This PR aims to migrate the RNTester App to `packages` directory. But is currently, open to inspect the CI issues and resolve the merge conflicts.

Currently done
 - Working on iOS
 - Working on Android
 - Detox Tests working on iOS

Need to work on
 - Errors generated by the CI builds

[General] [Changed] - Migrated the RNTester App to the packages directory.

Pull Request resolved: https://github.com/facebook/react-native/pull/29567

Test Plan: It runs on both ios and android for now and the detox iOS builds are working.

Reviewed By: cpojer

Differential Revision: D23034761

Pulled By: rickhanlonii

fbshipit-source-id: e04bb06e1c7ef15d340206090d1575a871b9e6f5
2020-08-19 17:57:08 -07:00