Skip to content

[Import as member] First draft of renaming CG APIs #2107

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

Merged
merged 4 commits into from
Apr 9, 2016

Conversation

milseman
Copy link
Member

@milseman milseman commented Apr 8, 2016

What's in this pull request?

[Import as member] First draft of renaming CG APIs

This includes several large manual renaming of CG APIs where we want
different results than what the inference system produces.

Several CG APIs are meant to be imported as nonswift, so mark them so
in our API notes.

Resolved bug number: (SR-)


Before merging this pull request to apple/swift repository:

  • Test pull request on Swift continuous integration.

Triggering Swift CI

The swift-ci is triggered by writing a comment on this PR addressed to the GitHub user @swift-ci. Different tests will run depending on the specific comment that you use. The currently available comments are:

Smoke Testing

Platform Comment
All supported platforms @swift-ci Please smoke test
OS X platform @swift-ci Please smoke test OS X platform
Linux platform @swift-ci Please smoke test Linux platform

Validation Testing

Platform Comment
All supported platforms @swift-ci Please test
OS X platform @swift-ci Please test OS X platform
Linux platform @swift-ci Please test Linux platform

Note: Only members of the Apple organization can trigger swift-ci.

@milseman
Copy link
Member Author

milseman commented Apr 8, 2016

@swift-ci please test

# CGBitmapContext
# FIXME: below doesn't work
- Name: CGBitmapContextCreateImage
SwiftName: CGContextRef.makeImageFromBitmap(self:)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This probably isn't so important, but what's the reason for these all having "Ref" on them? Shouldn't we prefer the non-Ref names?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's due to a limitation in the ClangImporter, where name lookup is done on C names rather than Swift type names. The C name CGContext turns out to be a forward declaration only, and we can't import those as decl contexts.

I've asked @DougGregor if we should use Swift lookup instead.

milseman added 3 commits April 8, 2016 15:27
Several CG APIs are meant to be imported as nonswift, so mark them so
in our API notes.
This includes several large manual renaming of CG APIs where we want
different results than what the inference system produces.
@milseman
Copy link
Member Author

milseman commented Apr 8, 2016

@swift-ci please test

@milseman
Copy link
Member Author

milseman commented Apr 9, 2016

@swift-ci please test

@tkremenek
Copy link
Member

Reverted in #2110 because this broke the build.

@gparker42
Copy link
Contributor

That build failure might be another "delete the module cache" problem like this one earlier today:
65ae689#commitcomment-17034192

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants