Skip to content

AST: promote API/ABI impact bit of decl attributes to AST, NFC #27124

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 12, 2019

Conversation

nkcsgexi
Copy link
Contributor

ABI/API checker used to hard-code whether adding or removing of a
decl attribute could break the existing ABI/API. This is not ideal because
new attributes may be added to AST without updating the checker. After this
change, new decl attribute could be specified whether it has ABI/API
impact and the checker could pick up the knowledge instantly.

@jrose-apple
Copy link
Contributor

If you're doing this, it might be worth separating APIBreakingToAdd from APIBreakingToRemove (and similar for ABI).

@nkcsgexi
Copy link
Contributor Author

@jrose-apple Yeah. The existing attributes are breakages in both ways, but separating them like what you mentioned is future-proof.

@nkcsgexi nkcsgexi force-pushed the promote-abi-impact-attribute branch from d4bb94c to f49e2d5 Compare September 12, 2019 00:00
@nkcsgexi
Copy link
Contributor Author

@jrose-apple Now we have four attributes: APIBreakingToAdd, APIBreakingToRemove, ABIBreakingToAdd and ABIBreakingToRemove.

@harlanhaskins Feel free to specify @_hasMissingDesignatedInits as APIBreakingToAdd and ABIBreakingToAdd. We could later adding logics in shouldDiagnoseAddingAttribute to filter out non-open classes. #26060

@nkcsgexi
Copy link
Contributor Author

@swift-ci please smoke test

@nkcsgexi nkcsgexi force-pushed the promote-abi-impact-attribute branch 2 times, most recently from 6498ca7 to bc08b30 Compare September 12, 2019 00:42
@nkcsgexi
Copy link
Contributor Author

@swift-ci please smoke test

ABI/API checker used to hard-code whether adding or removing of a
decl attribute could break the existing ABI/API. This is not ideal because
new attributes may be added to AST without updating the checker. After this
change, new decl attribute could be specified whether it has ABI/API
impact and the checker could pick up the knowledge instantly.
@nkcsgexi nkcsgexi force-pushed the promote-abi-impact-attribute branch from bc08b30 to 4189b6c Compare September 12, 2019 00:58
@nkcsgexi
Copy link
Contributor Author

@swift-ci please smoke test

@nkcsgexi nkcsgexi merged commit a68aa78 into swiftlang:master Sep 12, 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.

2 participants