Skip to content

Commit

Permalink
misc: Update to RN 0.73.9, fix CI flipper error (see #3981)
Browse files Browse the repository at this point in the history
  • Loading branch information
antonis committed Sep 19, 2024
1 parent 60c5f32 commit 7d75153
Show file tree
Hide file tree
Showing 10 changed files with 597 additions and 498 deletions.
39 changes: 28 additions & 11 deletions .github/workflows/e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -168,15 +168,15 @@ jobs:
strategy:
fail-fast: false # keeps matrix running if one fails
matrix:
rn-version: ['0.65.3', '0.73.2']
rn-version: ['0.65.3', '0.73.9']
rn-architecture: ['legacy', 'new']
platform: ['android', 'ios']
build-type: ['production']
ios-use-frameworks: ['no', 'static', 'dynamic']
engine: ['hermes', 'jsc']
include:
- platform: ios
rn-version: '0.73.2'
rn-version: '0.73.9'
runs-on: macos-14 # uses m1 https://github.blog/changelog/2024-01-30-github-actions-macos-14-sonoma-is-now-available/
runtime: 'latest'
device: 'iPhone 14'
Expand All @@ -189,7 +189,7 @@ jobs:
runs-on: ubuntu-latest
exclude:
# exclude JSC for new RN versions (keeping the matrix manageable)
- rn-version: '0.73.2'
- rn-version: '0.73.9'
engine: 'jsc'
# exclude all rn versions lower than 0.70.0 for new architecture
- rn-version: '0.65.3'
Expand Down Expand Up @@ -231,6 +231,10 @@ jobs:
- run: sudo xcode-select -s /Applications/Xcode_14.2.app/Contents/Developer
if: ${{ matrix.platform == 'ios' && matrix.rn-version == '0.65.3' }}

- name: Enable Corepack # RN 0.73.9 and newer are using yarn 3 which requires corepack
if: ${{ matrix.rn-version == '0.73.9' }}
run: corepack enable

- uses: actions/setup-node@v4
with:
node-version: 18
Expand Down Expand Up @@ -304,9 +308,21 @@ jobs:
working-directory: test/react-native/versions/${{ matrix.rn-version }}/RnDiffApp
run: yalc add @sentry/react-native

- name: Install App JS Dependencies
- name: Install App JS Dependencies (yarn v1)
working-directory: test/react-native/versions/${{ matrix.rn-version }}/RnDiffApp
run: yarn install
if: ${{ matrix.rn-version != '0.73.9' }}
run: |
yarn install
- name: Install App JS Dependencies (yarn v3)
working-directory: test/react-native/versions/${{ matrix.rn-version }}/RnDiffApp
if: ${{ matrix.rn-version == '0.73.9' }}
run: |
rm -f .yarnrc.yml # original yarnrc contains the exact yarn version which causes corepack to fail to install yarn v3
echo "nodeLinker: node-modules" > .yarnrc.yml # RN build script require dependencies to be present in node_modules
touch yarn.lock # yarn v3 won't install dependencies in a sub project without a yarn.lock file present
export YARN_ENABLE_IMMUTABLE_INSTALLS=false # yarn v3 run immutable install by default in CI
yarn install
- name: Add E2E Tests Library to App
working-directory: test/react-native/versions/${{ matrix.rn-version }}/RnDiffApp
Expand All @@ -328,8 +344,9 @@ jobs:
working-directory: test/react-native/versions/${{ matrix.rn-version }}/RnDiffApp/ios
run: |
../../../../rn.patch.podfile.js --pod-file Podfile --engine ${{ matrix.engine }}
[[ "${{ matrix.ios-use-frameworks }}" == "static" ]] && export USE_FRAMEWORKS=static && export NO_FLIPPER=1
[[ "${{ matrix.ios-use-frameworks }}" == "dynamic" ]] && export USE_FRAMEWORKS=dynamic && export NO_FLIPPER=1
export NO_FLIPPER=1 # Flipper is causing build issues on iOS, so we disable it
[[ "${{ matrix.ios-use-frameworks }}" == "static" ]] && export USE_FRAMEWORKS=static
[[ "${{ matrix.ios-use-frameworks }}" == "dynamic" ]] && export USE_FRAMEWORKS=dynamic
[[ "${{ matrix.build-type }}" == "production" ]] && ENABLE_PROD=1 || ENABLE_PROD=0
[[ "${{ matrix.rn-architecture }}" == "new" ]] && ENABLE_NEW_ARCH=1 || ENABLE_NEW_ARCH=0
[[ "${{ matrix.rn-version }}" == "0.65.3" ]] && POD_INSTALL_COMMNAND="pod install" || POD_INSTALL_COMMNAND="bundle exec pod install"
Expand Down Expand Up @@ -445,15 +462,15 @@ jobs:
strategy:
fail-fast: false # keeps matrix running if one fails
matrix:
rn-version: ['0.65.3', '0.73.2']
rn-version: ['0.65.3', '0.73.9']
rn-architecture: ['legacy', 'new']
platform: ['android', 'ios']
build-type: ['production']
ios-use-frameworks: ['no'] # test only no framworks
engine: ['hermes', 'jsc']
include:
- platform: ios
rn-version: '0.73.2'
rn-version: '0.73.9'
runs-on: macos-14 # uses m1 https://github.blog/changelog/2024-01-30-github-actions-macos-14-sonoma-is-now-available/
runtime: 'latest'
device: 'iPhone 14'
Expand All @@ -471,10 +488,10 @@ jobs:
# e2e test only the default combinations
- rn-version: '0.65.3'
engine: 'hermes'
- rn-version: '0.73.2'
- rn-version: '0.73.9'
engine: 'jsc'
# E2E timeout due to a race condition https://github.com/facebook/react-native/issues/42123#issuecomment-1881203719
- rn-version: '0.73.2'
- rn-version: '0.73.9'
platform: 'ios'
rn-architecture: 'new'
env:
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/sample-application.yml
Original file line number Diff line number Diff line change
Expand Up @@ -108,9 +108,10 @@ jobs:
[[ "${{ matrix.platform }}" == "ios" ]] && cd ios
[[ "${{ matrix.platform }}" == "macos" ]] && cd macos
export NO_FLIPPER=1 # Flipper is causing build issues on iOS, so we disable it
[[ "${{ matrix.build-type }}" == "production" ]] && ENABLE_PROD=1 || ENABLE_PROD=0
[[ "${{ matrix.rn-architecture }}" == "new" ]] && ENABLE_NEW_ARCH=1 || ENABLE_NEW_ARCH=0
[[ "${{ matrix.ios-use-frameworks }}" == "dynamic-frameworks" ]] && export USE_FRAMEWORKS=dynamic && export NO_FLIPPER=1
[[ "${{ matrix.ios-use-frameworks }}" == "dynamic-frameworks" ]] && export USE_FRAMEWORKS=dynamic
echo "ENABLE_PROD=$ENABLE_PROD"
echo "ENABLE_NEW_ARCH=$ENABLE_NEW_ARCH"
PRODUCTION=$ENABLE_PROD RCT_NEW_ARCH_ENABLED=$ENABLE_NEW_ARCH bundle exec pod install
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@
"metro": "0.80.10",
"prettier": "^2.0.5",
"react": "18.2.0",
"react-native": "0.73.2",
"react-native": "0.73.9",
"react-native-version": "^4.0.0",
"react-test-renderer": "^18.2.0",
"replace-in-file": "^7.0.1",
Expand Down
2 changes: 1 addition & 1 deletion samples/react-native/Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@ source 'https://rubygems.org'
ruby "3.3.0"

gem 'cocoapods', '1.15.2'
gem 'activesupport', '>= 6.1.7.3', '< 7.1.0'
gem 'activesupport', '>= 6.1.7.5', '< 7.1.0'
gem 'fastlane', '2.220.0'
2 changes: 1 addition & 1 deletion samples/react-native/Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,7 @@ PLATFORMS
x86_64-darwin-20

DEPENDENCIES
activesupport (>= 6.1.7.3, < 7.1.0)
activesupport (>= 6.1.7.5, < 7.1.0)
cocoapods (= 1.15.2)
fastlane (= 2.220.0)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
338BBBC82B614FA10035844C /* NativePlatformSampleModule.mm in Sources */ = {isa = PBXBuildFile; fileRef = 338BBBC62B614FA10035844C /* NativePlatformSampleModule.mm */; };
33E2D62A29A7719600B5042B /* RCTAssetsModule.m in Sources */ = {isa = PBXBuildFile; fileRef = 33E2D62829A7719600B5042B /* RCTAssetsModule.m */; };
5ACADB1A9924EDD0850FACBA /* libPods-sentryreactnativesample-sentryreactnativesampleTests.a in Frameworks */ = {isa = PBXBuildFile; fileRef = AFC2BCCFBDE2DC231B5C04E5 /* libPods-sentryreactnativesample-sentryreactnativesampleTests.a */; };
723FB93385E08A7032AE82F4 /* PrivacyInfo.xcprivacy in Resources */ = {isa = PBXBuildFile; fileRef = 916F55A329D66130A4DFF319 /* PrivacyInfo.xcprivacy */; };
81AB9BB82411601600AC10FF /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 81AB9BB72411601600AC10FF /* LaunchScreen.storyboard */; };
F998F5A3F1731876C4EDA235 /* libPods-sentryreactnativesample.a in Frameworks */ = {isa = PBXBuildFile; fileRef = CA08EE94AE203638B8C8B74B /* libPods-sentryreactnativesample.a */; };
/* End PBXBuildFile section */
Expand Down Expand Up @@ -47,6 +48,7 @@
5B7EB9410499542E8C5724F5 /* Pods-sentryreactnativesample-sentryreactnativesampleTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-sentryreactnativesample-sentryreactnativesampleTests.debug.xcconfig"; path = "Target Support Files/Pods-sentryreactnativesample-sentryreactnativesampleTests/Pods-sentryreactnativesample-sentryreactnativesampleTests.debug.xcconfig"; sourceTree = "<group>"; };
81AB9BB72411601600AC10FF /* LaunchScreen.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; name = LaunchScreen.storyboard; path = sentryreactnativesample/LaunchScreen.storyboard; sourceTree = "<group>"; };
89C6BE57DB24E9ADA2F236DE /* Pods-sentryreactnativesample-sentryreactnativesampleTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-sentryreactnativesample-sentryreactnativesampleTests.release.xcconfig"; path = "Target Support Files/Pods-sentryreactnativesample-sentryreactnativesampleTests/Pods-sentryreactnativesample-sentryreactnativesampleTests.release.xcconfig"; sourceTree = "<group>"; };
916F55A329D66130A4DFF319 /* PrivacyInfo.xcprivacy */ = {isa = PBXFileReference; includeInIndex = 1; name = PrivacyInfo.xcprivacy; path = sentryreactnativesample/PrivacyInfo.xcprivacy; sourceTree = "<group>"; };
AFC2BCCFBDE2DC231B5C04E5 /* libPods-sentryreactnativesample-sentryreactnativesampleTests.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-sentryreactnativesample-sentryreactnativesampleTests.a"; sourceTree = BUILT_PRODUCTS_DIR; };
CA08EE94AE203638B8C8B74B /* libPods-sentryreactnativesample.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-sentryreactnativesample.a"; sourceTree = BUILT_PRODUCTS_DIR; };
ED297162215061F000B7C4FE /* JavaScriptCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = JavaScriptCore.framework; path = System/Library/Frameworks/JavaScriptCore.framework; sourceTree = SDKROOT; };
Expand Down Expand Up @@ -102,6 +104,7 @@
13B07FB61A68108700A75B9A /* Info.plist */,
81AB9BB72411601600AC10FF /* LaunchScreen.storyboard */,
13B07FB71A68108700A75B9A /* main.m */,
916F55A329D66130A4DFF319 /* PrivacyInfo.xcprivacy */,
);
name = sentryreactnativesample;
sourceTree = "<group>";
Expand Down Expand Up @@ -254,6 +257,7 @@
files = (
81AB9BB82411601600AC10FF /* LaunchScreen.storyboard in Resources */,
13B07FBF1A68108700A75B9A /* Images.xcassets in Resources */,
723FB93385E08A7032AE82F4 /* PrivacyInfo.xcprivacy in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
Expand Down Expand Up @@ -626,19 +630,18 @@
);
MTL_ENABLE_DEBUG_INFO = YES;
ONLY_ACTIVE_ARCH = YES;
OTHER_CFLAGS = "$(inherited) ";
OTHER_CFLAGS = (
"$(inherited)",
" ",
);
OTHER_CPLUSPLUSFLAGS = (
"$(OTHER_CFLAGS)",
"-DFOLLY_NO_CONFIG",
"-DFOLLY_MOBILE=1",
"-DFOLLY_USE_LIBCPP=1",
"-DRN_FABRIC_ENABLED",
);
OTHER_LDFLAGS = (
"$(inherited)",
"-Wl",
"-ld_classic",
);
OTHER_LDFLAGS = "$(inherited)";
REACT_NATIVE_PATH = "${PODS_ROOT}/../../node_modules/react-native";
SDKROOT = iphoneos;
SENTRY_INCLUDE_NATIVE_SOURCES = false;
Expand Down Expand Up @@ -710,18 +713,17 @@
"\"$(inherited)\"",
);
MTL_ENABLE_DEBUG_INFO = NO;
OTHER_CFLAGS = "$(inherited) ";
OTHER_CFLAGS = (
"$(inherited)",
" ",
);
OTHER_CPLUSPLUSFLAGS = (
"$(OTHER_CFLAGS)",
"-DFOLLY_NO_CONFIG",
"-DFOLLY_MOBILE=1",
"-DFOLLY_USE_LIBCPP=1",
);
OTHER_LDFLAGS = (
"$(inherited)",
"-Wl",
"-ld_classic",
);
OTHER_LDFLAGS = "$(inherited)";
REACT_NATIVE_PATH = "${PODS_ROOT}/../../node_modules/react-native";
SDKROOT = iphoneos;
SENTRY_INCLUDE_NATIVE_SOURCES = false;
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>NSPrivacyAccessedAPITypes</key>
<array>
<dict>
<key>NSPrivacyAccessedAPIType</key>
<string>NSPrivacyAccessedAPICategoryUserDefaults</string>
<key>NSPrivacyAccessedAPITypeReasons</key>
<array>
<string>CA92.1</string>
</array>
</dict>
<dict>
<key>NSPrivacyAccessedAPIType</key>
<string>NSPrivacyAccessedAPICategorySystemBootTime</string>
<key>NSPrivacyAccessedAPITypeReasons</key>
<array>
<string>35F9.1</string>
</array>
</dict>
<dict>
<key>NSPrivacyAccessedAPIType</key>
<string>NSPrivacyAccessedAPICategoryFileTimestamp</string>
<key>NSPrivacyAccessedAPITypeReasons</key>
<array>
<string>C617.1</string>
</array>
</dict>
</array>
<key>NSPrivacyCollectedDataTypes</key>
<array>
<dict>
<key>NSPrivacyCollectedDataType</key>
<string>NSPrivacyCollectedDataTypeCrashData</string>
<key>NSPrivacyCollectedDataTypeLinked</key>
<false/>
<key>NSPrivacyCollectedDataTypePurposes</key>
<array>
<string>NSPrivacyCollectedDataTypePurposeAppFunctionality</string>
</array>
<key>NSPrivacyCollectedDataTypeTracking</key>
<false/>
</dict>
<dict>
<key>NSPrivacyCollectedDataType</key>
<string>NSPrivacyCollectedDataTypePerformanceData</string>
<key>NSPrivacyCollectedDataTypeLinked</key>
<false/>
<key>NSPrivacyCollectedDataTypePurposes</key>
<array>
<string>NSPrivacyCollectedDataTypePurposeAppFunctionality</string>
</array>
<key>NSPrivacyCollectedDataTypeTracking</key>
<false/>
</dict>
<dict>
<key>NSPrivacyCollectedDataType</key>
<string>NSPrivacyCollectedDataTypeOtherDiagnosticData</string>
<key>NSPrivacyCollectedDataTypeLinked</key>
<false/>
<key>NSPrivacyCollectedDataTypePurposes</key>
<array>
<string>NSPrivacyCollectedDataTypePurposeAppFunctionality</string>
</array>
<key>NSPrivacyCollectedDataTypeTracking</key>
<false/>
</dict>
</array>
</dict>
</plist>
12 changes: 6 additions & 6 deletions samples/react-native/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,9 @@
"@react-navigation/stack": "^6.3.20",
"delay": "^6.0.0",
"react": "18.2.0",
"react-native": "0.73.2",
"react-native": "0.73.9",
"react-native-gesture-handler": "^2.14.0",
"react-native-macos": "^0.73.0-0",
"react-native-macos": "0.73.34",
"react-native-safe-area-context": "4.8.0",
"react-native-screens": "3.29.0",
"react-native-vector-icons": "^10.0.3",
Expand All @@ -39,10 +39,10 @@
"@babel/core": "^7.22.5",
"@babel/preset-env": "^7.22.5",
"@babel/runtime": "^7.22.5",
"@react-native/babel-preset": "^0.73.18",
"@react-native/eslint-config": "^0.73.1",
"@react-native/metro-config": "^0.73.1",
"@react-native/typescript-config": "^0.73.1",
"@react-native/babel-preset": "0.73.21",
"@react-native/eslint-config": "0.73.2",
"@react-native/metro-config": "0.73.5",
"@react-native/typescript-config": "0.73.1",
"@types/react": "^18.2.65",
"@types/react-native-vector-icons": "^6.4.18",
"@types/react-test-renderer": "^18.0.0",
Expand Down
Loading

0 comments on commit 7d75153

Please sign in to comment.