Skip to content

Conversation

@amgleitman
Copy link
Member

Please select one of the following

  • I am removing an existing difference between facebook/react-native and microsoft/react-native-macos 👍
  • I am cherry-picking a change from Facebook's react-native into microsoft/react-native-macos 👍
  • I am making a fix / change for the macOS implementation of react-native
  • I am making a change required for Microsoft usage of react-native

Summary

This is a reimplementation of #1795. It merges up to 1c1dfab, one commit before the mono repo commit.

Changelog

[GENERAL] [ADDED] - Merge to commit before monorepo change

Test Plan

The notable items in #1795 have been gone through carefully, and things still work.

  • setColorScheme works fine on macOS Paper, but it appears to be wonky on macOS Fabric. However, considering that macOS Fabric is still highly experimental, I think this is okay for now.
  • The new RNTLegacyView test page works on both macOS and iOS Fabric.

genkikondo and others added 30 commits February 21, 2023 16:17
Summary:
Simple optimization to exit before iterating through the hit path if the event name doesn't match.

Changelog:
[Android][Internal] - Optimization for natively-driven Animated PointerEvents to early exit during matching in EventAnimationDriverMatchSpec. This should have no effect if you are not using PointerEvents

Reviewed By: lunaleaps

Differential Revision: D43400457

fbshipit-source-id: fe8d811d371c78622cd4f3f9cd469cff9ccce585
Summary: Changelog: [Android][Fixed] Resolved bug with Text components in new arch losing text alignment state.

Reviewed By: mdvacca

Differential Revision: D34108943

fbshipit-source-id: 3992e9406345be919b5e3595fc1f9e61cf67a699
Summary:
Pull Request resolved: facebook#36227

This is needed for the next Gradle major (8.x) and re-aligns us with the
Kotlin version in fbsource

Changelog:
[Android] [Changed] - Kotlin to 1.7.22 for Gradle

allow-large-files

Reviewed By: rybalkinsd

Differential Revision: D43445999

fbshipit-source-id: 85be1bbb4b5ac1664b5090688b688a4e50c3d80a
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: facebook#36240

Test Plan: CI should pass.

Reviewed By: cipolleschi

Differential Revision: D43495264

Pulled By: cortinico

fbshipit-source-id: 7286cf6805e12249db5d71bcaa9a91bc947102ca
Summary:
I've just tested the nightly and the build from source is broken as the `repositories{}` block is missing.

Normally RNGP will take care of setting repositories for everyone, but this is triggered by the app-module.
When building from source, the app module of the user is isolated from the included build of React Native,
therefore the repositories{} definitions are not passed over.

Without this, the build fails with:
```
Cannot resolve external dependency ... because no repositories are defined
```

Changelog:
[Internal] [Changed] - Re-add repositories{} block to allow for build-from-source

Reviewed By: cipolleschi

Differential Revision: D43501011

fbshipit-source-id: b41c56c62839163ad210e7e303940dec0a9001da
…erated|intermediate]**`

Summary:
I'm widening the exclude for GenerateCodegenSchemaTask input files.

This is needed before we can migrate to Gradle 8.x as one of the build warning we have is
now converted to a build failure.

The reason why this is needed is because GenerateCodegenSchemaTask ends up picking up a file that
gets generated by `react-native bundle`. While the file is ignored by the Codegen, Gradle
detects a clash between the two tasks.

This solves the issue completely.

Changelog:
[Internal] [Changed] - RNGP - GenerateCodegenSchemaTask should exclude all of `**/build/[generated|intermediate]**`

Reviewed By: cipolleschi

Differential Revision: D43501129

fbshipit-source-id: 49311b833d6b59d4e67e87c535a424a1db1321e6
… external native builds (facebook#36253)

Summary:
Pull Request resolved: facebook#36253

Another build warning that got converted into a failure in Gradle 8.x
Specifically here as we're running 4 native builds in parallel for RN Tester, but they all originate
from 2 CMake intermediates files (one set for Debug and one for Release), Gradle raises a warning.

Here I'm fixing this warning by specifying an explicit ordering between those tasks.

Changelog:
[Internal] [Changed] - Gradle 8.x prep - specify task dependency between mergeNativeLibs and external native builds

Reviewed By: cipolleschi

Differential Revision: D43501128

fbshipit-source-id: bb40ae902157ce97683f42124ec65f2bc0d73405
Summary:
When developing the changes to support `use_frameworks!`, I may have forgotten to update the script that generate the `FabricComponentProvider` for the open source (and I may have changed directly that file manually to make everything work).

This change restore the generator, using the right `#import statement`

allow-large-files

## Changelog
[internal] - Update  plugin generator

Reviewed By: arushikesarwani94

Differential Revision: D43504184

fbshipit-source-id: a89455b62115f6dc2054f804241fd3834056f1b3
Summary:
This diff is a retry of shipping D43180893 (facebook@89ef5bd), which got backed out in D43350025 (facebook@1f151e0) due to issues in iOS RN apps.

I've exclude iOS apps in this diff. I am planning to have the iOS implementation for the TraceUpdateOverlay native component to fill the gap with lower priority.

Changelog: [Internal]

Reviewed By: javache

Differential Revision: D43409501

fbshipit-source-id: fe8bb5654862f0b5e9054a97ae1f4cde573bb3e0
Summary:
Opts `fbsource//xplat/js/react-native-github/packages/rn-tester:RNTesterIntegrationTests` out of Buck2 runs as the target fails in the analysis stage due to some flavor issues.

I did experiment with just resolving the flavor issues but several more nontrivial issues show up in the build graph the deeper you go and I think this target is going to require a bit more of a deep dive, so just disabling it to unblock buck2 CI rollout for now.

Reviewed By: bujar

Differential Revision: D43505883

fbshipit-source-id: 672dc6aea345a8c0396f6a0e3d549016fe1f7c45
…k#36177)

Summary:
Pull Request resolved: facebook#36177

react_native_assert calls C `assert()`, where XCode does not have a built-in breakpoint navigator to hook to assertion failures (though you can add a symbolic breakpoint to "abort()" to get the effect). This changes the Apple implemented of `react_native_assert()` to use `NSCAssert` under the hood. This is safe to use in C functions, but will be trapped by the default XCode exceptions breakpoint navigator.

Changelog:
[iOS][Fixed] - Use NSCAssert() in react_native_assert instead of C assert()

Reviewed By: cipolleschi

Differential Revision: D43275024

fbshipit-source-id: 43c4e4f1ae6b99f32634d4b1880bce712c3ae8f6
…k#36214)

