fix: MSB4006 circular dependency involving target "SetupCocoaSDK"#4956
Open
jamescrosswell wants to merge 2 commits intomainfrom
Open
fix: MSB4006 circular dependency involving target "SetupCocoaSDK"#4956jamescrosswell wants to merge 2 commits intomainfrom
jamescrosswell wants to merge 2 commits intomainfrom
Conversation
Contributor
Semver Impact of This PR⚪ None (no version bump detected) 📋 Changelog PreviewThis is how your changes will appear in the changelog. Features ✨
Fixes 🐛
Dependencies ⬆️Deps
Other
🤖 This preview updates automatically when you update the PR. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #4956 +/- ##
=======================================
Coverage 73.89% 73.89%
=======================================
Files 496 496
Lines 17951 17951
Branches 3516 3516
=======================================
Hits 13265 13265
Misses 3825 3825
Partials 861 861 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
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.
Resolves #4955:
Explanation
Me and Claude spent a bit of time looking at this. I think we now have a solution that is OK.
What the original code did
The recursive MSBuild call with
RemoveProperties="TargetFramework"meant that during an inner build, instead of running_SetupCocoaSDKdirectly, it spawned a separate MSBuild process on the same project with no TargetFramework set. That separate process ran_SetupCocoaSDKonce in isolation. So across both inner TFM builds, the actual work happened in one subprocess — not in the inner builds themselves.What the new code does
_SetupCocoaSDKnow runs once per inner build (once fornet9.0-ios18.0, once fornet9.0-maccatalyst18.0).However, every sub-target of
_SetupCocoaSDKis idempotent and has checks to make sure we're not double handling:_DownloadCocoaSDK— has Condition="... And !Exists('$(SentryCocoaFramework)')", so ,skips if already downloaded_BuildCocoaSDK— has Inputs/Outputs incremental build guards, skips if up-to-date_GenerateSentryCocoaBindings— has Inputs/Outputs, skips if up-to-dateSanitizeSentryCocoaFramework— has "!Exists('$(SentryCocoaFramework).sanitized.stamp"