WITH_ENVIRONMENT
no longer obeyed in monorepos for Xcode scripts bundled with Sentry RN SDK
#761
Labels
WITH_ENVIRONMENT
no longer obeyed in monorepos for Xcode scripts bundled with Sentry RN SDK
#761
Environment
RN 0.74.6 in a mono repo w/ @sentry/react-native 5.35.0 & Volta managing Node versions (configured properly in
.xcode.env
)Steps to Reproduce
node-modules/react-native
hoisted above the app directory)Expected Result
Build works
Actual Result
"Bundle React Native code and images" build phase correctly obeys the
.xcode.env
and find Node via Volta."Upload Debug Symbols to Sentry" build phase fails, stating it can't find Node (it hasn't obeyed
.xcode.env
).PR #329 added support for WITH_ENVIRONMENT in the Sentry scripts to work better in mono repos. It looks like PR #499 broke this when the scripts started being bundled with the RN SDK.
I've patched this locally but I don't have time to raise PRs for the Wizard & Docs right now, sorry: 🙏
sentry-wizard/src/react-native/xcode.ts
Line 168 in dcfc7be
$REACT_NATIVE_PATH
to make it more mono-repo friendly but I think will still fail due to the lack of sourcingWITH_ENVIRONMENT
.What I've done for now is update the "Upload Debug Symbols to Sentry" phase to the following:
An inconsistency I noticed; that the "Bundle React Native code and images" script calls
with-environment.sh
directly before the RN/Sentry script. The waysentry-xcode-debug-files.sh
is written, it expects to source the file itself.Another inconsistency I noticed, but this may be correct, the Bundle phase has input files
.xcode.env
and.xcode.env.local
as Input Files in the Xcode UI but the Upload debug symbols phase doesn't.The text was updated successfully, but these errors were encountered: