Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

### Fixes

- Partial workaround for MAX_PATH issues when building iOS applications from Windows ([#4533](https://github.com/getsentry/sentry-dotnet/pull/4533))
- In MAUI Android apps, generate and inject UUID to APK and upload ProGuard mapping to Sentry with the UUID ([#4532](https://github.com/getsentry/sentry-dotnet/pull/4532))

## 5.15.1
Expand Down
9 changes: 9 additions & 0 deletions src/Sentry.Bindings.Cocoa/Sentry.Bindings.Cocoa.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,15 @@
<Exec Condition="'$(GITHUB_ACTIONS)' == 'true'" Command="pwsh ../../scripts/dirty-check.ps1 -PathToCheck $(MSBuildThisFileDirectory)" />
</Target>

<!-- Sanitize the xcframework before NativeReference resolution and packing -->
<Target Name="SanitizeSentryCocoaFramework"
AfterTargets="_GenerateSentryCocoaBindings"
BeforeTargets="ResolveNativeReferences"
Condition="$([MSBuild]::IsOSPlatform('OSX')) and Exists('$(SentryCocoaFramework)')">
<Message Importance="High" Text="Sanitizing $(SentryCocoaFramework): removing dSYMs, Headers, Modules, PrivateHeaders (including symlinks)." />
<Exec Command="bash -c 'find &quot;$(SentryCocoaFramework)&quot; -depth \( -name dSYMs -o -name Headers -o -name Modules -o -name PrivateHeaders \) -exec echo Removing {} \; -exec rm -rf {} + 2&gt;/dev/null || true'" />
Copy link
Collaborator

Choose a reason for hiding this comment

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

I think this executes for multiple target frameworks in parallel. Might be the reason you had to ignore errors because the two commands race and conflict?

What if this was already done at the end of _SetupCocoaSDK, which is guarded to run only once? If we need to ignore errors regardless, we could get away without bash with <Exec IgnoreExitCode="true" ... />

Copy link
Collaborator

Choose a reason for hiding this comment

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

P.S. rm has verbose mode (-v) with quite similar output

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I don't think the Android Device test failures had anything to do with these changes to the Cocoa Bindings project... they appear to be flaky on other unrelated branches as well:

Given that, I think we can create a pre-release from this branch that some of our SDK users can test before we consider merging it into main.

Copy link
Collaborator

@jpnurmi jpnurmi Sep 22, 2025

Choose a reason for hiding this comment

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

The same find $(SentryCocoaFramework) ... -exec rm {} command runs in parallel for net8.0-ios17.0 and net8.0-maccatalyst17.0 even if both operate on the same modules/sentry-cocoa/Sentry-8.56.0.xcframework directory.

Instead of ignoring errors caused by the race between those two commands running in the same directory, could we move the Exec-task to _SetupCocoaSDK, which is executed exactly once? That way, we could simplify the command to:

Suggested change
<Exec Command="bash -c 'find &quot;$(SentryCocoaFramework)&quot; -depth \( -name dSYMs -o -name Headers -o -name Modules -o -name PrivateHeaders \) -exec echo Removing {} \; -exec rm -rf {} + 2&gt;/dev/null || true'" />
<Exec Command="find &quot;$(SentryCocoaFramework)&quot; -depth \( -name dSYMs -o -name Headers -o -name Modules -o -name PrivateHeaders \) -exec rm -rfv {} +" />

</Target>

<!-- Workaround for https://github.com/xamarin/xamarin-macios/issues/15299 -->
<Target Name="_SetGeneratedSupportDelegatesInternal" BeforeTargets="CoreCompile" Condition="$([MSBuild]::IsOSPlatform('OSX'))"
Inputs="$(GeneratedSourcesDir)SupportDelegates.g.cs" Outputs="$(GeneratedSourcesDir)SupportDelegates.g.cs.stamp">
Expand Down
Loading