[sharpie/xtro] VersionTuple.IsEmpty is incorrect, so use an extension property with the correct implementation.#25034
Conversation
… property with the correct implementation. VersionTuple.IsEmpty is incorrect, so use an extension property with the correct implementation until we get the fixed version from ClangSharp.
There was a problem hiding this comment.
Pull request overview
This PR works around a known ClangSharp VersionTuple.IsEmpty bug by introducing a corrected “empty” check as an extension property, and updating Sharpie/xtro codepaths to use it when interpreting availability versions.
Changes:
- Add
VersionTuple.IsEmptyVersionTupleextension property with a corrected emptiness check. - Replace uses of
VersionTuple.IsEmptywithIsEmptyVersionTuplein Sharpie.Bind availability handling and xtro-sharpie helpers. - Add additional VS Code launch configurations for xtro-sharpie (tvOS/Mac Catalyst/macOS).
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| tools/sharpie/Sharpie.Bind/ClangExtensions.cs | Adds corrected VersionTuple emptiness check as an extension property. |
| tools/sharpie/Sharpie.Bind/Attributes/AvailabilityBaseAttribute.cs | Switches availability emission logic to use the corrected emptiness check. |
| tests/xtro-sharpie/xtro-sharpie/Helpers.cs | Updates availability/deprecation checks to use corrected emptiness logic. |
| tests/xtro-sharpie/xtro-sharpie/AttributeHelpers.cs | Updates ObjC deprecated-version detection to use corrected emptiness logic. |
| tests/xtro-sharpie/.vscode/launch.json | Adds launch profiles for more platforms. |
✅ [CI Build #def926a] Build passed (Build packages) ✅Pipeline on Agent |
✅ [PR Build #def926a] Build passed (Detect API changes) ✅Pipeline on Agent |
✅ API diff for current PR / commitNET (empty diffs)✅ API diff vs stableNET (empty diffs)ℹ️ Generator diffGenerator Diff: vsdrops (html) vsdrops (raw diff) gist (raw diff) - Please review changes) Pipeline on Agent |
✅ [CI Build #def926a] Build passed (Build macOS tests) ✅Pipeline on Agent |
This comment has been minimized.
This comment has been minimized.
🚀 [CI Build #def926a] Test results 🚀Test results✅ All tests passed on VSTS: test results. 🎉 All 156 tests passed 🎉 Tests counts✅ cecil: All 1 tests passed. Html Report (VSDrops) Download macOS tests✅ Tests on macOS Monterey (12): All 5 tests passed. Html Report (VSDrops) Download Linux Build VerificationPipeline on Agent |
VersionTuple.IsEmpty is incorrect, so use an extension property with the
correct implementation until we get the fixed version from ClangSharp.