ci: fix dirty-check for generated Cocoa bindings#4600
Merged
jamescrosswell merged 5 commits intomainfrom Oct 6, 2025
Merged
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #4600 +/- ##
==========================================
+ Coverage 73.45% 73.49% +0.03%
==========================================
Files 482 482
Lines 17678 17678
Branches 3493 3493
==========================================
+ Hits 12986 12993 +7
+ Misses 3801 3797 -4
+ Partials 891 888 -3 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
| <SentryCocoaVersion>$([System.Text.RegularExpressions.Regex]::Match($(SentryCocoaProperties), 'version\s*=\s*([^\s]+)').Groups[1].Value)</SentryCocoaVersion> | ||
| <SentryCocoaFramework>$(SentryCocoaCache)Sentry-$(SentryCocoaVersion).xcframework</SentryCocoaFramework> | ||
| <SentryCocoaBindingInputs>../../modules/sentry-cocoa.properties;../../scripts/generate-cocoa-bindings.ps1</SentryCocoaBindingInputs> | ||
| <SentryCocoaBindingInputs>../../modules/sentry-cocoa.properties;../../scripts/generate-cocoa-bindings.ps1;$(SentryCocoaFrameworkHeaders)**/*.h</SentryCocoaBindingInputs> |
Collaborator
There was a problem hiding this comment.
Strange that the headers could change without the sentry-cocoa.properties changing (i.e. the version of the Sentry Cocoa SDK changing)... but yeah sure, the headers are ultimately what drives the generated code.
jamescrosswell
approved these changes
Oct 6, 2025
alexsohn1126
pushed a commit
that referenced
this pull request
Oct 11, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fix the dirty-check which ensures that the committed versions of
src/Sentry.Bindings.Cocoa/ApiDefinitions.csandStructsAndDefinitions.csare up-to-date after Cocoa SDK updates, as they are automatically re-generated by the build system:sentry-dotnet/src/Sentry.Bindings.Cocoa/Sentry.Bindings.Cocoa.csproj
Lines 132 to 134 in ad849d4
The problem was that
sentry-cocoa.propertiesandgenerate-cocoa-bindings.ps1alone were not sufficient inputs for MSBuild to trigger_GenerateSentryCocoaBindings, so the bindings were not re-generated in the CI. Adding framework headers, which are the effective sources for the bindings, helps. With this change, the build / .NET (macos) CI job fails with:Came up in:
#skip-changelog