Skip to content

[Migrator] Don't run AST passes when in Swift 4 or later #10543

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
Jun 23, 2017
Merged

[Migrator] Don't run AST passes when in Swift 4 or later #10543

merged 1 commit into from
Jun 23, 2017

Conversation

bitjammer
Copy link
Contributor

AST passes assume that you are migrating from a version earlier
than Swift 4, where declaration references and type names may be
unconditionally renamed if their USRs match.

For example, this can happen for TypeMemberDiffItem entries where the
Objective-C USR is the same in Swift 3 and Swift 4, but the type is
spelled differently in Swift 4. A concrete example of this is:

NSDocumentTypeDocumentAttribute (Swift 3) ->
NSAttributedString.DocumentAttributeKey (Swift 4).

Although this declaration is imported differently in Swift 4, its
Objective-C USR is c:@NSDocumentTypeDocumentAttribute for both.

rdar://problem/32604558

AST passes assume that you are migrating from a version earlier
than Swift 4, where declaration references and type names may be
unconditionally renamed if their USRs match.

For example, this can happen for TypeMemberDiffItem entries where the
Objective-C USR is the same in Swift 3 and Swift 4, but the type is
spelled differently in Swift 4. A concrete example of this is:

`NSDocumentTypeDocumentAttribute` (Swift 3) ->
  `NSAttributedString.DocumentAttributeKey` (Swift 4).

Although this declaration is imported differently in Swift 4, its
Objective-C USR is `c:@NSDocumentTypeDocumentAttribute` for both.

rdar://problem/32604558
@bitjammer
Copy link
Contributor Author

@swift-ci Please test

@bitjammer bitjammer merged commit e56d533 into swiftlang:swift-4.0-branch Jun 23, 2017
@bitjammer bitjammer deleted the rdar-32604558-migrator-skip-ast-passes-swift-4-swift-4.0-branch branch June 23, 2017 23:21
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.

1 participant