-
Notifications
You must be signed in to change notification settings - Fork 555
[tools] Add sharpie. Fixes #23962. #24622
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
base: main
Are you sure you want to change the base?
Conversation
Open-source the Objective-Sharpie tool.
* Port the old closed-source version of Objective-Sharpie to modern .NET, and have it use ClangSharp for its clang integration.
* This is a simplified port, any features that were not frequently used have been dropped. In particular, only two features remain:
* Binding an entire OS SDK (which we use for our own bindings).
* Binding a .framework (to bind third-party bindings).
* The new sharpie will be distributed as a .NET command-line tool.
Fixes #23962.
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.
Pull request overview
This PR open-sources the Objective-Sharpie tool by porting it to modern .NET with ClangSharp integration. The tool generates C# bindings from Objective-C APIs, supporting SDK binding and framework binding workflows. It will be distributed as a .NET command-line tool.
Changes:
- Ports Objective-Sharpie from closed-source to open-source using ClangSharp for clang integration
- Implements core binding infrastructure including massagers, attributes, and type system
- Adds comprehensive test suite with test cases for various binding scenarios
Reviewed changes
Copilot reviewed 299 out of 619 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| tools/sharpie/Sharpie.Bind/*.cs | Core binding logic including massagers, type system, and attribute definitions |
| tools/sharpie/Sharpie.Bind.Tool/*.cs | Command-line tool entry point and configuration |
| tests/sharpie/Tests/**/*.h | Test header files for binding scenarios |
| tests/sharpie/Tests/**/*.cs | Expected C# output for test cases |
| tests/xtro-sharpie/**/*.cs | Updates to xtro-sharpie tool to use new ClangSharp-based binding system |
| tools/common/ProductConstants.in.cs | Added SharpieVersion constant |
Files not reviewed (1)
- tools/sharpie/Sharpie.Bind/Resources.designer.cs: Language not supported
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
dalexsoto
left a comment
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.
Looking good!
This comment has been minimized.
This comment has been minimized.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
|
@rolfbjarne I've opened a new pull request, #24625, to work on those changes. Once the pull request is ready, I'll request review from you. |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
✅ [CI Build #f38cb93] Build passed (Detect API changes) ✅Pipeline on Agent |
This comment has been minimized.
This comment has been minimized.
✅ [CI Build #f38cb93] Build passed (Build packages) ✅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 |
This comment has been minimized.
This comment has been minimized.
✅ [CI Build #f38cb93] Build passed (Build macOS tests) ✅Pipeline on Agent |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
💻 [CI Build #f38cb93] Tests on macOS X64 - Mac Sonoma (14) passed 💻✅ All tests on macOS X64 - Mac Sonoma (14) passed. Pipeline on Agent |
💻 [CI Build #f38cb93] Tests on macOS M1 - Mac Monterey (12) passed 💻✅ All tests on macOS M1 - Mac Monterey (12) passed. Pipeline on Agent |
💻 [CI Build #f38cb93] Tests on macOS M1 - Mac Ventura (13) passed 💻✅ All tests on macOS M1 - Mac Ventura (13) passed. Pipeline on Agent |
💻 [CI Build #f38cb93] Tests on macOS arm64 - Mac Sequoia (15) passed 💻✅ All tests on macOS arm64 - Mac Sequoia (15) passed. Pipeline on Agent |
💻 [CI Build #f38cb93] Tests on macOS arm64 - Mac Tahoe (26) passed 💻✅ All tests on macOS arm64 - Mac Tahoe (26) passed. Pipeline on Agent |
This comment has been minimized.
This comment has been minimized.
🔥 [CI Build #f38cb93] Test results 🔥Test results❌ Tests failed on VSTS: test results 3 tests crashed, 0 tests failed, 65 tests passed. Failures❌ linker tests🔥 Failed catastrophically on VSTS: test results - linker (no summary found). Html Report (VSDrops) Download ❌ monotouch tests (iOS)🔥 Failed catastrophically on VSTS: test results - monotouch_ios (no summary found). Html Report (VSDrops) Download ❌ monotouch tests (tvOS)🔥 Failed catastrophically on VSTS: test results - monotouch_tvos (no summary found). Html Report (VSDrops) Download Successes✅ cecil: All 1 tests passed. Html Report (VSDrops) Download Pipeline on Agent |
Open-source the Objective-Sharpie tool.
Fixes #23962.
Fixes #21573.