Compare commits

...
83 Commits
Author SHA1 Message Date
Distiller 6fe8367bea [0.69.3] Bump version numbers 2022-07-25 13:00:12 +00:00
RiccardoandGitHub b9e9b53b6e Merge pull request #34214 from Kudo/fix-34102
Fix React-bridging header not found for third party modules
2022-07-21 06:56:36 +01:00
Kudo Chien fa2acc32d1 Fix React-bridging header not found for third party modules 2022-07-21 00:01:21 +08:00
RiccardoandGitHub 30d1e20340 Merge pull request #34228 from facebook/fix/build_hermes_against_stable
[FIX] Build hermes from source on PR against stable
2022-07-20 16:56:11 +01:00
Riccardo Cipolleschi a2d6f5afe5 fix: build hermes from source on PR against stable 2022-07-20 12:49:13 +01:00
Distiller 75eb6e7bf4 [0.69.2] Bump version numbers 2022-07-20 09:39:02 +00:00
RiccardoandGitHub b8072535f1 Merge pull request #34223 from facebook/fix/hermes_in_release
Fix/hermes in release
2022-07-20 10:07:19 +01:00
Riccardo Cipolleschi d6be1af6d3 fix: make sure we can build hermes when working against stable 2022-07-19 17:32:35 +01:00
Lorenzo Sciandra a19578de88 Hermes pod: change logic to use the hermes tag to set the pod source correctly (#34221)
Summary:
This fix is necessarly to ensure that when working on the codebase in the `0.XX-stable` branches (ex. when you are working on a release) the Hermes podfile is correctly set against the right commit for that branch, and not latest commit from main branch of Hermes repo.

I didn't add a check to verify that the file `.hermesversion` exists because I think it's safe to assume that the file and the tag correctly exists when this step (doing a pod install on the `0.XX-stable` branch).

Once this is merged, we need to cherry pick it on both the 0.69 and 0.70 branches

## Changelog

[iOS] [Fixed] - Hermes pod: change logic to use the hermes tag to set the pod source correctly

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

Test Plan:
* git clone the repo
* checkout 0.69-stable branch
* follow https://reactnative.dev/contributing/release-testing
* without this commit, when testing RNTester + iOS + Hermes the app will insta-crash on opening
* with it, the app gets build successfully

Reviewed By: cortinico

Differential Revision: D37957660

Pulled By: cipolleschi

fbshipit-source-id: 4e50099ed712b1ad8e6439822e3f530142982c1b
2022-07-19 15:37:34 +01:00
wood1986andLorenzo Sciandra 112d67865b fix: fix the race condition when calling readAsDataURL after new Blob(blobs) (#34096)
Summary:
```js
async () => {
  let blobs = [];
  for (let i = 0; i < 4; i++) {
    const res = await fetch();
    blobs = [...blobs, await res.blob()]
  }
  const blob = new Blob(blobs); // <<<<<<<<<<<<<<< a
  return await new Promise((resolve, reject) => {
    const fileReader = new FileReader();
    fileReader.onload = async () => {
      await RNFS.writeFile(destPath, (fileReader.result as string).split(',')[1], 'base64');
      resolve(destPath);
    };
    fileReader.onabort = () => {
      reject('');
    };
    fileReader.onerror = (event) => {
      reject('');
    };
    fileReader.readAsDataURL(blob); // <<<<<<<<<<<<<<< b
  });
}
```

Sometime `fileReader.readAsDataURL` is unable to get blob from the dictionary after `new Blob(blobs)` and then reject with `Unable to resolve data for blob: blobId` in iOS or `The specified blob is invalid` in android. Because line `a` and `b` can be run in different thread. `new Blob([])` is in progress and `fileReader.readAsDataURL` accesses the blob dictionary ahead of the blob creation.

The expected behaviour is it should finish new Blob([]) first and then readAsDataURL(blob)

To fix that, there should be a lock inside the method `createFromParts`. For iOS, It needs to be a recursive_mutex to allow same thread to acquire lock

## 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
-->

[iOS] [Fixed] - fix the race condition when calling readAsDataURL after new Blob(blobs)

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

Reviewed By: cipolleschi

Differential Revision: D37514981

Pulled By: javache

fbshipit-source-id: 4bf84ece99871276ecaa5aa1849b9145ff44dbf4
2022-07-12 14:58:55 +01:00
Geraint WhiteandLorenzo Sciandra 4f72a02592 fix(jest): make assetFileTransformer return an object (#33756)
Summary:
Fixes https://github.com/facebook/react-native/issues/33751
Relates to https://github.com/facebook/react-native/issues/33576

Jest 28 removed support for returning a string in the process method of a transformer (https://jestjs.io/docs/upgrading-to-jest28#transformer).

This PR changes assetFileTransformer to return an object instead of a string.

## Changelog

[Internal] [Fixed] - Return object from assetFileTransformer

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

Test Plan: Tests pass with Jest 28 when this change is made.

Reviewed By: cipolleschi

Differential Revision: D37242038

Pulled By: cortinico

fbshipit-source-id: d8a5054f5378183f644cd1458785084b26782193
2022-07-12 14:48:23 +01:00
Mike HardyandGitHub a39a7c453d fix(deps): react-shallow-renderer v16.15.0 for react v18 compat (#34104) 2022-07-12 11:31:01 +01:00
Michał PierzchałaandGitHub 28cbd21d21 Upgrade RN CLI to v8.0.3 (#34159) 2022-07-12 11:30:41 +01:00
RiccardoandGitHub 23accbf58d [fix] backport FlipperConfiguration from main (#34098) 2022-07-07 08:24:22 +02:00
Distiller 587eb4ed13 [0.69.1] Bump version numbers 2022-06-29 10:03:41 +00:00
Dusan Klinecandfortmarek 802d3246c4 fix(build): fixes React-RCTText build with RN 0.69.0 (#34064)
Summary:
Fixes iOS build for React-RCTText with RN 0.69.0, fixes https://github.com/facebook/react-native/issues/33976

PR contains changes from https://github.com/facebook/react-native/issues/33976#issuecomment-1164973209

PoC repo: https://github.com/ph4r05/poc-rn-34064

Related issues:
- https://github.com/expo/expo/issues/16283
- https://github.com/facebook/react-native/issues/33815
- https://github.com/facebook/react-native/issues/33976

## 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
-->

[iOS] [Fixed] - Fix build for React-RCTText

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

Reviewed By: cortinico

Differential Revision: D37420163

Pulled By: cipolleschi

fbshipit-source-id: 68a831bce9f449348d13e040a1ba12726a66667d
2022-06-29 11:55:09 +02:00
Kudo Chienandfortmarek 050924a299 Fix RCT-Folly build error when use_frameworks! and hermes are both enabled (#34030)
Summary:
This PR is fixing the build errors on iOS when `use_frameworks!` and `:hermes_enabled` are both enabled. There are two errors:

- fmt/compile.h include not found: This PR adds fmt in header search paths.
- undefined symbols `_jump_fcontext` and `_make_fcontext` from boost. the two symbols are actually not be unused. because to generate the shared library in dynamic framework mode, LTO (Link-Time-Optimization) is not as powerful as generating a single executable.

## Changelog

[iOS] [Fixed] - Fix RCT-Folly build error when use_frameworks! and hermes are both enabled

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

Test Plan:
- CI passed

-
```
$ npx react-native init RN069 --version next
# edit RN069/ios/Podfile to enable use_frameworks! and hermes_enabled
# patch node_modules/react-native from both https://github.com/facebook/react-native/issues/34011 and this prs' patch
$ pod install
$ yarn ios
```

Reviewed By: cortinico

Differential Revision: D37284084

Pulled By: dmitryrykun

fbshipit-source-id: 923fa03d7844d1d227880919c8b2c8614c848d59
2022-06-29 11:47:10 +02:00
Kudo Chienandfortmarek 9e591acd56 Fix broken use_frameworks from React-bridging (#34011)
Summary:
`use_frameworks!` is broken again in react-native 0.69 because React-bridging. in the `use_frameworks!` mode, header structures are flattened, so `#include <react/bridging/CallbackWrapper.h>` is not reachable to the header. to somehow workaround the issue without touch React-bridging imports, the pr do these things:

- use `header_mappings_dir` to keep `react/bridging` header structure
- because the header structure is not default framework header structure, explicitly `HEADER_SEARCH_PATHS` is necessary.
- forward declare `CallbackWrapper` and use it internally in ReactCommon. so that we don't need to add `HEADER_SEARCH_PATHS` for React-bridging to every pods depending on `ReactCommon/turbomodule/core`, e.g. React-RCTSettings.podspec.

[iOS] [Fixed] - Fix use_frameworks! for 0.69

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

Test Plan:
```sh
$ npx react-native init RN069 --version next
$ yarn ios
```

Reviewed By: cortinico, cipolleschi

Differential Revision: D37169699

Pulled By: dmitryrykun

fbshipit-source-id: 309c55f1c611a2fc3902a83e8af814daaf2af6a0
2022-06-29 11:46:51 +02:00
Kudo Chienandfortmarek 9d3ce322bd revert #33381 changes (#33973)
Summary:
https://github.com/facebook/yoga/pull/1150 is better than the tricky https://github.com/facebook/react-native/issues/33381 and fix the build error on react-native 0.69 with swift clang module. as https://github.com/facebook/yoga/pull/1150 is landed as https://github.com/facebook/react-native/commit/43f831b23caf22e59af5c6d3fdd62fed3d20d4ec, i'm reverting the previous change, only leaving the necessary react_native_pods.rb change.

## Changelog

[iOS] [Changed] - Better fix for yoga + swift clang module build error

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

Test Plan: ci passed

Reviewed By: cortinico, cipolleschi

Differential Revision: D36998007

Pulled By: dmitryrykun

fbshipit-source-id: fa11bd950e2a1be6396f286086f4e7941ad2ff5b
2022-06-29 11:41:56 +02:00
Janic Duplessisandfortmarek aa068e05ce Make all headers public and add #ifdef __cplusplus (#1150)
Summary:
This change is mostly needed to support the new react-native architecture with Swift. Some private yoga headers end up being included in the swift build and result in compilation failure since swift cannot compile c++ modules. See https://github.com/facebook/react-native/pull/33381.

The most reliable fix is to include all headers as public headers, and add `#ifdef __cplusplus` to those that include c++. This is already what we do for other headers, this applies this to all headers.

Tested in the YogaKitSample, and also in a react-native app.

Changelog:
[iOS] [Changed] - Make all Yoga headers public and add #ifdef __cplusplus

X-link: https://github.com/facebook/yoga/pull/1150

Reviewed By: dmitryrykun

Differential Revision: D36966687

Pulled By: cortinico

fbshipit-source-id: a34a54d56df43ab4934715070bab8e790b9abd39
2022-06-29 11:41:48 +02:00
Olivier Payenandfortmarek dc334a2baf Use monotonic clock for performance.now() (#33983)
Summary:
In https://github.com/facebook/react-native/pull/32695, the `Performance.now()` implementation changed to use unix epoch timestamps instead of a monotonic clock.

This is problematic, because it means that performance measurements get skewed if the device clock changes between two measurements.

With this change, the clock is now monotonic (and the implementation stays consistent between platforms).

More details and repro steps can be found in [this issue](https://github.com/facebook/react-native/issues/33977)
Closes https://github.com/facebook/react-native/issues/33977

## Changelog

[General] [Fixed] - Use monotonic clock for performance.now()

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

Test Plan:
Run on iOS and Android:
```
const now = global.performance.now()
console.log(`${Platform.OS}: ${now}`)
```

Reviewed By: JoshuaGross, cipolleschi

Differential Revision: D37066999

Pulled By: dmitryrykun

fbshipit-source-id: 298547bf39faea1b025c17ff2d2e1a03f929865b
2022-06-29 11:41:29 +02:00
Distiller 74a08a3d2c [0.69.0] Bump version numbers 2022-06-22 17:36:51 +00:00
Distiller e68aa6a019 [0.69.0-rc.6] Bump version numbers 2022-06-01 16:18:19 +00:00
Nicola Corti e8af5b8c4a Make sure sdks/.hermesversion is included inside the NPM package.
Summary:
The sdks/.hermesversion file should be included inside the React Native NPM package.
While this file is available on the release branch, so it's effectively used during artifact preparation,
the file should also be included inside the react-native NPM package.

This commit addresses it.

Changelog:
[Internal] - Make sure sdks/.hermesversion is included inside the NPM package

Reviewed By: dmitryrykun

Differential Revision: D36785480

fbshipit-source-id: 1152de77818e92814b402a57ca5a05c235747eac
2022-06-01 15:24:58 +01:00
Nicola CortiandGitHub 7262acc961 Fix Hermes not being downloaded on RC5 (#33945) 2022-06-01 15:14:39 +01:00
Distiller 6d200c32cb [0.69.0-rc.5] Bump version numbers 2022-05-31 12:27:32 +00:00
Nicola CortiandGitHub f50936bef2 Lazily query for git branch & remote (#33936) 2022-05-31 13:22:16 +01:00
fortmarek 88fa872896 Fix downloading prebuilt hermes from the Github release (#33935)
Summary:
This:
```ruby
source[:http] = `https://github.com/facebook/react-native/releases/download/v#{version}/hermes-runtime-darwin-v#{version}.tar.gz`
```
currently fails with the following error:
```
[!] Failed to load 'hermes-engine' podspec:
[!] Invalid `hermes-engine.podspec` file: No such file or directory - https://github.com/facebook/react-native/releases/download/v0.69.0-rc.4/hermes-runtime-darwin-v0.69.0-rc.4.tar.gz.
```

For some reasons, the string with backticks is treated differently than with double quotes since this works:
```ruby
source[:http] = "https://github.com/facebook/react-native/releases/download/v#{version}/hermes-runtime-darwin-v#{version}.tar.gz"
```

## 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
-->

[Internal] - Fix downloading prebuilt hermes from the Github release

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

Test Plan:
- `npx react-native init RN069RC4 --version 0.69.0-rc.4`
- in the created project, run `pod install` with hermes enabled
- run `git init && git add . && git commit -m "Initial commit" && git remote add origin https://github.com/fortmarek/some-fake-repository` (this is necessary due to an unrelated bug in the RC4)
- observe error
- update `node_modules/react-native/sdks/hermes-engine/hermes-engine.podspec` with the change from this commit
- run `pod install`
- 🎉

Reviewed By: dmitryrykun

Differential Revision: D36775047

Pulled By: cortinico

fbshipit-source-id: 3772adca32fe9898cde33c187d19b7b181af3677
2022-05-31 14:20:14 +02:00
Distiller 2c6df0209d [0.69.0-rc.4] Bump version numbers 2022-05-31 08:21:42 +00:00
Nicola Corti 0ca6e41059 Check isOnAReleaseTag alongside isOnAReleaseBranch 2022-05-30 17:42:25 +01:00
Nicola Corti 9a4e71621b Revert "[0.69.0-rc.4] Bump version numbers"
This reverts commit 5f50b0b407.
2022-05-30 17:15:24 +01:00
Distiller 5f50b0b407 [0.69.0-rc.4] Bump version numbers 2022-05-30 15:22:07 +00:00
Héctor RamosandNicola Corti 605c90ed36 Circle CI: Build Hermes apple runtime artifacts on CI (#33876)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/33876

WIP. Published so we can export and test on CI.

These two jobs can likely be merged onto the existing build_hermesc_macos job.

Changelog: [Internal]

Reviewed By: cipolleschi

Differential Revision: D36538847

fbshipit-source-id: e52c39ccfe652e70c54fd4892513c0060c3f021d
2022-05-30 15:06:54 +01:00
Nicola Corti 2a6832a7e3 Fix formatting for hermes-utils.js 2022-05-30 15:03:31 +01:00
Nicola Corti 659b693fcd Fix hermes-utils.js building from source when on the release branch 2022-05-30 14:57:14 +01:00
Nicola Corti a72d1960ff Fix hermes-engine.podspec building from source when on the release branch 2022-05-30 14:52:08 +01:00
Nicola Corti b33cc1fe2f Remove duplicate pod dependency on local hermes-engine 2022-05-30 14:42:31 +01:00
Nicola Corti 6759dc3bb5 Remove broken hermes-utils-test.js 2022-05-30 14:27:49 +01:00
Tommy Nguyenandfortmarek 9dded5edbe Fix pod install --project-directory=ios failing when Hermes is enabled (#33909)
Summary:
`pod install --project-directory=ios` silently fails to prep Hermes:

```
% pod install --project-directory=ios
[Codegen] Generating ios/build/generated/ios/React-Codegen.podspec.json
[Hermes] Downloading Hermes source code for commit 515e112edc267ad58d3c70991b3d9a721cc66b19
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
100 9478k    0 9478k    0     0  3939k      0 --:--:--  0:00:02 --:--:-- 5591k
[Hermes] Expanding Hermes tarball for commit 515e112edc267ad58d3c70991b3d9a721cc66b19
[Hermes] Using pre-built HermesC

[!] One or more resources were not found and will not be included in the project. If they are found later and you want to include them, run `pod install` again.
warn Multiple Podfiles were found: ios/Podfile,macos/Podfile. Choosing ios/Podfile automatically. If you would like to select a different one, you can configure it via "project.ios.sourceDir". You can learn more about it here: https://github.com/react-native-community/cli/blob/master/docs/configuration.md
Auto-linking React Native module for target `ReactTestApp`: ReactTestApp-DevSupport
Analyzing dependencies
Fetching podspec for `DoubleConversion` from `../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec`
[Codegen] Found FBReactNativeSpec
Fetching podspec for `RCT-Folly` from `../node_modules/react-native/third-party-podspecs/RCT-Folly.podspec`
Fetching podspec for `boost` from `../node_modules/react-native/third-party-podspecs/boost.podspec`
Fetching podspec for `glog` from `../node_modules/react-native/third-party-podspecs/glog.podspec`
[!] No podspec found for `hermes-engine` in `../node_modules/react-native/sdks/hermes/hermes-engine.podspec`

% ls -l node_modules/react-native/sdks
total 0
hermes-engine
hermesc
```

[iOS] [Fixed] - `pod install --project-directory=ios` fails when Hermes is enabled

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

Test Plan: Instead of running `pod install` inside `ios` folder, run `pod install --project-directory=ios`.

Reviewed By: cortinico

Differential Revision: D36693625

Pulled By: hramos

fbshipit-source-id: 8757a9c388348276b07c785c211979ec8f2e2f84
2022-05-30 15:09:40 +02:00
Nicola Cortiandfortmarek f44e0bf02f Remove shelljs dependency and duplicated scripts in files (#33915)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/33915

We don't need to import shelljs as a dependency anymore,
plus we had a duplicated entry in the files array for package.json

Changelog:
[Internal] [Changed] - Remove shelljs dependency and duplicated scripts in files

Reviewed By: dmitryrykun

Differential Revision: D36698750

fbshipit-source-id: 94f449f2c3c5d73d0f9ffd29df6b26f5fd6ef129
2022-05-30 15:08:08 +02:00
Héctor Ramosandfortmarek 6b1e193f15 Hermes: Use pre-built artifacts in hermes-engine
Summary:
Update `hermes-engine.podspec` to use pre-built Hermes artifacts from the corresponding React Native GitHub Release when targeting a specific React Native release.
Otherwise, fallback to building Hermes from source.

Changelog: [Internal]

Reviewed By: cortinico, cipolleschi

Differential Revision: D36609257

fbshipit-source-id: 6179c9e255558c7eaf1417ff46a2e7db120295f0
2022-05-30 15:07:56 +02:00
Héctor Ramosandfortmarek ea6706e166 Hermes: Add scripts to package, remove shelljs
Summary:
The new Hermes scripts need to be included in the `react-native` npm.

The `shelljs` dependency that was used by the Hermes scripts is a dev dependency, so instead of adding to the `react-native` npm size, we refactored its use out of hermes-utils.js.

Changelog:
[General][Added] - Add Hermes scripts to package

Reviewed By: cortinico

Differential Revision: D36387135

fbshipit-source-id: 12d0bc29d365c4cb18d33a0d390e6e7d34864b7a
2022-05-30 14:59:01 +02:00
Distiller 27751babe6 [0.69.0-rc.3] Bump version numbers 2022-05-24 15:35:09 +00:00
fortmarek ac1c7ad2e5 Fix hermes compilation in the react-native package (#33881)
Summary:
When releasing the latest RC, we have noticed `pod install` is broken since the downloaded `react-native` package is missing hermes scripts and `shelljs` dependency (needed by `hermes-utils.js`).

## 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
-->

[Internal] - Fix compiling hermes in the release version.

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

Test Plan: - Run `test-manual-e2e.sh` with template and Hermes on iOS

Reviewed By: GijsWeterings

Differential Revision: D36546116

Pulled By: cortinico

fbshipit-source-id: 70fe70de7d63193df888b8ece935c4fa97b4dfc8
2022-05-24 17:15:18 +02:00
Distiller 1eb90f52c7 [0.69.0-rc.2] Bump version numbers 2022-05-20 10:56:06 +00:00
Héctor Ramosandfortmarek 1dcdcbd4f2 iOS: Use pre-built hermesc if available (#33827)
Summary:
Use pre-built hermesc if available by generating a ImportHermesc.cmake file that points to the hermesc binary. Recent `react-native` releases should have hermesc available in sdks/hermesc.

Hermes build scripts have been updated to support a `HERMES_OVERRIDE_HERMESC_PATH` envvar which can point to this generated ImportHermesc.cmake file.

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

Changelog:
[iOS] [Changed] - Use pre-built HermesC if available in current React Native release

Reviewed By: cortinico

Differential Revision: D36024615

fbshipit-source-id: 476569f73309f9bd142f28cb02d1f7d57b6cbc6a
2022-05-20 12:49:03 +02:00
Héctor Ramosandfortmarek 3c634d82e5 Circle CI: Cache Hermes dirs in iOS jobs (#33828)
Summary:
Avoid re-building Hermes if a cache hit is found for the required Hermes version.

Cache sdks/hermes and sdks/hermesc in Circle CI iOS jobs: `test_ios_rntester`, `build_ios`, and `test_ios`.

`test_ios_rntester` "Install CocoaPod Dependencies" step reduced from 37m40s to 3m35s.

`test_ios` "Generate RNTesterPods workspace" step reduced from 36m54s to 1m34s.

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

Changelog: [Internal]

Reviewed By: cortinico

Differential Revision: D36365596

fbshipit-source-id: b5b6fe639f18b1724f80ab61c2262659c4987ff6
2022-05-20 12:48:45 +02:00
Héctor Ramosandfortmarek 2eaf7debd2 Hermes: Use prepare-hermes-for-build in Circle CI (#33811)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/33811

Use `scripts/hermes/prepare-hermes-for-build.js` in Circle CI, eliminating redundant steps in the `prepare_hermes_workspace` Circle CI job.

Changelog: [Internal]

Reviewed By: cipolleschi

Differential Revision: D36335122

fbshipit-source-id: b7e8c7aeb2aac5afaf37677cd3ac949ac3f96de1
2022-05-20 12:44:21 +02:00
Héctor Ramosandfortmarek 612dbb3094 Hermes: Use prepare-hermes-for-build in CocoaPods (#33825)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/33825

Updates the CocoaPods build scripts to consume the prepare-hermes-for-build script, replacing the now redundant set of Ruby code that would previously set the filesystem up.

Changelog:

[iOS] [Changed] - When building Hermes from source, the filesystem will now be prepared using the new hermes-utils.js scripts, outside of CocoaPods

Reviewed By: cortinico

Differential Revision: D36336633

fbshipit-source-id: a4506db80c039529b14b0290d2f0b54fae78dcf2
2022-05-20 12:44:15 +02:00
Héctor Ramosandfortmarek 78b38429a4 Hermes: Create prepare-hermes-for-build.js script
Summary:
Adds a script that uses the new hermes-utils.js functions to prepare the local filesystem for Hermes to be built from source (e.g. download the Hermes source code tarball and extract it into its final location).

Changelog: [Internal]

Reviewed By: cortinico

Differential Revision: D36334624

fbshipit-source-id: 012f758ecda07931bdb0ab1728b87733bf5af16a
2022-05-20 12:44:10 +02:00
Héctor Ramosandfortmarek fc767f7ef1 Hermes: Consolidate Hermes build scripts into scripts/hermes/hermes-utils.js
Summary:
Currently, the tasks for downloading, expanding, and preparing Hermes to be built for Apple targets are split across the Circle CI and CocoaPods configs.

This diff sets out to consolidate these tasks into a single hermes-utils.js script that can be reused across CI and build systems.

The release script that is used to assign the Hermes tag for a given React Native version has been moved into `scripts/hermes`.

Changelog: [Internal]

Reviewed By: cortinico

Differential Revision: D36329356

fbshipit-source-id: 0222070adf201fa533b607a183471396d45c6caf
2022-05-20 12:44:04 +02:00
Héctor Ramosandfortmarek e782bd12e8 Fix shellcheck warnings in Hermes build scripts
Summary:
Fixes some shellcheck warnings that arose in D36295406 (https://github.com/facebook/react-native/commit/ae28880fbc6b5c03c324be7dc0eeb80827ad2299) when the Hermes build scripts were copied over.

Changelog: [Internal]

Reviewed By: cortinico

Differential Revision: D36321074

fbshipit-source-id: 0eae36a4f793daa0e12786ba7989d4eac6b2e256
2022-05-20 12:44:00 +02:00
Héctor Ramosandfortmarek 1181079df5 Remove Pod::UI undefined symbol warning during Hermes build
Summary:
The `utils/build-apple-framework.sh` script uses the ruby runtime to load `hermes-engine.podspec`, and in the process it will load the Core CocoaPods gem to parse the podspec file.

Since the podspec file uses Pod::UI to print logs, and the CoreUI gem is not loaded when `build-apple-framework.sh` accesses `hermes-engine.podspec`, we would get a warning due to Pod::UI not being defined.

This change will only use Pod::UI when it is defined, therefore limiting it to only executing when `hermes-engine.podspec` is loaded as part of the normal `pod install` build process.

Changelog: [Internal]

Reviewed By: cortinico, neildhar

Differential Revision: D36297856

fbshipit-source-id: ac1ab021f74f9dcaa7be2a2358482c73b827b756
2022-05-20 12:43:54 +02:00
Héctor Ramosandfortmarek 7f23aa4b02 Hermes: Always use Unix Makefiles for Apple build, and use all available cores
Summary:
Hermes' build scripts use the Ninja build utility if available, otherwise they default to Unix Makefiles. When Unix Makefiles were used, builds would take far too long due to the use of a single core.

To reduce the surface area of issues that may arise as we switch to building Hermes from source, we will now focus on a single build system using Unix Makefiles. We will also ensure all available cores are used when building on macOS.

Changelog: [Internal]

Reviewed By: cortinico, neildhar

Differential Revision: D36296838

fbshipit-source-id: 4be23739fb022e3ae8e974ad3c2c70e7011abb5a
2022-05-20 12:43:49 +02:00
Héctor Ramosandfortmarek 7382b4d72f Hermes: Copy build scripts to RN
Summary:
Copy Hermes build scripts to React Native repository for greater control over the build pipeline when used in RN.

Changelog: [Internal]

Reviewed By: neildhar

Differential Revision: D36295406

fbshipit-source-id: 54bf4173b6c75db35de828378e6f5782a248ed2e
2022-05-20 12:43:44 +02:00
fortmarek 20f8d134c7 Bump Hermes version 2022-05-20 12:37:01 +02:00
Dmitry Rykunandfortmarek 2d9ce44adb Fix Circle CI test_ios_template (#33761)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/33761

Changelog:
[General][Fixed] - Add 'mkdirp' as a direct dependency to 'react-native' instead of assuming it being a transitive dependency of some other module.

Reviewed By: cortinico, cipolleschi

Differential Revision: D36138320

fbshipit-source-id: b2421aa6b22fca0b813bbb5bb0c7213540ca578d
2022-05-20 12:31:58 +02:00
Michał Pierzchałaandfortmarek 5f2e92bac6 Upgrade RN CLI to v8.0.0 (#33859)
Summary:
Upgrades the React Native CLI to v8 stable version. cc fortmarek kelset cortinico

To be cherry-picked in 0.69.

## Changelog

[General] [Changed] - Upgrade RN CLI to v8.0.0

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

Test Plan: CI

Reviewed By: dmitryrykun

Differential Revision: D36476124

Pulled By: cortinico

fbshipit-source-id: c2b71fcfe1850539ed8d685351c0cd88c283373b
2022-05-20 12:31:44 +02:00
Tommy Nguyenandfortmarek fb1001ce58 fix: remove unactionable warning when on 'Paper' (#33830)
Summary:
We are currently seeing warning `Native Component 'X' that calls codegenNativeComponent was not code generated at build time. Please check its definition.` even though we have not opted into Fabric. This warning is not actionable and is just noisy.

See also discussion: https://github.com/reactwg/react-native-releases/discussions/21#discussioncomment-2657180

## Changelog

[General] [Fixed] - Remove unactionable warning about `codegenNativeComponent` when on 'Paper'

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

Test Plan: n/a

Reviewed By: dmitryrykun

Differential Revision: D36377844

Pulled By: cortinico

fbshipit-source-id: 23c9f9dbf0ce1cea60c5dc8caa02d0dc53bd635d
2022-05-20 12:31:21 +02:00
fortmarek f811da7cc2 fix: bump flipper pods to get arm64 catalyst slice (#33809) 2022-05-20 12:31:02 +02:00
fortmarek 06ec3aac79 Revert "Merge pull request #33819 from facebook/tido/fix-pod-install-0.69"
This reverts commit f88037381b, reversing
changes made to 3310ccd2a6.
2022-05-20 12:24:32 +02:00
Héctor RamosandGitHub f88037381b Merge pull request #33819 from facebook/tido/fix-pod-install-0.69
Fix `pod install --project-directory=ios` failing when Hermes is enabled
2022-05-17 16:55:35 -07:00
Tommy Nguyen 1b22e8a039 Fix pod install --project-directory=ios failing when Hermes is enabled 2022-05-12 16:26:38 +02:00
Distiller 3310ccd2a6 [0.69.0-rc.1] Bump version numbers 2022-05-11 10:11:04 +00:00
Héctor Ramosandfortmarek 8c6da6b025 Hermes: Warn user about longer pod install times when Hermes is enabled
Summary:
Adjust logs during `pod install` to warn user about longer install times due to Hermes compilation.

Changelog: [Internal]

Reviewed By: cortinico

Differential Revision: D36143766

fbshipit-source-id: 0facb2e295543438dfbc46d11db1c4dc163acff9
2022-05-11 12:04:30 +02:00
Héctor Ramosandfortmarek 0bcb6e1b4d Circle CI: Cache Hermes builds
Summary:
Use Circle CI caching to avoid re-building Hermes. The cache key will be determined by the Hermes tag specified in sdks/.hermesversion; if the file does not exist (as is the case in builds from main), the commit sha for the latest Hermes commit from facebook/hermes will be used.

This should significantly speed up builds across all workflows: builds from main (commitlies), nightlies, and release builds.

Changelog: [Internal]

Reviewed By: cortinico, cipolleschi

Differential Revision: D36158296

fbshipit-source-id: b80457fdefad0d63e62feeb4d509265e2762f253
2022-05-11 12:04:22 +02:00
Héctor Ramosandfortmarek bebef4c43e Hermes: Use Hermes commit sha as part of pod version
Summary:
Customize the Hermes version exposed to CocoaPods with one that refers to the facebook/hermes commit sha from which Hermes was built.

Changelog: [Internal]

Reviewed By: cortinico

Differential Revision: D36145140

fbshipit-source-id: 4ff7546d2335ea6642dd9b10f4b7a9aba260d550
2022-05-11 12:04:17 +02:00
Nicola Cortiandfortmarek ff4a1b144e Store Hermes Debug Symbols inside CircleCI (#33779)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/33779

This diff adds a `store_artifacts` to CircleCI so the Hermes debug symbols are retained and can be used to symbolicate native crashes for Hermes.

Changelog:
[Internal] [Changed] - Store Hermes Debug Symbols inside CircleCI

Reviewed By: cipolleschi

Differential Revision: D36201978

fbshipit-source-id: ef9a71e2953180aef5caea9f5eb0047190ed6198
2022-05-11 12:04:11 +02:00
Kudo Chienandfortmarek 2e7ba66087 add back hermes inspector support (#33778)
Summary:
the `WITH_INSPECTOR` build flag is missing from cmake migration. original we had it in [Application.mk](https://github.com/facebook/react-native/blob/ed46ea2058b909a2dd401347d68956324961ec2c/ReactAndroid/src/main/jni/Application.mk#L29)

this pr adds back the build flag and make hermes inspector (or debugging hermes in flipper) work again.

## Changelog

[Android] [Fixed] - add back hermes inspector support

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

Test Plan: test on rn-tester hermes variant

Reviewed By: cipolleschi

Differential Revision: D36204525

Pulled By: cortinico

fbshipit-source-id: 417874a7d0e05b5ee886f3160d526ff9c2df44ee
2022-05-11 12:04:06 +02:00
fortmarek 9a2692f34b Fix using Swift in a native module with Fabric enabled (#33743)
Summary:
Using Fabric with a Swift native module is currently broken. There are currently two issues.

If you try to integrate a native module with Swift code, you will get the following error when running `pod install` with Fabric enabled:
```
[!] The following Swift pods cannot yet be integrated as static libraries:

The Swift pod `MyNativeView` depends upon `React-RCTFabric`, `React-Codegen`, `RCTTypeSafety`, and `ReactCommon`, which do not define modules.
To opt into those targets generating module maps (which is necessary to import them from Swift when building as static libraries),
you may set `use_modular_headers!` globally in your Podfile, or specify `:modular_headers => true` for particular dependencies.
```

To resolve this, I have applied the suggestion from the error (set `:modular_headers => true` for the appropriate modules inside `react_native_pods.rb`.

Afterwards, `pod install` succeeds but I still got `Redefinition of module 'React'` during the build due to the conflict inside the generated modulesmaps  `React-Core.modulemap` and `React-RCTFabric.modulemap`. This makes sense since `React-RCTFabric.podspec` has `s.header_dir = "React"` (see [here](https://github.com/facebook/react-native/blob/main/React/React-RCTFabric.podspec#L37)) and the module inherits that. However, we can explicitly specify `module_name` for the podspec which is what I have done. I have named the module `Fabric`, let me know if you think there's a better name.

## 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
-->

[iOS] [Fixed] - Fix using Swift in a native module with Fabric enabled

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

Test Plan:
1. Clone [this](https://github.com/fortmarek/react-native) repo
2. From `main`, apply changes from [this](https://github.com/fortmarek/react-native/commit/26958fccf4b4ac90d0bf9bb3699f12760a6b2b58) commit (adding Swift file to the `MyNativeView` native module in the RN tester app)
3. Try to run `USE_FABRIC=1 RCT_NEW_ARCH_ENABLED=1 USE_CODEGEN_DISCOVERY=1 USE_HERMES=0 bundle exec pod install` inside the `packages/rn-tester`
4. Observe errors
5. Apply [the commit](https://github.com/facebook/react-native/commit/9772c6209d73257f679b76407e1b5a27ffe03219) from this PR
6. Both pod install and the subsequent build should succeed.

I can also make changes to the current `MyNativeView` module to include Swift as well if it's something that the React Native Core team would be interested in - in case you want the Swift native modules to be always buildable on `main`

Reviewed By: dmitryrykun

Differential Revision: D36097852

Pulled By: cipolleschi

fbshipit-source-id: 2faebcffd1115339f89a406e265a6a040218dc9c
2022-05-11 12:04:00 +02:00
Rick Hanlonandfortmarek 3ba23ca362 Replace use-subscripton with use-sync-external-store (#33770)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/33770

React has replaced use-subscription with the React 18 compatible use-sync-external-store.

Changelog:
[General][Changed] - Replace use-subscripton with use-sync-external-store

Reviewed By: ryancat

Differential Revision: D35592432

fbshipit-source-id: cc2016f66940e53f3614e110bafb02240bae1ae4
2022-05-11 12:03:52 +02:00
Michał Pierzchałaandfortmarek a1388c8bd6 Upgrade RN CLI to v8 alpha.5 (#33755)
Summary:
Upgrades the React Native CLI to v8 alpha.5. Includes Metro bump to 0.70.2 cc fortmarek kelset cortinico

## Changelog

[General] [Changed] - Upgrade RN CLI to v8 alpha.5

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

Test Plan: CI

Reviewed By: motiz88, cipolleschi

Differential Revision: D36128899

Pulled By: cortinico

fbshipit-source-id: b9ce0b4f9fef356141a79be9ccdcabd841d6d1ea
2022-05-11 12:03:46 +02:00
Héctor Ramosandfortmarek db7ddd50b7 Hermes: Include sdks/hermes-engine.podspec in release
Summary:
This file was added in D35300595 (https://github.com/facebook/react-native/commit/ada6c7166b507b950e63723f78bd550cb8303211) and it needs to be part of the `react-native` release.

Changelog: [Internal]

Reviewed By: fkgozali

Differential Revision: D35983108

fbshipit-source-id: 0a1c437b953e575c0229b0382743c72b6c91bd0b
2022-05-11 12:03:32 +02:00
Nicola Corti df97a48005 Bump used version of react-native-codegen to 0.69.1 2022-05-11 11:01:49 +01:00
Nicola Corti dc2c034e32 Bump react-native-codegen to 0.69.1 2022-05-11 10:58:54 +01:00
7b76abc0d3 [Main][Windows] Working around Long paths limitation on Windows (#33707)
Co-authored-by: Aleš Pergl <alespergl@users.noreply.github.com>
Co-authored-by: Ales Pergl <alpergl@microsoft.com>
2022-05-11 10:58:15 +01:00
Nicola Corti a862d9294b Bump used version of react-native-codegen to 0.69.0 & React to 18.0.0 2022-05-09 11:51:22 +01:00
Nicola Corti a98f5e6e50 Bump react-native-codegen to 0.69.0 2022-05-09 11:41:03 +01:00
Distiller 6efb51777c [0.69.0-rc.0] Bump version numbers 2022-04-28 14:12:53 +00:00
Nicola Corti f3a4484a11 Add to all the release steps 2022-04-28 16:03:57 +02:00
Nicola Corti fc3040b2b6 Revert "[0.69.0-rc.0] Bump version numbers"
This reverts commit 9af395e913.
2022-04-28 16:01:41 +02:00
Distiller 9af395e913 [0.69.0-rc.0] Bump version numbers 2022-04-28 12:23:22 +00:00
fortmarek e5f5571f63 Bump Hermes version 2022-04-28 14:16:20 +02:00
115 changed files with 2003 additions and 1425 deletions
+189 -99
View File
@@ -246,6 +246,28 @@ commands:
name: Report size of RNTester.app (analysis-bot)
command: GITHUB_TOKEN="$PUBLIC_ANALYSISBOT_GITHUB_TOKEN_A""$PUBLIC_ANALYSISBOT_GITHUB_TOKEN_B" scripts/circleci/report-bundle-size.sh << parameters.platform >> || true
with_hermes_sdk_cache_span:
parameters:
steps:
type: steps
steps:
- run:
name: Setup Hermes cache
command: |
HERMES_CACHE_KEY_FILE="sdks/.hermes-cache-key-file"
if [ ! -f "$HERMES_CACHE_KEY_FILE" ]; then
git ls-remote https://github.com/facebook/hermes main | cut -f 1 > $HERMES_CACHE_KEY_FILE
fi
- restore_cache:
keys:
- v1-hermes-{{ .Environment.CIRCLE_JOB }}-{{ checksum "sdks/.hermes-cache-key-file" }}
- steps: << parameters.steps >>
- save_cache:
key: v1-hermes-{{ .Environment.CIRCLE_JOB }}-{{ checksum "sdks/.hermes-cache-key-file" }}
paths:
- sdks/hermesc
- sdks/hermes
# -------------------------
# JOBS
# -------------------------
@@ -417,17 +439,19 @@ jobs:
- with_brew_cache_span:
steps:
- brew_install:
package: cmake ninja
package: cmake
- run:
name: Setup the CocoaPods environment
command: bundle exec pod setup
- with_rntester_pods_cache_span:
- with_hermes_sdk_cache_span:
steps:
- run:
name: Generate RNTesterPods Workspace
command: cd packages/rn-tester && bundle exec pod install --verbose
- with_rntester_pods_cache_span:
steps:
- run:
name: Generate RNTesterPods Workspace
command: cd packages/rn-tester && bundle exec pod install --verbose
# -------------------------
# JOBS: iOS Unit Tests
@@ -470,7 +494,7 @@ jobs:
- with_brew_cache_span:
steps:
- brew_install:
package: watchman cmake ninja
package: watchman cmake
- run:
name: "Brew: Tap wix/brew"
command: brew tap wix/brew >/dev/null
@@ -500,11 +524,13 @@ jobs:
name: Setup the CocoaPods environment
command: bundle exec pod setup
- with_rntester_pods_cache_span:
- with_hermes_sdk_cache_span:
steps:
- run:
name: Generate RNTesterPods Workspace
command: cd packages/rn-tester && bundle exec pod install --verbose
- with_rntester_pods_cache_span:
steps:
- run:
name: Generate RNTesterPods Workspace
command: cd packages/rn-tester && bundle exec pod install --verbose
# -------------------------
# Runs iOS unit tests
@@ -741,13 +767,15 @@ jobs:
- with_brew_cache_span:
steps:
- brew_install:
package: cmake ninja
package: cmake
- run:
name: Install CocoaPods dependencies
command: |
rm -rf packages/rn-tester/Pods
cd packages/rn-tester && bundle exec pod install
- with_hermes_sdk_cache_span:
steps:
- run:
name: Install CocoaPods dependencies
command: |
rm -rf packages/rn-tester/Pods
cd packages/rn-tester && bundle exec pod install
# The macOS machine can run out of storage if Hermes is enabled and built from source.
# Since this job does not use the iOS Simulator, deleting it provides a quick way to
@@ -877,33 +905,45 @@ jobs:
# -------------------------
prepare_hermes_workspace:
docker:
- image: debian:buster
- image: debian:bullseye
environment:
- HERMES_WS_DIR: *hermes_workspace_root
- HERMES_VERSION_FILE: "sdks/.hermesversion"
steps:
- checkout
- run:
name: Install dependencies
command: |
apt-get update
apt-get install -y wget git
apt update
apt install -y wget git curl
curl -sL https://deb.nodesource.com/setup_16.x | bash -
apt install -y nodejs
npm install --global yarn
- checkout
- run_yarn
- run:
name: Set up Hermes workspace
command: mkdir -p "$HERMES_WS_DIR/hermes" "$HERMES_WS_DIR/download"
name: Set up Hermes workspace and caching
command: |
mkdir -p "/tmp/hermes" "/tmp/hermes/download" "/tmp/hermes/hermes"
if [ -f "$HERMES_VERSION_FILE" ]; then
cat $HERMES_VERSION_FILE > /tmp/hermes/hermesversion
else
HERMES_TAG_SHA=$(git ls-remote https://github.com/facebook/hermes main | cut -f 1 | tr -d '[:space:]')
echo $HERMES_TAG_SHA > /tmp/hermes/hermesversion
fi
- restore_cache:
key: v1-hermes-{{ .Environment.CIRCLE_JOB }}-{{ checksum "/tmp/hermes/hermesversion" }}
- run:
name: Download Hermes tarball
command: |
HERMES_VERSION_FILE="sdks/.hermesversion"
HERMES_TARBALL_URL="https://github.com/facebook/hermes/archive/refs/heads/main.tar.gz"
if [ -f "$HERMES_VERSION_FILE" ]; then
HERMES_TAG=$(cat $HERMES_VERSION_FILE | tr -d '[:space:]')
HERMES_TARBALL_URL="https://github.com/facebook/hermes/archive/refs/tags/$HERMES_TAG.tar.gz"
echo "Using Hermes version tagged $HERMES_TAG"
else
echo "Using Hermes latest version from trunk"
fi
wget --timestamping -O "$HERMES_WS_DIR/download/hermes.tar.gz" "$HERMES_TARBALL_URL"
tar -xzf "$HERMES_WS_DIR/download/hermes.tar.gz" --strip-components=1 -C "$HERMES_WS_DIR/hermes"
node scripts/hermes/prepare-hermes-for-build $CIRCLE_PULL_REQUEST
cp sdks/download/* $HERMES_WS_DIR/download/.
cp -r sdks/hermes/* $HERMES_WS_DIR/hermes/.
- save_cache:
key: v1-hermes-{{ .Environment.CIRCLE_JOB }}-{{ checksum "/tmp/hermes/hermesversion" }}
paths:
- /tmp/hermes/download/
- /tmp/hermes/hermes/
- persist_to_workspace:
root: *hermes_workspace_root
paths:
@@ -924,6 +964,8 @@ jobs:
apt install -y git openssh-client cmake build-essential \
libreadline-dev libicu-dev zip python3
- *attach_hermes_workspace
- restore_cache:
key: v1-hermes-{{ .Environment.CIRCLE_JOB }}-{{ checksum "/tmp/hermes/hermesversion" }}
- run:
name: Set up workspace
command: |
@@ -931,15 +973,21 @@ jobs:
- run:
name: Build HermesC for Linux
command: |
cd /tmp/hermes
cmake -S hermes -B build -DHERMES_STATIC_LINK=ON -DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INTERPROCEDURAL_OPTIMIZATION=True -DCMAKE_CXX_FLAGS=-s -DCMAKE_C_FLAGS=-s \
-DCMAKE_EXE_LINKER_FLAGS="-Wl,--whole-archive -lpthread -Wl,--no-whole-archive"
cmake --build build --target check-hermes -j 4
- run:
name: Package HermesC for Linux
command: |
cp /tmp/hermes/build/bin/hermesc /tmp/hermes/linux64-bin/.
if [ -f /tmp/hermes/linux64-bin/hermesc ]; then
echo 'Skipping; Clean "/tmp/hermes/linux64-bin" to rebuild.'
else
cd /tmp/hermes
cmake -S hermes -B build -DHERMES_STATIC_LINK=ON -DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INTERPROCEDURAL_OPTIMIZATION=True -DCMAKE_CXX_FLAGS=-s -DCMAKE_C_FLAGS=-s \
-DCMAKE_EXE_LINKER_FLAGS="-Wl,--whole-archive -lpthread -Wl,--no-whole-archive"
cmake --build build --target check-hermes -j 4
cp /tmp/hermes/build/bin/hermesc /tmp/hermes/linux64-bin/.
fi
- save_cache:
key: v1-hermes-{{ .Environment.CIRCLE_JOB }}-{{ checksum "/tmp/hermes/hermesversion" }}
paths:
- /tmp/hermes/linux64-bin/
- /tmp/hermes/hermes/destroot/
- store_artifacts:
path: /tmp/hermes/linux64-bin/
- persist_to_workspace:
@@ -947,30 +995,59 @@ jobs:
paths:
- linux64-bin
build_hermesc_macos:
build_hermes_macos:
executor: reactnativeios
environment:
- HERMES_WS_DIR: *hermes_workspace_root
steps:
- checkout
- *attach_hermes_workspace
- restore_cache:
key: v1-hermes-{{ .Environment.CIRCLE_JOB }}-{{ checksum "/tmp/hermes/hermesversion" }}
- run:
name: Set up workspace
command: |
mkdir -p /tmp/hermes/osx-bin
mkdir -p ~/react-native/sdks/hermes
cp -r $HERMES_WS_DIR/hermes/* ~/react-native/sdks/hermes/.
- run:
name: Install dependencies
command: |
brew install cmake ninja
brew install cmake
- run:
name: Build HermesC for macOS
name: Build the Hermes iOS frameworks
command: |
cd "$HERMES_WS_DIR/hermes"
cd ~/react-native/sdks/hermes
./utils/build-ios-framework.sh
- run:
name: Build the Hermes Mac frameworks
command: |
cd ~/react-native/sdks/hermes
./utils/build-mac-framework.sh
- run:
name: Package HermesC for macOS
command: |
cd "$HERMES_WS_DIR/hermes"
cp build_macosx/bin/hermesc /tmp/hermes/osx-bin/.
- run:
name: Package the Hermes Apple frameworks
command: |
cd ~/react-native/sdks/hermes
. ./utils/build-apple-framework.sh
mkdir -p /tmp/cocoapods-package-root/destroot
mkdir -p /tmp/hermes/output
cp -R ./destroot /tmp/cocoapods-package-root
cp LICENSE /tmp/cocoapods-package-root
tar -C /tmp/cocoapods-package-root/ -czvf /tmp/hermes/output/hermes-runtime-darwin-v$(get_release_version).tar.gz .
- save_cache:
key: v1-hermes-{{ .Environment.CIRCLE_JOB }}-{{ checksum "/tmp/hermes/hermesversion" }}
paths:
- ~/react-native/hermes/build_host_hermesc
- ~/react-native/hermes/build_iphoneos
- ~/react-native/hermes/build_catalyst
- ~/react-native/hermes/build_iphonesimulator
- ~/react-native/hermes/build_macosx
- ~/react-native/hermes/destroot
- store_artifacts:
path: /tmp/hermes/output/
- store_artifacts:
path: /tmp/hermes/osx-bin/
- persist_to_workspace:
@@ -989,6 +1066,8 @@ jobs:
- CMAKE_DIR: 'C:\Program Files\CMake\bin'
steps:
- *attach_hermes_workspace
- restore_cache:
key: v1-hermes-{{ .Environment.CIRCLE_JOB }}-{{ checksum "tmp/hermes/hermesversion" }}
- run:
name: Set up workspace
command: |
@@ -997,53 +1076,57 @@ jobs:
New-Item -ItemType Directory $Env:HERMES_WS_DIR\deps
New-Item -ItemType Directory $Env:HERMES_WS_DIR\win64-bin
New-Item -ItemType SymbolicLink -Target tmp\hermes\hermes -Path $Env:HERMES_WS_DIR -Name hermes
- run:
name: Download ICU
command: |
cd $Env:HERMES_WS_DIR\icu
# If Invoke-WebRequest shows a progress bar, it will fail with
# Win32 internal error "Access is denied" 0x5 occurred [...]
$progressPreference = 'silentlyContinue'
Invoke-WebRequest -Uri "$Env:ICU_URL" -OutFile "icu.zip"
Expand-Archive -Path "icu.zip" -DestinationPath "."
- run:
name: Install dependencies
command: |
choco install --no-progress cmake --version 3.14.7
if (-not $?) { throw "Failed to install CMake" }
choco install --no-progress python3
if (-not $?) { throw "Failed to install Python" }
- run:
name: Assemble Windows runtime dependencies
command: |
cd $Env:HERMES_WS_DIR
Copy-Item -Path "icu\bin64\icu*.dll" -Destination "deps"
# Include MSVC++ 2015 redistributables
Copy-Item -Path "c:\windows\system32\msvcp140.dll" -Destination "deps"
Copy-Item -Path "c:\windows\system32\vcruntime140.dll" -Destination "deps"
Copy-Item -Path "c:\windows\system32\vcruntime140_1.dll" -Destination "deps"
- run:
name: Build HermesC for Windows
command: |
$Env:PATH += ";$Env:CMAKE_DIR;$Env:MSBUILD_DIR"
$Env:ICU_ROOT = "$Env:HERMES_WS_DIR\icu"
cd $Env:HERMES_WS_DIR
cmake -S hermes -B build_release -G 'Visual Studio 16 2019' -Ax64 -DCMAKE_BUILD_TYPE=Release -DCMAKE_INTERPROCEDURAL_OPTIMIZATION=True -DHERMES_ENABLE_WIN10_ICU_FALLBACK=OFF
if (-not $?) { throw "Failed to configure Hermes" }
cd build_release
cmake --build . --target hermesc --config Release
if (-not $?) { throw "Failed to build Hermes" }
- run:
name: Package HermesC for Windows
command: |
cd $Env:HERMES_WS_DIR
Copy-Item -Path "build_release\bin\Release\hermesc.exe" -Destination "win64-bin"
# Include Windows runtime dependencies
Copy-Item -Path "deps\*" -Destination "win64-bin"
if (-not(Test-Path -Path $Env:HERMES_WS_DIR\win64-bin\hermesc.exe)) {
choco install --no-progress cmake --version 3.14.7
if (-not $?) { throw "Failed to install CMake" }
choco install --no-progress python3
if (-not $?) { throw "Failed to install Python" }
cd $Env:HERMES_WS_DIR\icu
# If Invoke-WebRequest shows a progress bar, it will fail with
# Win32 internal error "Access is denied" 0x5 occurred [...]
$progressPreference = 'silentlyContinue'
Invoke-WebRequest -Uri "$Env:ICU_URL" -OutFile "icu.zip"
Expand-Archive -Path "icu.zip" -DestinationPath "."
cd $Env:HERMES_WS_DIR
Copy-Item -Path "icu\bin64\icu*.dll" -Destination "deps"
# Include MSVC++ 2015 redistributables
Copy-Item -Path "c:\windows\system32\msvcp140.dll" -Destination "deps"
Copy-Item -Path "c:\windows\system32\vcruntime140.dll" -Destination "deps"
Copy-Item -Path "c:\windows\system32\vcruntime140_1.dll" -Destination "deps"
$Env:PATH += ";$Env:CMAKE_DIR;$Env:MSBUILD_DIR"
$Env:ICU_ROOT = "$Env:HERMES_WS_DIR\icu"
cmake -S hermes -B build_release -G 'Visual Studio 16 2019' -Ax64 -DCMAKE_BUILD_TYPE=Release -DCMAKE_INTERPROCEDURAL_OPTIMIZATION=True -DHERMES_ENABLE_WIN10_ICU_FALLBACK=OFF
if (-not $?) { throw "Failed to configure Hermes" }
cd build_release
cmake --build . --target hermesc --config Release
if (-not $?) { throw "Failed to build Hermes" }
cd $Env:HERMES_WS_DIR
Copy-Item -Path "build_release\bin\Release\hermesc.exe" -Destination "win64-bin"
# Include Windows runtime dependencies
Copy-Item -Path "deps\*" -Destination "win64-bin"
}
else {
Write-Host "Skipping; Clean c:\tmp\hermes\win64-bin to rebuild."
}
- save_cache:
key: v1-hermes-{{ .Environment.CIRCLE_JOB }}-{{ checksum "tmp/hermes/hermesversion" }}
paths:
- C:\tmp\hermes\win64-bin\
- C:\tmp\hermes\hermes\icu\
- C:\tmp\hermes\hermes\deps\
- C:\tmp\hermes\hermes\build_release\
- store_artifacts:
path: c:\tmp\hermes\win64-bin\
path: C:\tmp\hermes\win64-bin\
- persist_to_workspace:
root: c:\tmp\hermes\
root: C:\tmp\hermes\
paths:
- win64-bin
@@ -1116,6 +1199,11 @@ jobs:
# END: Stables and nightlies
- run: node ./scripts/publish-npm.js << parameters.publish_npm_args >>
- run:
name: Zip Hermes Native Symbols
command: zip -r /tmp/hermes-native-symbols.zip ~/react-native/ReactAndroid/hermes-engine/build/intermediates/cmake/
- store_artifacts:
path: /tmp/hermes-native-symbols.zip
# START: Commitlies
# Provide a react-native package for this commit as a Circle CI release artifact.
@@ -1211,7 +1299,7 @@ workflows:
- build_hermesc_linux:
requires:
- prepare_hermes_workspace
- build_hermesc_macos:
- build_hermes_macos:
requires:
- prepare_hermes_workspace
- build_hermesc_windows:
@@ -1222,7 +1310,7 @@ workflows:
publish_npm_args: --dry-run
requires:
- build_hermesc_linux
- build_hermesc_macos
- build_hermes_macos
- build_hermesc_windows
- test_js:
run_disabled_tests: false
@@ -1273,12 +1361,15 @@ workflows:
- prepare_hermes_workspace:
filters: *only_release_tags
- build_hermesc_linux:
filters: *only_release_tags
requires:
- prepare_hermes_workspace
- build_hermesc_macos:
- build_hermes_macos:
filters: *only_release_tags
requires:
- prepare_hermes_workspace
- build_hermesc_windows:
filters: *only_release_tags
requires:
- prepare_hermes_workspace
# This job will trigger when a version tag is pushed (by package_release)
@@ -1289,7 +1380,7 @@ workflows:
filters: *only_release_tags
requires:
- build_hermesc_linux
- build_hermesc_macos
- build_hermes_macos
- build_hermesc_windows
analysis:
@@ -1323,16 +1414,15 @@ workflows:
- build_hermesc_linux:
requires:
- prepare_hermes_workspace
- build_hermesc_macos:
- build_hermes_macos:
requires:
- prepare_hermes_workspace
- build_hermesc_windows:
requires:
- prepare_hermes_workspace
- build_npm_package:
publish_npm_args: --nightly
requires:
- build_hermesc_linux
- build_hermesc_macos
- build_hermes_macos
- build_hermesc_windows
+2 -2
View File
@@ -115,9 +115,9 @@ package-lock.json
/packages/rn-tester/NativeModuleExample/ScreenshotManagerSpec*
# Additional SDKs
/sdks/.hermesversion
/sdks/hermes
/sdks/download
/sdks/hermes
/sdks/hermesc
# Visual studio
.vscode
+1 -1
View File
@@ -759,7 +759,7 @@ rn_library(
"//xplat/js:node_modules__react_19shallow_19renderer",
"//xplat/js:node_modules__regenerator_19runtime",
"//xplat/js:node_modules__stacktrace_19parser",
"//xplat/js:node_modules__use_19subscription",
"//xplat/js:node_modules__use_19sync_19external_19store",
"//xplat/js:node_modules__whatwg_19fetch",
"//xplat/js/RKJSModules/Libraries/Polyfills:Polyfills",
"//xplat/js/RKJSModules/Libraries/React:React",
+10 -10
View File
@@ -3,7 +3,7 @@ GEM
specs:
CFPropertyList (3.0.5)
rexml
activesupport (6.1.5)
activesupport (6.1.6.1)
concurrent-ruby (~> 1.0, >= 1.0.2)
i18n (>= 1.6, < 2)
minitest (>= 5.1)
@@ -45,7 +45,7 @@ GEM
public_suffix (~> 4.0)
typhoeus (~> 1.0)
cocoapods-deintegrate (1.0.5)
cocoapods-downloader (1.6.1)
cocoapods-downloader (1.6.3)
cocoapods-plugins (1.0.0)
nap
cocoapods-search (1.0.1)
@@ -63,29 +63,29 @@ GEM
fuzzy_match (2.0.4)
gh_inspector (1.1.3)
httpclient (2.8.3)
i18n (1.10.0)
i18n (1.12.0)
concurrent-ruby (~> 1.0)
json (2.6.1)
minitest (5.15.0)
json (2.6.2)
minitest (5.16.2)
molinillo (0.8.0)
nanaimo (0.3.0)
nap (1.1.0)
netrc (0.11.0)
public_suffix (4.0.6)
public_suffix (4.0.7)
rexml (3.2.5)
ruby-macho (2.5.1)
typhoeus (1.4.0)
ethon (>= 0.9.0)
tzinfo (2.0.4)
tzinfo (2.0.5)
concurrent-ruby (~> 1.0)
xcodeproj (1.21.0)
xcodeproj (1.22.0)
CFPropertyList (>= 2.3.3, < 4.0)
atomos (~> 0.1.3)
claide (>= 1.0.2, < 2.0)
colored2 (~> 3.1)
nanaimo (~> 0.3.0)
rexml (~> 3.2.4)
zeitwerk (2.5.4)
zeitwerk (2.6.0)
PLATFORMS
ruby
@@ -97,4 +97,4 @@ RUBY VERSION
ruby 2.7.5p203
BUNDLED WITH
2.3.10
2.3.11
+30 -26
View File
@@ -31,24 +31,26 @@ RCT_EXPORT_METHOD(readAsText:(NSDictionary<NSString *, id> *)blob
reject:(RCTPromiseRejectBlock)reject)
{
RCTBlobManager *blobManager = [_moduleRegistry moduleForName:"BlobModule"];
NSData *data = [blobManager resolve:blob];
dispatch_async(blobManager.methodQueue, ^{
NSData *data = [blobManager resolve:blob];
if (data == nil) {
reject(RCTErrorUnspecified,
[NSString stringWithFormat:@"Unable to resolve data for blob: %@", [RCTConvert NSString:blob[@"blobId"]]], nil);
} else {
NSStringEncoding stringEncoding;
if (encoding == nil) {
stringEncoding = NSUTF8StringEncoding;
if (data == nil) {
reject(RCTErrorUnspecified,
[NSString stringWithFormat:@"Unable to resolve data for blob: %@", [RCTConvert NSString:blob[@"blobId"]]], nil);
} else {
stringEncoding = CFStringConvertEncodingToNSStringEncoding(CFStringConvertIANACharSetNameToEncoding((CFStringRef) encoding));
NSStringEncoding stringEncoding;
if (encoding == nil) {
stringEncoding = NSUTF8StringEncoding;
} else {
stringEncoding = CFStringConvertEncodingToNSStringEncoding(CFStringConvertIANACharSetNameToEncoding((CFStringRef) encoding));
}
NSString *text = [[NSString alloc] initWithData:data encoding:stringEncoding];
resolve(text);
}
NSString *text = [[NSString alloc] initWithData:data encoding:stringEncoding];
resolve(text);
}
});
}
RCT_EXPORT_METHOD(readAsDataURL:(NSDictionary<NSString *, id> *)blob
@@ -56,19 +58,21 @@ RCT_EXPORT_METHOD(readAsDataURL:(NSDictionary<NSString *, id> *)blob
reject:(RCTPromiseRejectBlock)reject)
{
RCTBlobManager *blobManager = [_moduleRegistry moduleForName:"BlobModule"];
NSData *data = [blobManager resolve:blob];
dispatch_async(blobManager.methodQueue, ^{
NSData *data = [blobManager resolve:blob];
if (data == nil) {
reject(RCTErrorUnspecified,
[NSString stringWithFormat:@"Unable to resolve data for blob: %@", [RCTConvert NSString:blob[@"blobId"]]], nil);
} else {
NSString *type = [RCTConvert NSString:blob[@"type"]];
NSString *text = [NSString stringWithFormat:@"data:%@;base64,%@",
type != nil && [type length] > 0 ? type : @"application/octet-stream",
[data base64EncodedStringWithOptions:0]];
if (data == nil) {
reject(RCTErrorUnspecified,
[NSString stringWithFormat:@"Unable to resolve data for blob: %@", [RCTConvert NSString:blob[@"blobId"]]], nil);
} else {
NSString *type = [RCTConvert NSString:blob[@"type"]];
NSString *text = [NSString stringWithFormat:@"data:%@;base64,%@",
type != nil && [type length] > 0 ? type : @"application/octet-stream",
[data base64EncodedStringWithOptions:0]];
resolve(text);
}
resolve(text);
}
});
}
- (std::shared_ptr<facebook::react::TurboModule>)getTurboModule:(const facebook::react::ObjCTurboModule::InitParams &)params
+4 -4
View File
@@ -1,17 +1,17 @@
/**
* @generated by scripts/set-rn-version.js
*
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @format
* @generated by scripts/set-rn-version.js
* @flow strict
*/
exports.version = {
major: 0,
minor: 0,
patch: 0,
minor: 69,
patch: 3,
prerelease: null,
};
@@ -34,15 +34,14 @@ function codegenNativeComponent<Props>(
componentName: string,
options?: Options,
): NativeComponentType<Props> {
const errorMessage =
"Native Component '" +
componentName +
"' that calls codegenNativeComponent was not code generated at build time. Please check its definition.";
if (global.RN$Bridgeless === true) {
const errorMessage =
"Native Component '" +
componentName +
"' that calls codegenNativeComponent was not code generated at build time. Please check its definition.";
console.error(errorMessage);
} else {
console.warn(errorMessage);
}
let componentNameInUse =
options && options.paperComponentName != null
? options.paperComponentName
+9 -15
View File
@@ -8,24 +8,18 @@
* @flow strict-local
*/
import {useMemo} from 'react';
import {useSubscription} from 'use-subscription';
'use strict';
import {useSyncExternalStore} from 'use-sync-external-store/shim';
import Appearance from './Appearance';
import type {ColorSchemeName} from './NativeAppearance';
export default function useColorScheme(): ?ColorSchemeName {
const subscription = useMemo(
() => ({
getCurrentValue: () => Appearance.getColorScheme(),
subscribe: callback => {
const appearanceSubscription = Appearance.addChangeListener(callback);
return () => {
appearanceSubscription.remove();
};
},
}),
[],
return useSyncExternalStore(
callback => {
const appearanceSubscription = Appearance.addChangeListener(callback);
return () => appearanceSubscription.remove();
},
() => Appearance.getColorScheme(),
);
return useSubscription(subscription);
}
+5 -5
View File
@@ -21,11 +21,11 @@ NSDictionary* RCTGetReactNativeVersion(void)
static dispatch_once_t onceToken;
dispatch_once(&onceToken, ^(void){
__rnVersion = @{
RCTVersionMajor: @(0),
RCTVersionMinor: @(0),
RCTVersionPatch: @(0),
RCTVersionPrerelease: [NSNull null],
};
RCTVersionMajor: @(0),
RCTVersionMinor: @(69),
RCTVersionPatch: @(3),
RCTVersionPrerelease: [NSNull null],
};
});
return __rnVersion;
}
@@ -22,8 +22,14 @@ JSIExecutor::RuntimeInstaller RCTJSIExecutorRuntimeInstaller(JSIExecutor::Runtim
bindNativeLogger(runtime, iosLoggingBinder);
PerformanceNow iosPerformanceNowBinder = []() {
auto time = std::chrono::system_clock::now().time_since_epoch();
return std::chrono::duration_cast<std::chrono::milliseconds>(time).count();
auto time = std::chrono::steady_clock::now();
auto duration = std::chrono::duration_cast<std::chrono::nanoseconds>(
time.time_since_epoch())
.count();
constexpr double NANOSECONDS_IN_MILLISECOND = 1000000.0;
return duration / NANOSECONDS_IN_MILLISECOND;
};
bindNativePerformanceNow(runtime, iosPerformanceNowBinder);
+1
View File
@@ -35,6 +35,7 @@ Pod::Spec.new do |s|
"**/android/*",
s.compiler_flags = folly_compiler_flags + ' ' + boost_compiler_flags
s.header_dir = "React"
s.module_name = "RCTFabric"
s.framework = "JavaScriptCore"
s.pod_target_xcconfig = { "HEADER_SEARCH_PATHS" => "\"$(PODS_TARGET_SRCROOT)/ReactCommon\" \"$(PODS_ROOT)/boost\" \"$(PODS_ROOT)/DoubleConversion\" \"$(PODS_ROOT)/RCT-Folly\" \"$(PODS_ROOT)/Headers/Private/React-Core\" \"$(PODS_ROOT)/Headers/Public/React-Codegen\" \"${PODS_CONFIGURATION_BUILD_DIR}/React-Codegen/React_Codegen.framework/Headers\"" }
s.xcconfig = { "HEADER_SEARCH_PATHS" => "\"$(PODS_ROOT)/boost\" \"$(PODS_ROOT)/glog\" \"$(PODS_ROOT)/RCT-Folly\"", "CLANG_CXX_LANGUAGE_STANDARD" => "c++17",
+2
View File
@@ -8,6 +8,8 @@
#import <UIKit/UIKit.h>
#import <React/RCTComponent.h>
// Keeps RCTConvert.h here before yoga for clang module to generate correct header imports.
#import <React/RCTConvert.h>
#import <React/RCTLayout.h>
#import <React/RCTRootView.h>
#import <yoga/Yoga.h>
+1 -1
View File
@@ -1,4 +1,4 @@
VERSION_NAME=1000.0.0-main
VERSION_NAME=0.69.3
GROUP=com.facebook.react
POM_NAME=ReactNative
@@ -12,6 +12,7 @@ include $(CLEAR_VARS)
LOCAL_MODULE := jsijniprofiler
LOCAL_SRC_FILES := $(wildcard $(LOCAL_PATH)/*.cpp)
LOCAL_SRC_FILES := $(subst $(LOCAL_PATH)/,,$(LOCAL_SRC_FILES))
LOCAL_C_INCLUDES := $(LOCAL_PATH) $(REACT_NATIVE)/ReactCommon/jsi
@@ -13,6 +13,7 @@ ifeq ($(APP_OPTIM),debug)
LOCAL_CFLAGS := -DHERMES_ENABLE_DEBUGGER=1
LOCAL_SRC_FILES := $(wildcard $(LOCAL_PATH)/*.cpp)
LOCAL_SRC_FILES := $(subst $(LOCAL_PATH)/,,$(LOCAL_SRC_FILES))
LOCAL_C_INCLUDES := $(LOCAL_PATH) $(REACT_NATIVE)/ReactCommon/jsi
@@ -38,6 +39,8 @@ else
LOCAL_C_INCLUDES := $(LOCAL_PATH) $(REACT_NATIVE)/ReactCommon/jsi
LOCAL_CPP_FEATURES := exceptions
LOCAL_SRC_FILES := $(wildcard $(LOCAL_PATH)/*.cpp)
LOCAL_SRC_FILES := $(subst $(LOCAL_PATH)/,,$(LOCAL_SRC_FILES))
LOCAL_STATIC_LIBRARIES := libjsireact libhermes-executor-common-release
LOCAL_SHARED_LIBRARIES := \
@@ -10,6 +10,7 @@ include $(CLEAR_VARS)
LOCAL_MODULE := mapbufferjni
LOCAL_SRC_FILES := $(wildcard $(LOCAL_PATH)/react/common/mapbuffer/*.cpp)
LOCAL_SRC_FILES := $(subst $(LOCAL_PATH)/,,$(LOCAL_SRC_FILES))
LOCAL_SHARED_LIBRARIES := \
libfb \
@@ -10,6 +10,7 @@ include $(CLEAR_VARS)
LOCAL_MODULE := fabricjni
LOCAL_SRC_FILES := $(wildcard $(LOCAL_PATH)/*.cpp)
LOCAL_SRC_FILES := $(subst $(LOCAL_PATH)/,,$(LOCAL_SRC_FILES))
LOCAL_SHARED_LIBRARIES := \
libbutter \
@@ -10,6 +10,7 @@ include $(CLEAR_VARS)
LOCAL_MODULE := jscexecutor
LOCAL_SRC_FILES := $(wildcard $(LOCAL_PATH)/*.cpp)
LOCAL_SRC_FILES := $(subst $(LOCAL_PATH)/,,$(LOCAL_SRC_FILES))
LOCAL_C_INCLUDES := $(LOCAL_PATH)
@@ -10,6 +10,7 @@ include $(CLEAR_VARS)
LOCAL_MODULE := reactnativeblob
LOCAL_SRC_FILES := $(wildcard $(LOCAL_PATH)/*.cpp)
LOCAL_SRC_FILES := $(subst $(LOCAL_PATH)/,,$(LOCAL_SRC_FILES))
LOCAL_C_INCLUDES := $(LOCAL_PATH)
@@ -16,7 +16,7 @@ import java.util.Map;
public class ReactNativeVersion {
public static final Map<String, Object> VERSION = MapBuilder.<String, Object>of(
"major", 0,
"minor", 0,
"patch", 0,
"minor", 69,
"patch", 3,
"prerelease", null);
}
@@ -26,6 +26,7 @@ LOCAL_MODULE := reactperfloggerjni
# Compile all local c++ files
LOCAL_SRC_FILES := $(wildcard $(LOCAL_PATH)/reactperflogger/*.cpp)
LOCAL_SRC_FILES := $(subst $(LOCAL_PATH)/,,$(LOCAL_SRC_FILES))
# Build the files in this directory as a shared library
include $(BUILD_SHARED_LIBRARY)
@@ -28,6 +28,7 @@ LOCAL_MODULE := callinvokerholder
# Compile all local c++ files
LOCAL_SRC_FILES := $(LOCAL_PATH)/ReactCommon/CallInvokerHolder.cpp
LOCAL_SRC_FILES := $(subst $(LOCAL_PATH)/,,$(LOCAL_SRC_FILES))
# Build the files in this directory as a shared library
include $(BUILD_STATIC_LIBRARY)
@@ -56,6 +57,7 @@ LOCAL_STATIC_LIBRARIES = libcallinvokerholder libreactperfloggerjni
# Compile all local c++ files
LOCAL_SRC_FILES := $(LOCAL_PATH)/ReactCommon/TurboModuleManager.cpp $(LOCAL_PATH)/ReactCommon/OnLoad.cpp
LOCAL_SRC_FILES := $(subst $(LOCAL_PATH)/,,$(LOCAL_SRC_FILES))
# Build the files in this directory as a shared library
include $(BUILD_SHARED_LIBRARY)
@@ -10,6 +10,7 @@ include $(CLEAR_VARS)
LOCAL_MODULE := uimanagerjni
LOCAL_SRC_FILES := $(wildcard $(LOCAL_PATH)/*.cpp)
LOCAL_SRC_FILES := $(subst $(LOCAL_PATH)/,,$(LOCAL_SRC_FILES))
LOCAL_SHARED_LIBRARIES := \
libfb \
@@ -10,6 +10,7 @@ include $(CLEAR_VARS)
LOCAL_MODULE := yoga
LOCAL_SRC_FILES := $(wildcard $(LOCAL_PATH)/jni/*.cpp)
LOCAL_SRC_FILES := $(subst $(LOCAL_PATH)/,,$(LOCAL_SRC_FILES))
LOCAL_C_INCLUDES := $(LOCAL_PATH)/jni
@@ -47,6 +47,7 @@ LOCAL_MODULE := reactnativeutilsjni
# Compile all local c++ files.
LOCAL_SRC_FILES := $(wildcard $(LOCAL_PATH)/*.cpp)
LOCAL_SRC_FILES := $(subst $(LOCAL_PATH)/,,$(LOCAL_SRC_FILES))
ifeq ($(APP_OPTIM),debug)
# Keep symbols by overriding the strip command invoked by ndk-build.
@@ -106,6 +107,7 @@ LOCAL_MODULE := reactnativejni
# Compile all local c++ files.
LOCAL_SRC_FILES := $(wildcard $(LOCAL_PATH)/*.cpp)
LOCAL_SRC_FILES := $(subst $(LOCAL_PATH)/,,$(LOCAL_SRC_FILES))
ifeq ($(APP_OPTIM),debug)
# Keep symbols by overriding the strip command invoked by ndk-build.
@@ -14,7 +14,8 @@ add_compile_options(
-fexceptions
-frtti
-Wno-unused-lambda-capture
-std=c++17)
-std=c++17
-DWITH_INSPECTOR=1)
##########################
### React Native Utils ###
@@ -12,8 +12,14 @@ namespace facebook {
namespace react {
double reactAndroidNativePerformanceNowHook() {
auto time = std::chrono::system_clock::now().time_since_epoch();
return std::chrono::duration_cast<std::chrono::milliseconds>(time).count();
auto time = std::chrono::steady_clock::now();
auto duration = std::chrono::duration_cast<std::chrono::nanoseconds>(
time.time_since_epoch())
.count();
constexpr double NANOSECONDS_IN_MILLISECOND = 1000000.0;
return duration / NANOSECONDS_IN_MILLISECOND;
}
} // namespace react
@@ -5,6 +5,7 @@ include $(CLEAR_VARS)
# because the react native version does not include anything outside of headers.
# They are required for Folly futures to compile successfully.
LOCAL_SRC_FILES := $(wildcard $(LOCAL_PATH)/asm/$(TARGET_ARCH_ABI)/*.S)
LOCAL_SRC_FILES := $(subst $(LOCAL_PATH)/,,$(LOCAL_SRC_FILES))
LOCAL_C_INCLUDES := $(LOCAL_PATH)/boost_1_76_0
LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH)/boost_1_76_0
@@ -5,7 +5,7 @@
require "json"
package = JSON.parse(File.read(File.join(__dir__, "..", "..", "..", "package.json")))
package = JSON.parse(File.read(File.join(__dir__, "..", "package.json")))
version = package['version']
source = { :git => 'https://github.com/facebook/react-native.git' }
@@ -28,9 +28,10 @@ Pod::Spec.new do |s|
s.author = "Facebook, Inc. and its affiliates"
s.platforms = { :ios => "12.4" }
s.source = source
s.source_files = "**/*.{cpp,h}"
s.exclude_files = "tests"
s.source_files = "react/bridging/**/*.{cpp,h}"
s.exclude_files = "react/bridging/tests"
s.header_dir = "react/bridging"
s.header_mappings_dir = "."
s.compiler_flags = folly_compiler_flags
s.pod_target_xcconfig = { "HEADER_SEARCH_PATHS" => "\"$(PODS_ROOT)/RCT-Folly\"",
"USE_HEADERMAP" => "YES",
+1 -1
View File
@@ -32,7 +32,7 @@ Pod::Spec.new do |s|
s.source = source
s.header_dir = "ReactCommon" # Use global header_dir for all subspecs for use_frameworks! compatibility
s.compiler_flags = folly_compiler_flags + ' ' + boost_compiler_flags
s.pod_target_xcconfig = { "HEADER_SEARCH_PATHS" => "\"$(PODS_ROOT)/boost\" \"$(PODS_ROOT)/RCT-Folly\" \"$(PODS_ROOT)/DoubleConversion\" \"$(PODS_ROOT)/Headers/Private/React-Core\" \"$(PODS_ROOT)/Headers/Private/React-bridging\"",
s.pod_target_xcconfig = { "HEADER_SEARCH_PATHS" => "\"$(PODS_ROOT)/boost\" \"$(PODS_ROOT)/RCT-Folly\" \"$(PODS_ROOT)/DoubleConversion\" \"$(PODS_ROOT)/Headers/Private/React-Core\" \"$(PODS_ROOT)/Headers/Private/React-bridging/react/bridging\" \"$(PODS_CONFIGURATION_BUILD_DIR)/React-bridging/react_bridging.framework/Headers\"",
"USE_HEADERMAP" => "YES",
"CLANG_CXX_LANGUAGE_STANDARD" => "c++17" }
+1
View File
@@ -10,6 +10,7 @@ include $(CLEAR_VARS)
LOCAL_MODULE := butter
LOCAL_SRC_FILES := $(wildcard $(LOCAL_PATH)/*.cpp)
LOCAL_SRC_FILES := $(subst $(LOCAL_PATH)/,,$(LOCAL_SRC_FILES))
LOCAL_C_INCLUDES := $(LOCAL_PATH)/
LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH)/
+1
View File
@@ -10,6 +10,7 @@ include $(CLEAR_VARS)
LOCAL_MODULE := reactnative
LOCAL_SRC_FILES := $(wildcard $(LOCAL_PATH)/*.cpp)
LOCAL_SRC_FILES := $(subst $(LOCAL_PATH)/,,$(LOCAL_SRC_FILES))
LOCAL_C_INCLUDES := $(LOCAL_PATH)/..
LOCAL_EXPORT_C_INCLUDES := $(LOCAL_C_INCLUDES)
+2 -2
View File
@@ -16,8 +16,8 @@ namespace facebook::react {
constexpr struct {
int32_t Major = 0;
int32_t Minor = 0;
int32_t Patch = 0;
int32_t Minor = 69;
int32_t Patch = 3;
std::string_view Prerelease = "";
} ReactNativeVersion;
+3
View File
@@ -13,6 +13,7 @@ ifeq ($(APP_OPTIM),debug)
LOCAL_CFLAGS := -DHERMES_ENABLE_DEBUGGER=1
LOCAL_SRC_FILES := $(wildcard $(LOCAL_PATH)/*.cpp)
LOCAL_SRC_FILES := $(subst $(LOCAL_PATH)/,,$(LOCAL_SRC_FILES))
LOCAL_C_INCLUDES := $(LOCAL_PATH) $(REACT_NATIVE)/ReactCommon/jsi
LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH)
@@ -30,6 +31,8 @@ else
LOCAL_C_INCLUDES := $(LOCAL_PATH) $(REACT_NATIVE)/ReactCommon/jsi
LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH)
LOCAL_SRC_FILES := $(wildcard $(LOCAL_PATH)/*.cpp)
LOCAL_SRC_FILES := $(subst $(LOCAL_PATH)/,,$(LOCAL_SRC_FILES))
LOCAL_STATIC_LIBRARIES := libjsireact
LOCAL_SHARED_LIBRARIES := libhermes libjsi
+1
View File
@@ -11,6 +11,7 @@ include $(CLEAR_VARS)
LOCAL_MODULE := hermes-inspector
LOCAL_SRC_FILES := $(wildcard $(LOCAL_PATH)/*.cpp $(LOCAL_PATH)/detail/*.cpp $(LOCAL_PATH)/chrome/*.cpp)
LOCAL_SRC_FILES := $(subst $(LOCAL_PATH)/,,$(LOCAL_SRC_FILES))
LOCAL_C_ROOT := $(LOCAL_PATH)/../..
+2
View File
@@ -10,6 +10,7 @@ include $(CLEAR_VARS)
LOCAL_MODULE := jsi
LOCAL_SRC_FILES := $(wildcard $(LOCAL_PATH)/jsi/*.cpp)
LOCAL_SRC_FILES := $(subst $(LOCAL_PATH)/,,$(LOCAL_SRC_FILES))
LOCAL_C_INCLUDES := $(LOCAL_PATH)
LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH)
@@ -25,6 +26,7 @@ include $(CLEAR_VARS)
LOCAL_MODULE := jscruntime
LOCAL_SRC_FILES := $(wildcard $(LOCAL_PATH)/*.cpp)
LOCAL_SRC_FILES := $(subst $(LOCAL_PATH)/,,$(LOCAL_SRC_FILES))
LOCAL_C_INCLUDES := $(LOCAL_PATH)
LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH)
+1
View File
@@ -10,6 +10,7 @@ include $(CLEAR_VARS)
LOCAL_MODULE := jsireact
LOCAL_SRC_FILES := $(wildcard $(LOCAL_PATH)/jsireact/*.cpp)
LOCAL_SRC_FILES := $(subst $(LOCAL_PATH)/,,$(LOCAL_SRC_FILES))
LOCAL_C_INCLUDES := $(LOCAL_PATH)
LOCAL_EXPORT_C_INCLUDES := $(LOCAL_C_INCLUDES)
+1
View File
@@ -10,6 +10,7 @@ include $(CLEAR_VARS)
LOCAL_MODULE := jsinspector
LOCAL_SRC_FILES := $(wildcard $(LOCAL_PATH)/*.cpp)
LOCAL_SRC_FILES := $(subst $(LOCAL_PATH)/,,$(LOCAL_SRC_FILES))
LOCAL_C_INCLUDES := $(LOCAL_PATH)/..
LOCAL_EXPORT_C_INCLUDES := $(LOCAL_C_INCLUDES)
+1
View File
@@ -10,6 +10,7 @@ include $(CLEAR_VARS)
LOCAL_MODULE := logger
LOCAL_SRC_FILES := $(wildcard $(LOCAL_PATH)/*.cpp)
LOCAL_SRC_FILES := $(subst $(LOCAL_PATH)/,,$(LOCAL_SRC_FILES))
LOCAL_C_INCLUDES := $(LOCAL_PATH)/..
LOCAL_EXPORT_C_INCLUDES := $(LOCAL_C_INCLUDES)
+1
View File
@@ -10,6 +10,7 @@ include $(CLEAR_VARS)
LOCAL_MODULE := react_config
LOCAL_SRC_FILES := $(wildcard $(LOCAL_PATH)/*.cpp)
LOCAL_SRC_FILES := $(subst $(LOCAL_PATH)/,,$(LOCAL_SRC_FILES))
LOCAL_C_INCLUDES := $(LOCAL_PATH)
LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH)/../../
+1
View File
@@ -12,6 +12,7 @@ LOCAL_MODULE := react_debug
LOCAL_C_INCLUDES := $(LOCAL_PATH)/../../../
LOCAL_SRC_FILES := $(wildcard $(LOCAL_PATH)/*.cpp)
LOCAL_SRC_FILES := $(subst $(LOCAL_PATH)/,,$(LOCAL_SRC_FILES))
LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH)/../../../
@@ -12,6 +12,7 @@ LOCAL_MODULE := react_nativemodule_core
LOCAL_C_INCLUDES := $(LOCAL_PATH)/ReactCommon $(LOCAL_PATH)/platform/android/ReactCommon
LOCAL_SRC_FILES := $(wildcard $(LOCAL_PATH)/ReactCommon/*.cpp) $(wildcard $(LOCAL_PATH)/platform/android/ReactCommon/*.cpp)
LOCAL_SRC_FILES := $(subst $(LOCAL_PATH)/,,$(LOCAL_SRC_FILES))
LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH)/../../../ $(LOCAL_PATH) $(LOCAL_PATH)/platform/android/
@@ -16,7 +16,6 @@
#import <React/RCTModuleMethod.h>
#import <ReactCommon/CallInvoker.h>
#import <ReactCommon/TurboModule.h>
#import <ReactCommon/TurboModuleUtils.h>
#import <string>
#import <unordered_map>
@@ -27,6 +26,7 @@
namespace facebook {
namespace react {
class CallbackWrapper;
class Instance;
typedef std::weak_ptr<CallbackWrapper> (
@@ -27,6 +27,7 @@
#import <ReactCommon/TurboCxxModule.h>
#import <ReactCommon/TurboModuleBinding.h>
#import <ReactCommon/TurboModulePerfLogger.h>
#import <ReactCommon/TurboModuleUtils.h>
using namespace facebook;
using namespace facebook::react;
@@ -9,6 +9,7 @@ include $(CLEAR_VARS)
LOCAL_MODULE := sampleturbomodule
LOCAL_C_INCLUDES := $(LOCAL_PATH)
LOCAL_SRC_FILES := $(wildcard $(LOCAL_PATH)/ReactCommon/*.cpp)
LOCAL_SRC_FILES := $(subst $(LOCAL_PATH)/,,$(LOCAL_SRC_FILES))
LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH)
LOCAL_SHARED_LIBRARIES := \
libfbjni \
@@ -10,6 +10,7 @@ include $(CLEAR_VARS)
LOCAL_MODULE := react_render_animations
LOCAL_SRC_FILES := $(wildcard $(LOCAL_PATH)/*.cpp)
LOCAL_SRC_FILES := $(subst $(LOCAL_PATH)/,,$(LOCAL_SRC_FILES))
LOCAL_C_INCLUDES := $(LOCAL_PATH)/
LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH)/../../../
@@ -10,6 +10,7 @@ include $(CLEAR_VARS)
LOCAL_MODULE := react_render_attributedstring
LOCAL_SRC_FILES := $(wildcard $(LOCAL_PATH)/*.cpp)
LOCAL_SRC_FILES := $(subst $(LOCAL_PATH)/,,$(LOCAL_SRC_FILES))
LOCAL_C_INCLUDES := $(LOCAL_PATH)/
LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH)/../../../
@@ -12,6 +12,7 @@ LOCAL_MODULE := react_render_componentregistry
LOCAL_C_INCLUDES := $(LOCAL_PATH)/../../../
LOCAL_SRC_FILES := $(wildcard $(LOCAL_PATH)/*.cpp)
LOCAL_SRC_FILES := $(subst $(LOCAL_PATH)/,,$(LOCAL_SRC_FILES))
LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH)/../../../
@@ -12,6 +12,7 @@ LOCAL_MODULE := rrc_native
LOCAL_C_INCLUDES := $(LOCAL_PATH)/../../../../
LOCAL_SRC_FILES := $(wildcard $(LOCAL_PATH)/*.cpp)
LOCAL_SRC_FILES := $(subst $(LOCAL_PATH)/,,$(LOCAL_SRC_FILES))
LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH)/../../../../
@@ -10,6 +10,7 @@ include $(CLEAR_VARS)
LOCAL_MODULE := rrc_image
LOCAL_SRC_FILES := $(wildcard $(LOCAL_PATH)/*.cpp)
LOCAL_SRC_FILES := $(subst $(LOCAL_PATH)/,,$(LOCAL_SRC_FILES))
LOCAL_C_INCLUDES := $(LOCAL_PATH)/
LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH)/../../../../
@@ -10,6 +10,7 @@ include $(CLEAR_VARS)
LOCAL_MODULE := rrc_modal
LOCAL_SRC_FILES := $(wildcard $(LOCAL_PATH)/*.cpp)
LOCAL_SRC_FILES := $(subst $(LOCAL_PATH)/,,$(LOCAL_SRC_FILES))
LOCAL_C_INCLUDES := $(LOCAL_PATH)/
LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH)/../../../../
@@ -10,6 +10,7 @@ include $(CLEAR_VARS)
LOCAL_MODULE := rrc_progressbar
LOCAL_SRC_FILES := $(wildcard $(LOCAL_PATH)/android/react/renderer/components/progressbar/*.cpp)
LOCAL_SRC_FILES := $(subst $(LOCAL_PATH)/,,$(LOCAL_SRC_FILES))
LOCAL_C_INCLUDES := $(LOCAL_PATH)/android/
LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH)/android/
@@ -10,6 +10,7 @@ include $(CLEAR_VARS)
LOCAL_MODULE := rrc_root
LOCAL_SRC_FILES := $(wildcard $(LOCAL_PATH)/*.cpp)
LOCAL_SRC_FILES := $(subst $(LOCAL_PATH)/,,$(LOCAL_SRC_FILES))
LOCAL_C_INCLUDES := $(LOCAL_PATH)/
LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH)/../../../../
@@ -10,6 +10,7 @@ include $(CLEAR_VARS)
LOCAL_MODULE := rrc_scrollview
LOCAL_SRC_FILES := $(wildcard $(LOCAL_PATH)/*.cpp)
LOCAL_SRC_FILES := $(subst $(LOCAL_PATH)/,,$(LOCAL_SRC_FILES))
LOCAL_C_INCLUDES := $(LOCAL_PATH)/
LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH)/../../../../
@@ -10,6 +10,7 @@ include $(CLEAR_VARS)
LOCAL_MODULE := rrc_slider
LOCAL_SRC_FILES := $(wildcard $(LOCAL_PATH)/*.cpp) $(wildcard $(LOCAL_PATH)/platform/android/react/renderer/components/slider/*.cpp)
LOCAL_SRC_FILES := $(subst $(LOCAL_PATH)/,,$(LOCAL_SRC_FILES))
LOCAL_C_INCLUDES := $(LOCAL_PATH)/ $(LOCAL_PATH)/platform/android/
LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH)/../../../../ $(LOCAL_PATH)/platform/android/
@@ -10,6 +10,7 @@ include $(CLEAR_VARS)
LOCAL_MODULE := rrc_switch
LOCAL_SRC_FILES := $(wildcard $(LOCAL_PATH)/androidswitch/react/renderer/components/androidswitch/*.cpp)
LOCAL_SRC_FILES := $(subst $(LOCAL_PATH)/,,$(LOCAL_SRC_FILES))
LOCAL_C_INCLUDES := $(LOCAL_PATH)/androidswitch/
LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH)/androidswitch/
@@ -10,6 +10,7 @@ include $(CLEAR_VARS)
LOCAL_MODULE := rrc_text
LOCAL_SRC_FILES := $(wildcard $(LOCAL_PATH)/*.cpp)
LOCAL_SRC_FILES := $(subst $(LOCAL_PATH)/,,$(LOCAL_SRC_FILES))
LOCAL_C_INCLUDES := $(LOCAL_PATH)/
LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH)/../../../../
@@ -10,6 +10,7 @@ include $(CLEAR_VARS)
LOCAL_MODULE := rrc_textinput
LOCAL_SRC_FILES := $(wildcard $(LOCAL_PATH)/androidtextinput/react/renderer/components/androidtextinput/*.cpp)
LOCAL_SRC_FILES := $(subst $(LOCAL_PATH)/,,$(LOCAL_SRC_FILES))
LOCAL_C_INCLUDES := $(LOCAL_PATH)/androidtextinput/react/renderer/components/androidtextinput/
LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH)/androidtextinput/
@@ -10,6 +10,7 @@ include $(CLEAR_VARS)
LOCAL_MODULE := rrc_unimplementedview
LOCAL_SRC_FILES := $(wildcard $(LOCAL_PATH)/*.cpp)
LOCAL_SRC_FILES := $(subst $(LOCAL_PATH)/,,$(LOCAL_SRC_FILES))
LOCAL_C_INCLUDES := $(LOCAL_PATH)/
LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH)/../../../../
@@ -10,6 +10,7 @@ include $(CLEAR_VARS)
LOCAL_MODULE := rrc_view
LOCAL_SRC_FILES := $(wildcard $(LOCAL_PATH)/*.cpp)
LOCAL_SRC_FILES := $(subst $(LOCAL_PATH)/,,$(LOCAL_SRC_FILES))
LOCAL_C_INCLUDES := $(LOCAL_PATH)/../../../../
LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH)/../../../../
@@ -12,6 +12,7 @@ LOCAL_MODULE := react_render_core
LOCAL_C_INCLUDES := $(LOCAL_PATH)/../../../
LOCAL_SRC_FILES := $(wildcard $(LOCAL_PATH)/*.cpp)
LOCAL_SRC_FILES := $(subst $(LOCAL_PATH)/,,$(LOCAL_SRC_FILES))
LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH)/../../../
@@ -12,6 +12,7 @@ LOCAL_MODULE := react_render_debug
LOCAL_C_INCLUDES := $(LOCAL_PATH)/../../../
LOCAL_SRC_FILES := $(wildcard $(LOCAL_PATH)/*.cpp)
LOCAL_SRC_FILES := $(subst $(LOCAL_PATH)/,,$(LOCAL_SRC_FILES))
LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH)/../../../
@@ -10,6 +10,7 @@ include $(CLEAR_VARS)
LOCAL_MODULE := react_render_graphics
LOCAL_SRC_FILES := $(wildcard $(LOCAL_PATH)/*.cpp $(LOCAL_PATH)/platform/cxx/react/renderer/graphics/*.cpp)
LOCAL_SRC_FILES := $(subst $(LOCAL_PATH)/,,$(LOCAL_SRC_FILES))
LOCAL_SHARED_LIBRARIES := \
glog \
@@ -10,6 +10,7 @@ include $(CLEAR_VARS)
LOCAL_MODULE := react_render_imagemanager
LOCAL_SRC_FILES := $(wildcard $(LOCAL_PATH)/*.cpp $(LOCAL_PATH)/platform/cxx/react/renderer/imagemanager/*.cpp)
LOCAL_SRC_FILES := $(subst $(LOCAL_PATH)/,,$(LOCAL_SRC_FILES))
LOCAL_SHARED_LIBRARIES := \
libfolly_runtime \
@@ -12,6 +12,7 @@ LOCAL_MODULE := react_render_leakchecker
LOCAL_C_INCLUDES := $(LOCAL_PATH)/../../../
LOCAL_SRC_FILES := $(wildcard $(LOCAL_PATH)/*.cpp)
LOCAL_SRC_FILES := $(subst $(LOCAL_PATH)/,,$(LOCAL_SRC_FILES))
LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH)/../../../
@@ -10,6 +10,7 @@ include $(CLEAR_VARS)
LOCAL_MODULE := react_render_mapbuffer
LOCAL_SRC_FILES := $(wildcard $(LOCAL_PATH)/*.cpp)
LOCAL_SRC_FILES := $(subst $(LOCAL_PATH)/,,$(LOCAL_SRC_FILES))
LOCAL_C_INCLUDES := $(LOCAL_PATH)/../../../
LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH)/../../../
@@ -10,6 +10,7 @@ include $(CLEAR_VARS)
LOCAL_MODULE := react_render_mounting
LOCAL_SRC_FILES := $(wildcard $(LOCAL_PATH)/*.cpp)
LOCAL_SRC_FILES := $(subst $(LOCAL_PATH)/,,$(LOCAL_SRC_FILES))
LOCAL_C_INCLUDES := $(LOCAL_PATH)/
LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH)/../../../
@@ -12,6 +12,7 @@ LOCAL_MODULE := react_render_runtimescheduler
LOCAL_C_INCLUDES := $(LOCAL_PATH)/../../../
LOCAL_SRC_FILES := $(wildcard $(LOCAL_PATH)/*.cpp)
LOCAL_SRC_FILES := $(subst $(LOCAL_PATH)/,,$(LOCAL_SRC_FILES))
LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH)/../../../
@@ -10,6 +10,7 @@ include $(CLEAR_VARS)
LOCAL_MODULE := react_render_scheduler
LOCAL_SRC_FILES := $(wildcard $(LOCAL_PATH)/*.cpp)
LOCAL_SRC_FILES := $(subst $(LOCAL_PATH)/,,$(LOCAL_SRC_FILES))
LOCAL_C_INCLUDES := $(LOCAL_PATH)/
LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH)/../../../
@@ -10,6 +10,7 @@ include $(CLEAR_VARS)
LOCAL_MODULE := react_render_telemetry
LOCAL_SRC_FILES := $(wildcard $(LOCAL_PATH)/*.cpp)
LOCAL_SRC_FILES := $(subst $(LOCAL_PATH)/,,$(LOCAL_SRC_FILES))
LOCAL_C_INCLUDES := $(LOCAL_PATH)/
LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH)/../../../
@@ -10,6 +10,7 @@ include $(CLEAR_VARS)
LOCAL_MODULE := react_render_templateprocessor
LOCAL_SRC_FILES := $(wildcard $(LOCAL_PATH)/*.cpp)
LOCAL_SRC_FILES := $(subst $(LOCAL_PATH)/,,$(LOCAL_SRC_FILES))
LOCAL_C_INCLUDES := $(LOCAL_PATH)/
LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH)/../../../
@@ -10,6 +10,7 @@ include $(CLEAR_VARS)
LOCAL_MODULE := react_render_textlayoutmanager
LOCAL_SRC_FILES := $(wildcard $(LOCAL_PATH)/*.cpp $(LOCAL_PATH)/platform/android/react/renderer/textlayoutmanager/*.cpp)
LOCAL_SRC_FILES := $(subst $(LOCAL_PATH)/,,$(LOCAL_SRC_FILES))
LOCAL_SHARED_LIBRARIES := \
glog \
@@ -10,6 +10,7 @@ include $(CLEAR_VARS)
LOCAL_MODULE := react_render_uimanager
LOCAL_SRC_FILES := $(wildcard $(LOCAL_PATH)/*.cpp)
LOCAL_SRC_FILES := $(subst $(LOCAL_PATH)/,,$(LOCAL_SRC_FILES))
LOCAL_C_INCLUDES := $(LOCAL_PATH)/
LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH)/../../../
+1
View File
@@ -10,6 +10,7 @@ include $(CLEAR_VARS)
LOCAL_MODULE := react_utils
LOCAL_SRC_FILES := $(wildcard $(LOCAL_PATH)/*.cpp)
LOCAL_SRC_FILES := $(subst $(LOCAL_PATH)/,,$(LOCAL_SRC_FILES))
LOCAL_C_INCLUDES := $(LOCAL_PATH) $(LOCAL_PATH)/../../
LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH)/../../
+1
View File
@@ -20,6 +20,7 @@ LOCAL_MODULE := reactperflogger
# Compile all local c++ files under ./ReactCommon
LOCAL_SRC_FILES := $(wildcard $(LOCAL_PATH)/reactperflogger/*.cpp)
LOCAL_SRC_FILES := $(subst $(LOCAL_PATH)/,,$(LOCAL_SRC_FILES))
# Build the files in this directory as a shared library
include $(BUILD_STATIC_LIBRARY)
+1
View File
@@ -11,6 +11,7 @@ LOCAL_MODULE := yogacore
LOCAL_SRC_FILES := $(wildcard $(LOCAL_PATH)/yoga/*.cpp)
LOCAL_SRC_FILES += $(wildcard $(LOCAL_PATH)/yoga/*/*.cpp)
LOCAL_SRC_FILES := $(subst $(LOCAL_PATH)/,,$(LOCAL_SRC_FILES))
LOCAL_C_INCLUDES := $(LOCAL_PATH)
LOCAL_EXPORT_C_INCLUDES := $(LOCAL_C_INCLUDES)
-21
View File
@@ -1,21 +0,0 @@
#ifdef __OBJC__
#import <UIKit/UIKit.h>
#else
#ifndef FOUNDATION_EXPORT
#if defined(__cplusplus)
#define FOUNDATION_EXPORT extern "C"
#else
#define FOUNDATION_EXPORT extern
#endif
#endif
#endif
#import "yoga/YGEnums.h"
#import "yoga/YGMacros.h"
#import "yoga/YGNode.h"
#import "yoga/YGStyle.h"
#import "yoga/YGValue.h"
#import "yoga/Yoga.h"
FOUNDATION_EXPORT double yogaVersionNumber;
FOUNDATION_EXPORT const unsigned char yogaVersionString[];
-6
View File
@@ -1,6 +0,0 @@
framework module yoga {
umbrella header "Yoga-umbrella.h"
export *
module * { export * }
}
+5 -19
View File
@@ -47,25 +47,11 @@ Pod::Spec.new do |spec|
# Set this environment variable when *not* using the `:path` option to install the pod.
# E.g. when publishing this spec to a spec repo.
source_files = 'yoga/**/*.{cpp,h}', 'Yoga-umbrella.h'
source_files = source_files.map { |file| File.join('ReactCommon/yoga', file) } if ENV['INSTALL_YOGA_WITHOUT_PATH_OPTION']
source_files = 'yoga/**/*.{cpp,h}'
source_files = File.join('ReactCommon/yoga', source_files) if ENV['INSTALL_YOGA_WITHOUT_PATH_OPTION']
spec.source_files = source_files
spec.module_map = 'Yoga.modulemap'
# CocoaPods custom `module_map` + `header_dir` doesn't put the umbrella header in right place.
# Ideally, modulemap should be placed with the umbrella header, that would work for both use_frameworks! mode and non use_frameworks! mode.
# This script copy the umbrella header back to right place.
spec.script_phase = {
:name => 'Copy umbrella header',
:input_files => ["$PODS_ROOT/Headers/Public/Yoga/yoga/Yoga-umbrella.h"],
:output_files => ["$PODS_ROOT/Headers/Private/Yoga/Yoga-umbrella.h"],
:execution_position => :before_compile,
:shell_path => '/bin/bash',
# In use_frameworks! mode, the umbrella header will by copied to right place.
# This copy command will fail because "$PODS_ROOT/Headers/Public/Yoga/yoga/Yoga-umbrella.h" doesn't exist.
# The command is just a no-op in use_frameworks! mode.
:script => 'cp -f "$PODS_ROOT/Headers/Public/Yoga/yoga/Yoga-umbrella.h" "$PODS_ROOT/Headers/Private/Yoga/Yoga-umbrella.h" || true',
}
header_files = 'yoga/*.h'
header_files = File.join('ReactCommon/yoga', header_files) if ENV['INSTALL_YOGA_WITHOUT_PATH_OPTION']
spec.public_header_files = header_files
end
+4
View File
@@ -7,6 +7,8 @@
#pragma once
#ifdef __cplusplus
#include <cstdio>
#include <cstdint>
#include "YGEnums.h"
@@ -65,3 +67,5 @@ inline void setBooleanData(uint8_t& flags, size_t index, bool value) {
} // namespace detail
} // namespace yoga
} // namespace facebook
#endif
+4
View File
@@ -7,6 +7,8 @@
#pragma once
#ifdef __cplusplus
#include "YGValue.h"
#include "YGMacros.h"
#include <cmath>
@@ -182,3 +184,5 @@ constexpr bool operator!=(CompactValue a, CompactValue b) noexcept {
} // namespace detail
} // namespace yoga
} // namespace facebook
#endif
+5
View File
@@ -6,6 +6,9 @@
*/
#pragma once
#ifdef __cplusplus
#include "YGNode.h"
#include "Yoga-internal.h"
#include "CompactValue.h"
@@ -145,3 +148,5 @@ inline YGFloatOptional YGResolveValueMargin(
}
void throwLogicalErrorWithMessage(const char* message);
#endif
+5
View File
@@ -6,6 +6,9 @@
*/
#pragma once
#ifdef __cplusplus
#include "Yoga-internal.h"
#include "Yoga.h"
@@ -74,3 +77,5 @@ public:
setCloneNodeCallback(YGCloneNodeFunc{nullptr});
}
};
#endif
+4
View File
@@ -7,6 +7,8 @@
#pragma once
#ifdef __cplusplus
#include <cmath>
#include <limits>
#include "Yoga-internal.h"
@@ -68,3 +70,5 @@ inline bool operator>=(YGFloatOptional lhs, YGFloatOptional rhs) {
inline bool operator<=(YGFloatOptional lhs, YGFloatOptional rhs) {
return lhs < rhs || lhs == rhs;
}
#endif
+5
View File
@@ -6,6 +6,9 @@
*/
#pragma once
#ifdef __cplusplus
#include "BitUtils.h"
#include "YGFloatOptional.h"
#include "Yoga-internal.h"
@@ -85,3 +88,5 @@ public:
bool operator==(YGLayout layout) const;
bool operator!=(YGLayout layout) const { return !(*this == layout); }
};
#endif
+7
View File
@@ -6,7 +6,11 @@
*/
#ifdef DEBUG
#pragma once
#ifdef __cplusplus
#include <string>
#include "Yoga.h"
@@ -22,4 +26,7 @@ void YGNodeToString(
} // namespace yoga
} // namespace facebook
#endif
#endif
+5
View File
@@ -6,6 +6,9 @@
*/
#pragma once
#ifdef __cplusplus
#include <algorithm>
#include <array>
#include <cmath>
@@ -148,3 +151,5 @@ static const float kDefaultFlexShrink = 0.0f;
static const float kWebDefaultFlexShrink = 1.0f;
extern bool YGFloatsEqual(const float a, const float b);
#endif
+4
View File
@@ -7,6 +7,8 @@
#pragma once
#ifdef __cplusplus
#include "YGEnums.h"
struct YGNode;
@@ -36,3 +38,5 @@ struct Log {
} // namespace detail
} // namespace yoga
} // namespace facebook
#endif
@@ -11,9 +11,9 @@
'use strict';
declare module 'use-subscription' {
declare export function useSubscription<Value>(subscription: {|
getCurrentValue: () => Value,
declare module 'use-sync-external-store/shim' {
declare export function useSyncExternalStore<Value>(
subscribe: (callback: Function) => () => void,
|}): Value;
getCurrentValue: () => Value,
): Value;
}
+3 -2
View File
@@ -20,12 +20,13 @@ module.exports = {
// the correct images are loaded for components. Essentially
// require('img1.png') becomes `Object { "testUri": 'path/to/img1.png' }` in
// the Jest snapshot.
process: (_, filename) =>
`module.exports = {
process: (_, filename) => ({
code: `module.exports = {
testUri:
${JSON.stringify(
path.relative(__dirname, filename).replace(/\\/g, '/'),
)}
};`,
}),
getCacheKey: createCacheKeyFunction([__filename]),
};
+58 -17
View File
@@ -1,7 +1,6 @@
{
"name": "react-native",
"private": true,
"version": "1000.0.0",
"version": "0.69.3",
"bin": "./cli.js",
"description": "A framework for building native apps using React",
"license": "MIT",
@@ -42,6 +41,11 @@
"scripts/generate-artifacts.js",
"scripts/generate-provider-cli.js",
"scripts/generate-specs-cli.js",
"scripts/codegen/codegen-utils.js",
"scripts/codegen/generate-artifacts-executor.js",
"scripts/codegen/generate-specs-cli-executor.js",
"scripts/hermes/hermes-utils.js",
"scripts/hermes/prepare-hermes-for-build.js",
"scripts/ios-configure-glog.sh",
"scripts/xcode/with-environment.sh",
"scripts/launchPackager.bat",
@@ -52,7 +56,10 @@
"scripts/react_native_pods_utils/script_phases.rb",
"scripts/react_native_pods_utils/script_phases.sh",
"scripts/react_native_pods.rb",
"scripts/cocoapods",
"scripts/react-native-xcode.sh",
"sdks/.hermesversion",
"sdks/hermes-engine",
"sdks/hermesc",
"template.config.js",
"template",
@@ -85,18 +92,14 @@
"test-android-e2e": "yarn run docker-build-android && yarn run test-android-run-e2e",
"test-ios": "./scripts/objc-test.sh test"
},
"workspaces": [
"packages/!(eslint-config-react-native-community)",
"repo-config"
],
"peerDependencies": {
"react": "18.0.0"
},
"dependencies": {
"@jest/create-cache-key-function": "^27.0.1",
"@react-native-community/cli": "^8.0.0-alpha.4",
"@react-native-community/cli-platform-android": "^8.0.0-alpha.3",
"@react-native-community/cli-platform-ios": "^8.0.0-alpha.3",
"@react-native-community/cli": "^8.0.3",
"@react-native-community/cli-platform-android": "^8.0.2",
"@react-native-community/cli-platform-ios": "^8.0.2",
"@react-native/assets": "1.0.0",
"@react-native/normalize-color": "2.0.0",
"@react-native/polyfills": "2.0.0",
@@ -108,27 +111,65 @@
"invariant": "^2.2.4",
"jsc-android": "^250230.2.1",
"memoize-one": "^5.0.0",
"metro-react-native-babel-transformer": "0.70.1",
"metro-runtime": "0.70.1",
"metro-source-map": "0.70.1",
"metro-react-native-babel-transformer": "0.70.3",
"metro-runtime": "0.70.3",
"metro-source-map": "0.70.3",
"mkdirp": "^0.5.1",
"nullthrows": "^1.1.1",
"pretty-format": "^26.5.2",
"promise": "^8.0.3",
"react-devtools-core": "4.24.0",
"react-native-gradle-plugin": "^0.0.7",
"react-refresh": "^0.4.0",
"react-shallow-renderer": "16.14.1",
"react-shallow-renderer": "16.15.0",
"regenerator-runtime": "^0.13.2",
"scheduler": "^0.21.0",
"stacktrace-parser": "^0.1.3",
"use-subscription": ">=1.0.0 <1.6.0",
"use-sync-external-store": "^1.0.0",
"whatwg-fetch": "^3.0.0",
"ws": "^6.1.4"
"ws": "^6.1.4",
"react-native-codegen": "^0.69.1"
},
"devDependencies": {
"flow-bin": "^0.176.3",
"react": "18.0.0",
"react-test-renderer": "^18.0.0"
"react-test-renderer": "18.0.0",
"@babel/core": "^7.14.0",
"@babel/generator": "^7.14.0",
"@babel/plugin-transform-regenerator": "^7.0.0",
"@react-native-community/eslint-plugin": "*",
"@react-native/eslint-plugin-specs": ">0.0.2",
"@reactions/component": "^2.0.2",
"async": "^3.2.2",
"babel-eslint": "^10.1.0",
"clang-format": "^1.2.4",
"connect": "^3.6.5",
"coveralls": "^3.1.1",
"eslint": "^7.32.0",
"eslint-config-fb-strict": "^26.0.0",
"eslint-config-fbjs": "^3.1.1",
"eslint-config-prettier": "^8.3.0",
"eslint-plugin-babel": "^5.3.1",
"eslint-plugin-eslint-comments": "^3.2.0",
"eslint-plugin-flowtype": "^7.0.0",
"eslint-plugin-jest": "^25.2.4",
"eslint-plugin-jsx-a11y": "^6.4.1",
"eslint-plugin-prettier": "^4.0.0",
"eslint-plugin-react": "^7.26.1",
"eslint-plugin-react-hooks": "^4.2.0",
"eslint-plugin-react-native": "^3.11.0",
"eslint-plugin-relay": "^1.8.2",
"inquirer": "^7.1.0",
"jest": "^26.6.3",
"jest-junit": "^10.0.0",
"jscodeshift": "^0.13.1",
"metro-babel-register": "0.70.3",
"mkdirp": "^0.5.1",
"prettier": "^2.4.1",
"shelljs": "^0.8.5",
"signedsource": "^1.0.0",
"ws": "^6.1.4",
"yargs": "^15.3.1"
},
"codegenConfig": {
"libraries": [
@@ -148,4 +189,4 @@
}
]
}
}
}
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "react-native-codegen",
"version": "0.0.15",
"version": "0.69.1",
"description": "⚛️ Code generation tools for React Native",
"homepage": "https://github.com/facebook/react-native/tree/HEAD/packages/react-native-codegen",
"repository": {
@@ -77,6 +77,7 @@ LOCAL_MODULE := react_codegen_${libraryName}
LOCAL_C_INCLUDES := $(LOCAL_PATH)
LOCAL_SRC_FILES := $(wildcard $(LOCAL_PATH)/*.cpp) $(wildcard $(LOCAL_PATH)/react/renderer/components/${libraryName}/*.cpp)
LOCAL_SRC_FILES := $(subst $(LOCAL_PATH)/,,$(LOCAL_SRC_FILES))
LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH) $(LOCAL_PATH)/react/renderer/components/${libraryName}
@@ -49,6 +49,7 @@ LOCAL_MODULE := react_codegen_SampleWithUppercaseName
LOCAL_C_INCLUDES := $(LOCAL_PATH)
LOCAL_SRC_FILES := $(wildcard $(LOCAL_PATH)/*.cpp) $(wildcard $(LOCAL_PATH)/react/renderer/components/SampleWithUppercaseName/*.cpp)
LOCAL_SRC_FILES := $(subst $(LOCAL_PATH)/,,$(LOCAL_SRC_FILES))
LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH) $(LOCAL_PATH)/react/renderer/components/SampleWithUppercaseName
@@ -157,6 +158,7 @@ LOCAL_MODULE := react_codegen_complex_objects
LOCAL_C_INCLUDES := $(LOCAL_PATH)
LOCAL_SRC_FILES := $(wildcard $(LOCAL_PATH)/*.cpp) $(wildcard $(LOCAL_PATH)/react/renderer/components/complex_objects/*.cpp)
LOCAL_SRC_FILES := $(subst $(LOCAL_PATH)/,,$(LOCAL_SRC_FILES))
LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH) $(LOCAL_PATH)/react/renderer/components/complex_objects
@@ -265,6 +267,7 @@ LOCAL_MODULE := react_codegen_empty_native_modules
LOCAL_C_INCLUDES := $(LOCAL_PATH)
LOCAL_SRC_FILES := $(wildcard $(LOCAL_PATH)/*.cpp) $(wildcard $(LOCAL_PATH)/react/renderer/components/empty_native_modules/*.cpp)
LOCAL_SRC_FILES := $(subst $(LOCAL_PATH)/,,$(LOCAL_SRC_FILES))
LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH) $(LOCAL_PATH)/react/renderer/components/empty_native_modules
@@ -373,6 +376,7 @@ LOCAL_MODULE := react_codegen_native_modules_with_type_aliases
LOCAL_C_INCLUDES := $(LOCAL_PATH)
LOCAL_SRC_FILES := $(wildcard $(LOCAL_PATH)/*.cpp) $(wildcard $(LOCAL_PATH)/react/renderer/components/native_modules_with_type_aliases/*.cpp)
LOCAL_SRC_FILES := $(subst $(LOCAL_PATH)/,,$(LOCAL_SRC_FILES))
LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH) $(LOCAL_PATH)/react/renderer/components/native_modules_with_type_aliases
@@ -489,6 +493,7 @@ LOCAL_MODULE := react_codegen_real_module_example
LOCAL_C_INCLUDES := $(LOCAL_PATH)
LOCAL_SRC_FILES := $(wildcard $(LOCAL_PATH)/*.cpp) $(wildcard $(LOCAL_PATH)/react/renderer/components/real_module_example/*.cpp)
LOCAL_SRC_FILES := $(subst $(LOCAL_PATH)/,,$(LOCAL_SRC_FILES))
LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH) $(LOCAL_PATH)/react/renderer/components/real_module_example
@@ -597,6 +602,7 @@ LOCAL_MODULE := react_codegen_simple_native_modules
LOCAL_C_INCLUDES := $(LOCAL_PATH)
LOCAL_SRC_FILES := $(wildcard $(LOCAL_PATH)/*.cpp) $(wildcard $(LOCAL_PATH)/react/renderer/components/simple_native_modules/*.cpp)
LOCAL_SRC_FILES := $(subst $(LOCAL_PATH)/,,$(LOCAL_SRC_FILES))
LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH) $(LOCAL_PATH)/react/renderer/components/simple_native_modules
@@ -713,6 +719,7 @@ LOCAL_MODULE := react_codegen_two_modules_different_files
LOCAL_C_INCLUDES := $(LOCAL_PATH)
LOCAL_SRC_FILES := $(wildcard $(LOCAL_PATH)/*.cpp) $(wildcard $(LOCAL_PATH)/react/renderer/components/two_modules_different_files/*.cpp)
LOCAL_SRC_FILES := $(subst $(LOCAL_PATH)/,,$(LOCAL_SRC_FILES))
LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH) $(LOCAL_PATH)/react/renderer/components/two_modules_different_files
+5 -5
View File
@@ -8,6 +8,8 @@ platform :ios, '12.4'
install! 'cocoapods', :deterministic_uuids => false
USE_FRAMEWORKS = ENV['USE_FRAMEWORKS'] == '1'
IN_CI = ENV['CI'] == 'true'
@prefix_path = "../.."
if USE_FRAMEWORKS
@@ -15,7 +17,7 @@ if USE_FRAMEWORKS
use_frameworks!
end
def pods(options = {})
def pods(options = {}, use_flipper: false)
project 'RNTesterPods.xcodeproj'
fabric_enabled = true
@@ -31,6 +33,7 @@ def pods(options = {})
path: @prefix_path,
fabric_enabled: fabric_enabled,
hermes_enabled: hermes_enabled,
flipper_configuration: use_flipper ? FlipperConfiguration.enabled : FlipperConfiguration.disabled,
app_path: "#{Dir.pwd}",
config_file_dir: "#{Dir.pwd}/node_modules",
)
@@ -46,10 +49,7 @@ def pods(options = {})
end
target 'RNTester' do
pods()
if !USE_FRAMEWORKS
use_flipper!
end
pods({}, :use_flipper => !IN_CI && !USE_FRAMEWORKS)
end
target 'RNTesterUnitTests' do
File diff suppressed because it is too large Load Diff
@@ -410,7 +410,6 @@
13B07F8E1A680F5B00A75B9A /* Resources */,
68CD48B71D2BCB2C007E06A9 /* Build JS Bundle */,
5CF0FD27207FC6EC00C13D65 /* Start Metro */,
2FCDFB64B37634EC8EC3139B /* [CP] Embed Pods Frameworks */,
A8DE6393E2BB72D8FBBF6C27 /* [CP] Copy Pods Resources */,
);
buildRules = (
@@ -551,23 +550,6 @@
shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
showEnvVarsInLog = 0;
};
2FCDFB64B37634EC8EC3139B /* [CP] Embed Pods Frameworks */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputFileListPaths = (
"${PODS_ROOT}/Target Support Files/Pods-RNTester/Pods-RNTester-frameworks-${CONFIGURATION}-input-files.xcfilelist",
);
name = "[CP] Embed Pods Frameworks";
outputFileListPaths = (
"${PODS_ROOT}/Target Support Files/Pods-RNTester/Pods-RNTester-frameworks-${CONFIGURATION}-output-files.xcfilelist",
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-RNTester/Pods-RNTester-frameworks.sh\"\n";
showEnvVarsInLog = 0;
};
4930FC87997EBCAD361CEF12 /* [CP] Check Pods Manifest.lock */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
@@ -913,6 +895,7 @@
"-ObjC",
"-lc++",
);
REACT_NATIVE_PATH = "${PODS_ROOT}/../../..";
SDKROOT = iphoneos;
WARNING_CFLAGS = (
"-Wextra",
@@ -989,6 +972,7 @@
"-ObjC",
"-lc++",
);
REACT_NATIVE_PATH = "${PODS_ROOT}/../../..";
SDKROOT = iphoneos;
VALIDATE_PRODUCT = YES;
WARNING_CFLAGS = (
@@ -15,9 +15,10 @@ LOCAL_PATH := $(THIS_DIR)
include $(CLEAR_VARS)
LOCAL_MODULE := rntester_appmodules
# Note: Build the react-native-codegen output along with other app-specific C++ files.
# Note: We are linking against react_codegen_rntester hence no need to built the react-native-codegen output.
LOCAL_C_INCLUDES := $(LOCAL_PATH) $(GENERATED_SRC_DIR)/codegen/jni
LOCAL_SRC_FILES := $(wildcard $(LOCAL_PATH)/*.cpp) $(wildcard $(GENERATED_SRC_DIR)/codegen/jni/*.cpp)
LOCAL_SRC_FILES := $(wildcard $(LOCAL_PATH)/*.cpp)
LOCAL_SRC_FILES := $(subst $(LOCAL_PATH)/,,$(LOCAL_SRC_FILES))
LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH) $(GENERATED_SRC_DIR)/codegen/jni
LOCAL_SHARED_LIBRARIES := \
libfabricjni \
+4 -4
View File
@@ -39,12 +39,12 @@
"jest": "^26.6.3",
"jest-junit": "^10.0.0",
"jscodeshift": "^0.13.1",
"metro-babel-register": "0.70.1",
"metro-babel-register": "0.70.3",
"mkdirp": "^0.5.1",
"prettier": "^2.4.1",
"react": "17.0.2",
"react-native-codegen": "^0.0.15",
"react-test-renderer": "17.0.2",
"react": "18.0.0",
"react-native-codegen": "^0.69.1",
"react-test-renderer": "18.0.0",
"shelljs": "^0.8.5",
"signedsource": "^1.0.0",
"ws": "^6.1.4",
+31
View File
@@ -0,0 +1,31 @@
# Copyright (c) Meta Platforms, Inc. and affiliates.
#
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
# Helper class to configure flipper
class FlipperConfiguration
attr_reader :flipper_enabled
attr_reader :configurations
attr_reader :versions
def initialize(flipper_enabled, configurations, versions)
@flipper_enabled = flipper_enabled
@configurations = configurations
@versions = versions
end
def self.enabled(configurations = ["Debug"], versions = {})
FlipperConfiguration.new(true, configurations, versions)
end
def self.disabled
FlipperConfiguration.new(false, [], {})
end
def == (other)
return @flipper_enabled == other.flipper_enabled &&
@configurations == other.configurations &&
@versions == other.versions
end
end

Some files were not shown because too many files have changed in this diff Show More