Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

misc: Update CONTRIBUTING.md for the monorepo changes #4087

Merged
merged 1 commit into from
Oct 2, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
51 changes: 25 additions & 26 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,18 +1,23 @@
# Contributing

This repository contains a sample project. It can be used to test the SDK as you develop it.
This repository contains mono repository structure with multiple React Native and Expo project for development and testing.

# Requirements
# Overview

- / -> monorepo root private package
- /samples -> sample application, expo, rn...
- /packages -> RN SDK packages
- /dev-packages -> dev packages, ts-3.8 test runner, e2e tests components and runner
- /performance-tests -> applications used for measuring performance in CI

You need:
# Requirements

- nodejs 14 or higher
- yarn 1 or higher
- nodejs 18 (with corepack enabled)
- yarn version specified in `package.json` (at the moment version 3.6)

## Building

First install dependencies of the SDK (the root of the repository)
This is only needed if dependencies are added/removed.
Install dependencies using:

```sh
yarn
Expand All @@ -23,17 +28,19 @@ Once deps are installed, you can build the project:
```sh
yarn build

# Or in watch mode, for development
# Or in watch mode, for development of the SDK core

yarn build:watch
cd packages/core
yarn build:sdk:watch
```

## testing
## Testing

```sh
yarn test

# Or the watcher when writing tests:
cd packages/core
yarn test:watch
```

Expand All @@ -43,9 +50,16 @@ Now we can go into the sample project, install and build it:

```sh
cd samples/react-native/
yarn

yarn start # Metro development server

npx pod-install
yarn ios # iOS Development build
yarn android # Android Development build
```

Recommended is to open the native project in `samples/react-native/android` and `samples/react-native/ios` on Android Studio and Xcode respectively.

### Run the emulators (legacy-architecture):

For android switch `newArchEnabled` to `false` in [android/gradle.properties](https://github.com/getsentry/sentry-react-native/blob/c95aa21497ca93aaaaf0b44d170dc39dc7bcf660/sample-new-architecture/android/gradle.properties#L40). For iOS explicitly disable fabric in `samples/react-native/ios/Podfile` by setting `:fabric_enabled => false` before `pod install`.
Expand Down Expand Up @@ -77,20 +91,6 @@ yarn run-ios --configuration Release
yarn run-android --variant=release
```

### Optional
You can optionally start the Metro bundler if you want to control where it runs:

```sh
yarn start --reset-cache
```

Run the emulators:

```sh
yarn react-native run-ios
yarn react-native run-android
```

## Develop with sentry-cocoa

Here are step on how to test your changes in `sentry-cocoa` with `sentry-react-native`. We assume you have both repositories cloned in siblings folders.
Expand All @@ -100,7 +100,6 @@ Here are step on how to test your changes in `sentry-cocoa` with `sentry-react-n
```sh
cd sentry-cocoa
make init
make build-xcframework
```

2. Link local `sentry-cocoa` build in `sentry-react-native`
Expand Down
Loading