Skip to content

[NOJIRA] [FIX] Session Replay build issues#1256

Merged
sbarrio merged 4 commits into
developfrom
sbarrio/fix/fix-session-replay-podspec
Apr 22, 2026
Merged

[NOJIRA] [FIX] Session Replay build issues#1256
sbarrio merged 4 commits into
developfrom
sbarrio/fix/fix-session-replay-podspec

Conversation

@sbarrio
Copy link
Copy Markdown
Contributor

@sbarrio sbarrio commented Apr 17, 2026

What does this PR do?

This PR does two things:

  • Refactors the session-replay podspec file to properly align with newer versions of React Native, removing Folly flags and restructuring install_modules_dependencies. This solves build issues and potential hangups during the process.
  • Closes the chokidar watcher after bundle_build_done so the Node process is able to exit, avoiding potential hangups that will hold up the build process.

Additional Notes

Tested on an specific Expo 54.0.33 RN 0.81.5 test app.

Review checklist (to be filled by reviewers)

  • Feature or bugfix MUST have appropriate tests
  • Make sure you discussed the feature or bugfix with the maintaining team in an Issue
  • Make sure each commit and the PR mention the Issue number (cf the CONTRIBUTING doc)
  • If this PR is auto-generated, please make sure also to manually update the code related to the change

@sbarrio sbarrio self-assigned this Apr 17, 2026
@sbarrio sbarrio changed the title [FIX] Session Replay build issues [NOJIRA] [FIX] Session Replay build issues Apr 17, 2026
@sbarrio sbarrio marked this pull request as ready for review April 17, 2026 13:19
@sbarrio sbarrio requested a review from a team as a code owner April 17, 2026 13:19
Copilot AI review requested due to automatic review settings April 17, 2026 13:19
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR targets Session Replay build stability for newer React Native versions by updating the iOS podspec configuration and ensuring the Metro-side asset watcher doesn’t keep the Node process alive after bundling.

Changes:

  • Refactors the Session Replay podspec to remove Folly compiler flags and restructure how new-architecture dependencies/xcconfig are applied.
  • Updates the Metro asset bundler to close the chokidar watcher after bundle completion to allow CI/release Node processes to exit.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.

File Description
packages/react-native-session-replay/src/metro/index.ts Switches from a boolean “watching” guard to a stored watcher instance and closes it after certain Metro reporter events.
packages/react-native-session-replay/DatadogSDKReactNativeSessionReplay.podspec Removes Folly flags and reorganizes install_modules_dependencies + xcconfig application around RCT_NEW_ARCH_ENABLED.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread packages/react-native-session-replay/src/metro/index.ts
Comment thread packages/react-native-session-replay/DatadogSDKReactNativeSessionReplay.podspec Outdated
Comment thread packages/react-native-session-replay/src/metro/index.ts
@marco-saia-datadog
Copy link
Copy Markdown
Member

I am running E2E tests (#108489552) to check for regressions before approving.

require "json"

package = JSON.parse(File.read(File.join(__dir__, "package.json")))
folly_compiler_flags = '-DFOLLY_CFG_NO_COROUTINES=1 -DFOLLY_NO_CONFIG -DFOLLY_MOBILE=1 -DFOLLY_USE_LIBCPP=1 -Wno-comma -Wno-shorten-64-to-32'
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As previously discussed, I would keep the old flags for previous versions, and only change them for the newer ones.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The thing is, we don't set this flags in any other podspec on the SDK. I also ran the E2E suite against this PR and it builds properly even on RN 0.65.

@marco-saia-datadog marco-saia-datadog self-requested a review April 20, 2026 11:10
Copy link
Copy Markdown
Member

@marco-saia-datadog marco-saia-datadog left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

E2E tests are all green, I believe it's safe to merge.

@sbarrio sbarrio merged commit 7c66a4f into develop Apr 22, 2026
11 checks passed
@sbarrio sbarrio deleted the sbarrio/fix/fix-session-replay-podspec branch April 22, 2026 13:42
@cdn34dd cdn34dd mentioned this pull request Apr 29, 2026
4 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants