Skip to content

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

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 1 commit into from
Sep 3, 2019

Conversation

jrose-apple
Copy link
Contributor

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
Copy link
Contributor Author

@swift-ci Please smoke test

Copy link
Contributor

@beccadax beccadax left a comment

Choose a reason for hiding this comment

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

This is a very welcome addition to our docs folder!

Copy link
Contributor

@nkcsgexi nkcsgexi left a comment

Choose a reason for hiding this comment

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

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
Copy link
Contributor Author

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
Copy link
Contributor Author

@swift-ci Please smoke test

@nkcsgexi
Copy link
Contributor

nkcsgexi commented Sep 3, 2019

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

@jrose-apple
Copy link
Contributor Author

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
Copy link
Contributor

nkcsgexi commented Sep 3, 2019

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

Sounds good, Thank you!

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 a-me-by-any-other-name branch from 6f0184e to aca84b9 Compare September 3, 2019 20:56
@jrose-apple
Copy link
Contributor Author

@swift-ci Please smoke test

@jrose-apple
Copy link
Contributor Author

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 swiftlang:master Sep 3, 2019
@jrose-apple jrose-apple deleted the a-me-by-any-other-name branch September 3, 2019 22:16
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