build: allow local modules/sentry-cocoa clone for development#4551
build: allow local modules/sentry-cocoa clone for development#4551
modules/sentry-cocoa clone for development#4551Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #4551 +/- ##
==========================================
+ Coverage 73.37% 73.46% +0.09%
==========================================
Files 479 482 +3
Lines 17505 17678 +173
Branches 3445 3493 +48
==========================================
+ Hits 12844 12988 +144
- Misses 3783 3800 +17
- Partials 878 890 +12 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
To allow rebuilding sentry-cocoa in local development mode when a locally built .xcframework already exists.
|
cool ... I'm wondering if it could help to add a section with these instructions to |
|
I'd propose adding the instructions to |
Flash0ver
left a comment
There was a problem hiding this comment.
Nice! I got a bunch of questions:
modules/README.md
Outdated
There was a problem hiding this comment.
I believe we also miss an entry for sentry-native ... but that's not part of this changeset ... I can follow-up on that afterwards.
|
✅ |
|
Hey @jamescrosswell, are you ok with this minor complication of the build system? It's not something one needs for normal .NET development tasks, but it comes in very handy when working on the Cocoa SDK integration. |
Yep, all good - sounds like a nice compromise 👍🏻 |
jamescrosswell
left a comment
There was a problem hiding this comment.
Looks good - just one minor comment about arm64e.
Motivation
Instructions
To switch to local development mode, replace the pre-built Sentry Cocoa SDK in
modules/sentry-cocoawith a clone ofgetsentry/sentry-cocoa:To switch back to a pre-built Sentry Cocoa SDK, delete the
modules/sentry-cocoaclone and letSentry.Bindings.Cocoa.csprojdownload the version declared inmodules/sentry-cocoa.properties:#skip-changelog (for internal development purposes only)
Note
Enable using a local
modules/sentry-cocoaclone by choosing between downloading prebuilt SDK or building from source, updating bindings generation and docs.modules/sentry-cocoa/.gitto switch between prebuiltxcframeworkand source build (Carthage/Build-*/Sentry.xcframework)._DownloadCocoaSDK(prebuilt),_BuildCocoaSDK(runsscripts/build-sentry-cocoa.sh), combined in_SetupCocoaSDKand invoked unconditionally on macOS.SentryCocoaBindingInputs.scripts/build-sentry-cocoa.sh: copy headers fromios-arm64_arm64e; write build marker from.git/HEADtoCarthage/.built-from-sha.scripts/generate-cocoa-bindings.ps1: support both local clone (useCarthage/Headers) and downloaded framework paths; update header patching andsharpieinputs accordingly.CONTRIBUTING.md: add instructions for switching between prebuilt SDK and localgetsentry/sentry-cocoaclone inmodules/sentry-cocoa.Written by Cursor Bugbot for commit 59da77d. This will update automatically on new commits. Configure here.