Skip to content

[APINotes] Fix mis-annotated error code enums. #5051

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

Conversation

jrose-apple
Copy link
Contributor

  • Explanation: Our API notes sidecar data has an annotation that can be used to associate an enum representing error codes with an NSError domain string constant. However, in the mechanical process of finding all such error code enums, we messed up and accidentally renamed them to the domain constant instead. This change fixes that.
  • Scope: Only affects users of these particular errors.
  • Issue: rdar://problem/28507946
  • Reviewed by: @DougGregor
  • Risk: Medium-low. Someone could have written code using the "wrong" name, but it's clearly incorrect, and since we haven't seen complaints about the unexpected renames, it's possible there isn't any such code.
  • Testing: Manually verified that the enums import as Swift errors now.

Some files accidentally /renamed/ the enums using SwiftName rather than
associating them with an error domain constant. Amazingly, we've gotten
no complaints about this.

(cherry picked from commit 3e6fa8b)
@jrose-apple
Copy link
Contributor Author

@swift-ci Please test OS X platform

@tkremenek tkremenek self-assigned this Sep 28, 2016
@tkremenek tkremenek merged commit ccbe629 into swiftlang:swift-3.0-branch Sep 29, 2016
@jrose-apple jrose-apple deleted the swift-3-NSErrorDomain-apinotes branch September 29, 2016 01:23
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.

2 participants