-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
[SR-6969] Support apinotes for revising C APIs #4838
Comments
@swift-ci create |
What does Swift compiler expect here? If its only -I, this should already work if you place the apinote file in include/ directory of a C target. /cc @belkadan |
The API notes go next to the module map defining the module for a non-framework target. That seems perfectly compatible with C targets today, but I don't know if we actually have it all set up to work. |
Thanks Jordan. I tested this and it already works. Attached a sample package to this JIRA. |
Awesome, thanks @aciidb0mb3r @belkadan |
Comment by Ryan Lovelett (JIRA) I'm not sure this is 100% working. At least not with Swift 4.2. If you use the attached You get a error/fixit saying:
Beyond that I still don't know how this would work when using a System Library target. |
This does not work using the sample attached when using:
|
Attachment: Download
Additional Detail from JIRA
md5: 72f523b6a8075ff7c85272f077074b1f
Issue Description:
Occasionally when wrapping third-party C APIs it would be convenient to convince Swift to hide or differently expose the types in the underlying library. The Swift standard library does this by using apinotes, and while it is possible to create your own these are system-specific and SwiftPM does not provide any tools for distributing them.
It would be extremely convenient if SwiftPM came up with a way to support this use-case in a productised way.
The text was updated successfully, but these errors were encountered: