From 9db7a467ef02b6bd4b81faa0b7605e44693aee4b Mon Sep 17 00:00:00 2001 From: Ricardo Colombo Oliveira Date: Fri, 18 Sep 2026 11:39:59 +0200 Subject: [PATCH] build: gate Cocoa bindings regeneration on a stamp file The generated files were the target's Outputs, but Objective Sharpie writes ApiDefinition.cs before patch-cocoa-bindings.cs makes it valid C#. A parallel build sampling the timestamps in between skipped generation and compiled the unpatched output. Gate the check on a stamp touched once generation and patching are both done, so a late instance blocks on the in-flight TargetFramework=once request. The generated files stay in Outputs so a deleted one still forces regeneration. Latent until #5594 removed a non-existent glob input that had been forcing the target to run every time. Co-Authored-By: Claude Opus 5 (1M context) --- src/Sentry.Bindings.Cocoa/Sentry.Bindings.Cocoa.csproj | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/Sentry.Bindings.Cocoa/Sentry.Bindings.Cocoa.csproj b/src/Sentry.Bindings.Cocoa/Sentry.Bindings.Cocoa.csproj index a22588c45f..55b1800b24 100644 --- a/src/Sentry.Bindings.Cocoa/Sentry.Bindings.Cocoa.csproj +++ b/src/Sentry.Bindings.Cocoa/Sentry.Bindings.Cocoa.csproj @@ -18,6 +18,7 @@ $(SentryCocoaCache)Carthage\Build-$(TargetPlatformIdentifier)\SentryObjC-Dynamic.xcframework ../../scripts/generate-cocoa-bindings.ps1;../../scripts/patch-cocoa-bindings.cs;../../.config/dotnet-tools.json;$(SentryCocoaCache)Carthage/.built-from-sha + $(MSBuildThisFileDirectory)obj/cocoa-bindings.stamp $([MSBuild]::NormalizePath($(MSBuildThisFileDirectory), $(SentryCocoaCache).git)) @@ -100,13 +101,14 @@ + Outputs="ApiDefinition.cs;StructsAndEnums.cs;$(SentryCocoaBindingsStamp)"> +