Summary:
After reviewing the doc [`Image`](https://reactnative.dev/docs/image), the typescript compiler doesn't know the following properties:
- src
- srcSet
- referrerPolicy
- tintColor
- objectFit

But after reviewing the source code and this [`commit`](facebook@b2452ab), the `objectFit` property isn't one related to the Image component but to the `style` props, making the official doc outdated. So, an [`issue in the react-native-website repo`](facebook/react-native-website#3579) have been created and I decided to not include the objectFit prop in this PR.

So, this PR includes those properties: sec, secSet, referrerPolicy and tintColor

## Changelog

[GENERAL][FIXED] Add src, srcSet, referrerPolicy, tintColor to Image.d.ts declaration file

Pull Request resolved: facebook#36214

Reviewed By: NickGerleman

Differential Revision: D43437894

Pulled By: rshest

fbshipit-source-id: 497426490134aba0a474c49bf8bab9131f2e5845
Summary:
Changelog:
[Android][Internal] - Fix EventAnimationDriverMatchSpec to match against the view that generated the event for non-bubbling pointer events. This should have no effect if you are not using PointerEvents

Reviewed By: mdvacca

Differential Revision: D43413771

fbshipit-source-id: 31ac751b3d3d55eb44d3a9ab54e5fb387dcaa9b3
Summary:
Adding automatic RN version checking github workflow, which will verify the version of RN listed on all new issues filed in the repository.
Additionally, this change refactors the existing labeler workflow to make it re-usable by the version check workflow. The change also creates a logical place to add future automatic detection checks, like auto-verification of repro, template, etc.
This is technically not new functionality, as the react-native-bot does this _sometimes_, but this should be a lot more reliable.
The logic for valid release checking follows what is listed in the documentation - valid versions are current and N-2 minors, with the highest available patches.

## Changelog

[INTERNAL] [FIXED] - Made the automated RN version checking workflow more reliable

Pull Request resolved: facebook#36075

Test Plan:
I have verified a variety of different versions on issues here: https://github.com/SlyCaptainFlint/react-native/issues
I have also re-verified all the tags that were previously handled by the labeler workflow, since I have refactored it. Please take a look at both the open and closed issues in the linked repo for examples.

Reviewed By: cortinico

Differential Revision: D43089150

Pulled By: SlyCaptainFlint

fbshipit-source-id: 7da67f5cb2a4875f22e1f9e46d7ca07d43f3e135
Summary:
changelog: [internal]

Move initialisation to `init` function. This allows subclasses of `RCTAppDelegate` to use new architecture when overriding `didFinishLaunchingWithOptions`

Reviewed By: cipolleschi

Differential Revision: D43535602

fbshipit-source-id: 32adb5416e67a63ad168f0ed2480287bf178a6a6
Summary:
Add performance API example to RN tester, start with the `performance.memory` API.

- Update `RNTesterList` file for both android and ios

Changelog:
[General][Internal] - Add `performance.memory` API example to RNTester

Reviewed By: rshest

Differential Revision: D43326565

fbshipit-source-id: adeb18ce9f1f90d9e9ecf66b533307028bc02df8
…peScript parsers. (facebook#36268)

Summary:
Task from facebook#34872

> [Codegen 82] Move isModuleInterface function (Flow, TypeScript) to the Flow and TypeScript parsers.

## Changelog

[INTERNAL] [CHANGED] - Moved isModuleInterface function to to the Flow and TypeScript parsers.

Pull Request resolved: facebook#36268

Test Plan: ` yarn test react-native-codegen`

Reviewed By: christophpurrer

Differential Revision: D43535948

Pulled By: rshest

fbshipit-source-id: 7a2db05008783499168b0ce3fa58fedbac2b4e79
Summary:
We can now use Java 8, this diff i'm replacing old callbacks by lambdas

changelog: [internal] internal

Reviewed By: RSNara

Differential Revision: D43544498

fbshipit-source-id: 4c5ab8473b3d9d512853c02e81652fdce1838a48
Summary:
While looking into  android code i noticed a bug removing the incorrect key from a map.

changelog: [internal] internal

Reviewed By: RSNara

Differential Revision: D43544499

fbshipit-source-id: 15224e90cc46af358fb822e85accfae9aa9f7d11
Summary:
Fix lints warnings in RN Android

changelog: [internal] internal

Reviewed By: RSNara

Differential Revision: D43544495

fbshipit-source-id: 046cf00a99a443a2a515540e0029a19997247eb6
Summary:
The previous fix for -DNDEBUG required to install the pods with PRODUCTION=1 in order to add the flag. The flag was added also to Debug configurations, which is not ideal.

With this change, we remove the requirement of running `PRODUCTION=1 pod install` and we install the -DNDEBUG flag to all the release configurations.

## Changelog:
[iOS][Changed] - Install the -DNDEBUG flag on Release configurations, without requiring PRODUCTION=1 flag

Reviewed By: cortinico

Differential Revision: D43535620

fbshipit-source-id: af97bef06f267dddd5ce13a466bbc8d9a5eb2b0b
…peParserError` error-emitting code (facebook#36252)

Summary:
> [Codegen 83 - assigned to Pranav-yadav] Create a function throwIfIncorrectModuleRegistryCallArgumnent function in the errors.js file and factor together the code from [Flow](https://github.com/facebook/react-native/blob/main/packages/react-native-codegen/src/parsers/flow/modules/index.js#L407-L415) and [TypeScript](https://github.com/facebook/react-native/blob/main/packages/react-native-codegen/src/parsers/typescript/modules/index.js#L513-L521). Update the Parsers to return the right Literl type

Merged `Flow` and `TS` Parsers' `IncorrectModuleRegistryCallArgumentTypeParserError` error-emitting code

- into `throwIfIncorrectModuleRegistryCallArgument` fun in `error-utils.js`

## Changelog

[INTERNAL] [CHANGED] -  Merge `Flow` and `TS` Parsers' `IncorrectModuleRegistryCallArgumentTypeParserError` error-emitting code

Pull Request resolved: facebook#36252

Test Plan: - `yarn test`

Reviewed By: rshest

Differential Revision: D43502843

Pulled By: cipolleschi

fbshipit-source-id: eb63b40d433f90134a80c02c8f750257c82104a3
Summary:
We don't support Lambda in OSS yet, Lambdas were introduced as root of a stack of diffs, so we need to revert the whole stack

## Changelog:
[internal] - revert changes that broke CircleCI

Reviewed By: GijsWeterings

Differential Revision: D43566086

fbshipit-source-id: 95b8ed404edd6f711fbbb5ae3913010c653a2c28
Summary:
We don't support Lambda in OSS yet, Lambdas were introduced as root of a stack of diffs, so we need to revert the whole stack

## Changelog:
[internal] - revert changes that broke CircleCI

Reviewed By: GijsWeterings

Differential Revision: D43566121

fbshipit-source-id: 5c4fe8272ca220d8914eb64b3ab395589c007198
Summary:
We don't support Lambda in OSS yet, Lambdas were introduced as root of a stack of diffs, so we need to revert the whole stack

## Changelog:
[internal] - revert changes that broke CircleCI

Reviewed By: GijsWeterings

Differential Revision: D43566129

fbshipit-source-id: feae3c3065ed83463c9d887d7ff488c29993e0ae
Summary:
Update offline mirrors for iOS

allow-large-files

## Changelog: [internal]

Reviewed By: cortinico

Differential Revision: D43567454

fbshipit-source-id: 7711e6062d960d05d1ecd9fe77b3b4c1ea5f3070
Summary:
While testing `use_frameworks! :linkage => :static`, I encountered nullability warnings that were previously suppressed because we always build with `-Werror`. I'm not sure why the suppressions no longer work, but they should just be fixed.

## Changelog

[IOS] [FIXED] - Fix nullability warnings

Pull Request resolved: facebook#36247

Test Plan: iOS build should succeed.

Reviewed By: cipolleschi

Differential Revision: D43531887

Pulled By: javache

fbshipit-source-id: cae0617a20c8d215042cf4c5be2cbb17c801bb41
…acebook#36282)

Summary:
Pull Request resolved: facebook#36282

RN Tester is currently red as `TraceUpdateOverlay` is not registered in the Fabric Core Component Registry.

Changelog:
[Internal] [Changed] - Add TraceUpdateOverlayComponentDescriptor to CoreComponentsRegistry

Reviewed By: cipolleschi

Differential Revision: D43567915

fbshipit-source-id: ceb4b9b674a969f260caf810eade30ae23ce2ce8
…ok#36283)

Summary:
This PR fixes the initialization path of RNTester when it is run with the Old Arch and Fabric enabled

## Changelog

[iOS][Fixed] - Make sure to initialize the contextContainer in the Old Arch with Fabric enabled

Pull Request resolved: facebook#36283

Test Plan:
Tested manually on RNTester
CircleCI is green

Reviewed By: sammy-SC

Differential Revision: D43568205

Pulled By: cipolleschi

fbshipit-source-id: cddba97629b542a044191da14221f3300a9d879f
…6278)

Summary:
Pull Request resolved: facebook#36278

[Changelog][Internal]

The diff creates a test clause for [TurboModule::emitDeviceEvent C++ API for TurboModules](https://www.internalfb.com/code/fbsource/[929870c905c8fe68cb330ce96bda7eb703bb6ae6]/xplat/js/react-native-github/ReactCommon/react/nativemodule/core/ReactCommon/TurboModule.h?lines=90), which can be seen in either Catalyst or RNTester.

Reviewed By: cipolleschi

Differential Revision: D43466327

fbshipit-source-id: ff4c111b4beaab72b13d2bd89ed03023c9c7b3cf
@amgleitman amgleitman requested a review from a team as a code owner July 28, 2023 20:50
@github-actions
Copy link

github-actions bot commented Jul 28, 2023

Warnings
⚠️ 🔒 package.json - Changes were made to package.json. This will require a manual import by a Facebook employee.
⚠️

Libraries/LayoutAnimation/LayoutAnimation.js#L13 - Libraries/LayoutAnimation/LayoutAnimation.js line 13 – 'FabricUIManagerSpec' is defined but never used. (no-unused-vars)

⚠️

Libraries/ReactNative/UIManager.js#L12 - Libraries/ReactNative/UIManager.js line 12 – 'FabricUIManagerSpec' is defined but never used. (no-unused-vars)

⚠️

packages/rn-tester/js/examples/SectionList/SectionList-scrollable.js#L285 - packages/rn-tester/js/examples/SectionList/SectionList-scrollable.js line 285 – Do not define components during render. React will see a new component type on every render and destroy the entire subtree’s DOM nodes and state (https://reactjs.org/docs/reconciliation.html#elements-of-different-types). Instead, move this component definition out of the parent component “SectionList_scrollable” and pass data as props. If you want to allow component creation in props, set allowAsProps option to true. (react/no-unstable-nested-components)

⚠️

packages/rn-tester/js/examples/SectionList/SectionList-scrollable.js#L289 - packages/rn-tester/js/examples/SectionList/SectionList-scrollable.js line 289 – Do not define components during render. React will see a new component type on every render and destroy the entire subtree’s DOM nodes and state (https://reactjs.org/docs/reconciliation.html#elements-of-different-types). Instead, move this component definition out of the parent component “SectionList_scrollable” and pass data as props. If you want to allow component creation in props, set allowAsProps option to true. (react/no-unstable-nested-components)

Generated by 🚫 dangerJS against fdab6df

@Saadnajmi
Copy link
Collaborator

From the Old PR I had, I see I wrote
"Flatlist moved to it's own package"

I think we'll need to publish a "@react-native-macos/flatlist" package because we have diffs in there, so we don't want to accidentally use the core one. I think I didn't do anything for that in my old PR. Did you do anything to that regard?

@amgleitman
Copy link
Member Author

From the Old PR I had, I see I wrote "Flatlist moved to it's own package"

I think we'll need to publish a "@react-native-macos/flatlist" package because we have diffs in there, so we don't want to accidentally use the core one. I think I didn't do anything for that in my old PR. Did you do anything to that regard?

No I didn't. I'll take a closer look at these diffs.

@acoates-ms
Copy link
Collaborator

Looks like the RNTA pipeline isn't testing against newly published packages. -- It should do something similar to the init pipeline, where it starts a verdaccio server, publishes the new bits to that, then runs RNTA against that server to verify the bits in the PR, rather than the bits on NPM.

@amgleitman
Copy link
Member Author

Looks like the RNTA pipeline isn't testing against newly published packages. -- It should do something similar to the init pipeline, where it starts a verdaccio server, publishes the new bits to that, then runs RNTA against that server to verify the bits in the PR, rather than the bits on NPM.

After experimenting with the Integration pipeline for a few days, it's clear that this fix will be rather involved with react-native-macos becoming more like a monorepo. Since @tido64 should know more about react-native-test-app than I do, I think he would be a valuable resource.

For now, we can probably press forward with this anyway. We already test our ability to use this in apps with react-native-macos-init and RNTester, so that validation may be enough.

@tido64
Copy link
Member

tido64 commented Aug 8, 2023

I'd be happy to help when you think the repo is in a better state. Just an FYI, you probably want to bump the minor version and not point at a local .tgz file here:

jq '.devDependencies["react-native"] = "^0.71"' |
jq '.devDependencies["react-native-macos"] = "../react-native-macos-$(package_version).tgz"' |

jq '.devDependencies["react-native"] = "^0.71"' |
jq '.devDependencies["react-native-macos"] = "../../react-native-macos-$(package_version).tgz"' |

@amgleitman amgleitman merged commit ca610b4 into microsoft:main Aug 9, 2023
@amgleitman amgleitman deleted the 0.72-merge-before-monorepo branch August 9, 2023 23:28
@amgleitman amgleitman mentioned this pull request Aug 11, 2023
4 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.