Skip to content

build: switch to sentry-cocoa submodule for managed builds#5131

Open
jpnurmi wants to merge 7 commits intomainfrom
jpnurmi/build/cocoa-submodule
Open

build: switch to sentry-cocoa submodule for managed builds#5131
jpnurmi wants to merge 7 commits intomainfrom
jpnurmi/build/cocoa-submodule

Conversation

@jpnurmi
Copy link
Copy Markdown
Collaborator

@jpnurmi jpnurmi commented Apr 13, 2026

Allows building sentry-cocoa with SENTRY_CRASH_MANAGED_RUNTIME for eliminating duplicate native exceptions on iOS:

Note: The old .properties -based release download is left intact to make it easy to switch back in the future if we ever get an official managed build variant...

#skip-changelog

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 13, 2026

Semver Impact of This PR

None (no version bump detected)

📋 Changelog Preview

This is how your changes will appear in the changelog.
Entries from this PR are highlighted with a left border (blockquote style).


This PR will not appear in the changelog.


🤖 This preview updates automatically when you update the PR.

@codecov
Copy link
Copy Markdown

codecov bot commented Apr 13, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 74.00%. Comparing base (faa691d) to head (94f4583).
⚠️ Report is 2 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #5131      +/-   ##
==========================================
+ Coverage   73.99%   74.00%   +0.01%     
==========================================
  Files         499      499              
  Lines       18067    18067              
  Branches     3520     3520              
==========================================
+ Hits        13368    13371       +3     
+ Misses       3839     3837       -2     
+ Partials      860      859       -1     

☔ 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.

@jpnurmi jpnurmi marked this pull request as ready for review April 13, 2026 11:48
Copy link
Copy Markdown

@cursor cursor bot left a comment

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

Bugbot Autofix prepared a fix for the issue found in the latest run.

  • ✅ Fixed: Deleted properties file still referenced in csproj fallback
    • Restored modules/sentry-cocoa.properties so the existing non-submodule fallback PropertyGroup can safely read version metadata again.

Create PR

Or push these changes by commenting:

@cursor push f857a6ea73
Preview (f857a6ea73)
diff --git a/modules/sentry-cocoa.properties b/modules/sentry-cocoa.properties
new file mode 100644
--- /dev/null
+++ b/modules/sentry-cocoa.properties
@@ -1,0 +1,2 @@
+version = 9.8.0
+repo = https://github.com/getsentry/sentry-cocoa

This Bugbot Autofix run was free. To enable autofix for future PRs, go to the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 5c69a43. Configure here.

Comment on lines +11 to +24
# Serialize concurrent invocations; parallel xcodebuilds race on DerivedData.
while ! mkdir "$LOCK_DIR" 2>/dev/null; do
build_pid=$(cat "$LOCK_DIR/pid" 2>/dev/null || true)
if [[ -n "$build_pid" ]] && ! kill -0 "$build_pid" 2>/dev/null; then
echo "Previous build did not complete (pid $build_pid); cleaning up and retrying" >&2
# Atomically claim the stale dir via rename
if mv "$LOCK_DIR" "$LOCK_DIR.stale.$$" 2>/dev/null; then
rm -rf "$LOCK_DIR.stale.$$"
fi
continue
fi
sleep 2
done
echo $$ > "$LOCK_DIR/pid"
Copy link
Copy Markdown
Collaborator Author

@jpnurmi jpnurmi Apr 13, 2026

Choose a reason for hiding this comment

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

Avoiding parallel per-TFM calls from MSBuild is painful (#4956), so this attempts to solve parallelization conflicts in the build script instead...

jpnurmi and others added 4 commits April 14, 2026 08:51
Allows building sentry-cocoa with `SENTRY_CRASH_MANAGED_RUNTIME` for
eliminating duplicate native exceptions on iOS.

See also:
- getsentry/sentry-cocoa#6193
- #5126
Switch from a noclobber PID file to a directory lock with a pid file
inside. The atomic mkdir gates acquisition; stale reap renames the dir
to a unique name before rm -rf so two concurrent reapers can't both
proceed to own the lock.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@jpnurmi jpnurmi force-pushed the jpnurmi/build/cocoa-submodule branch from 4071bee to acf4165 Compare April 14, 2026 06:52
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.

1 participant