-
-
Notifications
You must be signed in to change notification settings - Fork 225
ci: fix dirty-check for generated Cocoa bindings #4600
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
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> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Fix the dirty-check which ensures that the committed versions of
src/Sentry.Bindings.Cocoa/ApiDefinitions.cs
andStructsAndDefinitions.cs
are 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.properties
andgenerate-cocoa-bindings.ps1
alone 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