Skip to content

[5.1] ABI/API checker: avoid printing fully qualified names in generic signature #26643

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 5 commits into from
Aug 14, 2019

Conversation

nkcsgexi
Copy link
Contributor

The heuristics to decide whether fully qualified type names should be printed may
work differently when generating the baseline and when importing from just built
frameworks. This patch makes it consistent so that such false positives won't happen.

rdar://54276347

Under ABI checking mode where we don't have sugar types, any printed name
changes of type nodes worth raising an alert.

rdar://45567621
…ature

The heuristics to decide whether fully qualified type names should be printed may
work differently when generating the baseline and when importing from just built
frameworks. This patch makes it consistent so that such false positives won't happen.

rdar://54276347
@nkcsgexi nkcsgexi requested a review from a team as a code owner August 13, 2019 22:52
@nkcsgexi
Copy link
Contributor Author

@swift-ci please test

@jrose-apple
Copy link
Contributor

This seems backwards; you should prefer fully qualified names because otherwise you can get false negatives.

@nkcsgexi
Copy link
Contributor Author

In practice, other diagnostics will be emitted if a type has been moved around, e.g. "struct S has been removed". We shouldn't rely on generic signature changes to tell us about type changes.

@jrose-apple
Copy link
Contributor

I'm not worried about changes to the type; I'm worried about getting, e.g., Swift.Result and Combine.Result confused. (The latter doesn't exist; I'm just contriving an example.)

@nkcsgexi
Copy link
Contributor Author

@jrose-apple ah, I see. Thank you for taking a look! I agree that fully qualified type names in the generic signatures seem to be a better choice in that case. Since we need this current PR as a minimum change to eliminate the false positives some framework authors saw, I plan to merge it as it is and update to using the fully qualified name on master (here: #26642 ).

@jrose-apple
Copy link
Contributor

I guess either way we're breaking the baseline, so 👍

@nkcsgexi nkcsgexi merged commit 20b8d4c into swiftlang:swift-5.1-branch Aug 14, 2019
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.

3 participants