Skip to content

Conversation

jpnurmi
Copy link
Collaborator

@jpnurmi jpnurmi commented Sep 22, 2025

Motivation

  1. Local development: To make it easier to develop locally against an unreleased version of the Sentry Cocoa SDK without reverting d179ec9 as done in WIP: Prevent Cocoa SDK from capturing errors that also get captured by .NET #4537
  2. Integration testing: To be able to implement an integration test for [WIP] fix: interop with managed Mono/CoreCLR runtimes sentry-cocoa#6193, Sentry .NET would need to be able to run against an unreleased version of the Sentry Cocoa SDK
  3. C# binding updates: To allow easier experimenting with C# bindings ahead of time for unreleased Sentry Cocoa SDK versions. Due to the ongoing efforts to convert Obj-C types to Swift, it would be nice to be able to test the impact on the C# bindings.

Instructions

To switch to local development mode, replace the pre-built Sentry Cocoa SDK in modules/sentry-cocoa with a clone of getsentry/sentry-cocoa:

$ rm -rf modules/sentry-cocoa
$ gh repo clone getsentry/sentry-cocoa modules/sentry-cocoa
$ dotnet build ...

To switch back to a pre-built Sentry Cocoa SDK, delete the modules/sentry-cocoa clone and let Sentry.Bindings.Cocoa.csproj download the version declared in modules/sentry-cocoa.properties:

$ rm -rf modules/sentry-cocoa
$ dotnet build ...

#skip-changelog (for internal development purposes only)

Copy link

codecov bot commented Sep 22, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 73.32%. Comparing base (58b5da0) to head (05bd4cf).
⚠️ Report is 5 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #4551      +/-   ##
==========================================
- Coverage   73.37%   73.32%   -0.05%     
==========================================
  Files         479      479              
  Lines       17505    17509       +4     
  Branches     3445     3445              
==========================================
- Hits        12844    12839       -5     
- Misses       3783     3790       +7     
- Partials      878      880       +2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

To allow rebuilding sentry-cocoa in local development mode when a
locally built .xcframework already exists.
@Flash0ver
Copy link
Member

cool ... I'm wondering if it could help to add a section with these instructions to CONTRIBUTING.md ... or if there is another location to keep them to make them "discoverable" later on

@jpnurmi jpnurmi marked this pull request as ready for review September 23, 2025 11:51
@jpnurmi
Copy link
Collaborator Author

jpnurmi commented Sep 23, 2025

I'd propose adding the instructions to modules/README.md right next to modules/sentry-cocoa.properties. Let me know if you prefer CONTRIBUTIONS.md instead. :)

cursor[bot]

This comment was marked as outdated.

Copy link
Member

@Flash0ver Flash0ver left a comment

Choose a reason for hiding this comment

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

Nice! I got a bunch of questions:

Fork [getsentry/perfview](https://github.com/getsentry/perfview/).
Tool from the .NET team which includes several utilities used for profiling .NET code.
We use that in our `Sentry.Profiling` package.

Copy link
Member

Choose a reason for hiding this comment

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

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.

@Flash0ver
Copy link
Member

@jpnurmi
Copy link
Collaborator Author

jpnurmi commented Sep 25, 2025

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.

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.

2 participants