Skip to content
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

[docs] Start a doc on ClangImporter C->Swift name mapping #26947

Merged
merged 1 commit into from Sep 3, 2019

Conversation

@jrose-apple
Copy link
Member

commented Aug 30, 2019

Includes enums in all their flavors, plus swift_wrapper structs.

Planned future content:

  • Methods, initializers, properties
    • "Omit-needless-words" rules
    • NSError
    • Boolean properties
    • Inferred default arguments
    • Factory methods as initializers
  • Protocols (mainly just that they check for collision)
  • CF types (low-priority since non-Apple people can't make them)
  • Custom names, including import-as-member and import-as-accessor
  • swift_private
@jrose-apple

This comment has been minimized.

Copy link
Member Author

commented Aug 30, 2019

@swift-ci Please smoke test

@xymus
xymus approved these changes Aug 30, 2019
docs/CImportNameTranslation.md Outdated Show resolved Hide resolved
@brentdax
Copy link
Collaborator

left a comment

This is a very welcome addition to our docs folder!

docs/CImportNameTranslation.md Outdated Show resolved Hide resolved
@nkcsgexi
Copy link
Contributor

left a comment

Thanks for adding this! Could you mention where the name translation APIs are declared in the compiler source? I presume it's SwiftNameTranslation.h?

@jrose-apple

This comment has been minimized.

Copy link
Member Author

commented Sep 3, 2019

swift/AST/SwiftNameTranslation.h is for Swift-to-ObjC, not ObjC-to-Swift. Most of what's talked about here is in swift/ClangImporter/ImportName.h, but not all of it.

@jrose-apple

This comment has been minimized.

Copy link
Member Author

commented Sep 3, 2019

@swift-ci Please smoke test

@nkcsgexi

This comment has been minimized.

Copy link
Contributor

commented Sep 3, 2019

ah, OK. Notice that both directions of translation are interesting for cross-language automatic renaming.

@jrose-apple

This comment has been minimized.

Copy link
Member Author

commented Sep 3, 2019

Notice that both directions of translation are interesting for cross-language automatic renaming.

I think I'll rename the file to CToSwiftNameTranslation, leaving room for a future SwiftToCNameTranslation.

@nkcsgexi

This comment has been minimized.

Copy link
Contributor

commented Sep 3, 2019

I think I'll rename the file to CToSwiftNameTranslation, leaving room for a future SwiftToCNameTranslation.

Sounds good, Thank you!

[docs] Start a doc on ClangImporter C->Swift name mapping
Includes enums in all their flavors, plus swift_wrapper structs.
Planned future content:

- Methods, initializers, properties
  - "Omit-needless-words" rules
  - NSError
  - Boolean properties
  - Inferred default arguments
  - Factory methods as initializers
- Protocols (mainly just that they check for collision)
- CF types (low-priority since non-Apple people can't make them)
- Custom names, including import-as-member and import-as-accessor
- swift_private

@jrose-apple jrose-apple force-pushed the jrose-apple:a-me-by-any-other-name branch from 6f0184e to aca84b9 Sep 3, 2019

@jrose-apple

This comment has been minimized.

Copy link
Member Author

commented Sep 3, 2019

@swift-ci Please smoke test

@jrose-apple

This comment has been minimized.

Copy link
Member Author

commented Sep 3, 2019

We've got three approving reviewers so far, so if anyone else has comments we can take it in post-commit review.

@jrose-apple jrose-apple merged commit 682c45c into apple:master Sep 3, 2019

2 checks passed

Swift Test Linux Platform (smoke test)
Details
Swift Test OS X Platform (smoke test)
Details

@jrose-apple jrose-apple deleted the jrose-apple:a-me-by-any-other-name branch Sep 3, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants
You can’t perform that action at this time.