Skip to content

Add @_objcImplementation attribute #798

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
Oct 21, 2022

Conversation

beccadax
Copy link
Contributor

@beccadax beccadax commented Sep 15, 2022

Part of swiftlang/swift#60630, but safe to merge before the compiler-side implementation.

@beccadax beccadax requested a review from CodaFi September 15, 2022 22:24
@beccadax beccadax requested a review from ahoppen as a code owner September 15, 2022 22:24
@beccadax
Copy link
Contributor Author

@swift-ci please test

@beccadax
Copy link
Contributor Author

@CodaFi I'd like your opinion about the test I added in this PR. Is it worth including given that @_objcImplementation is just using the generalized attribute parsing path, rather than something custom?

@beccadax
Copy link
Contributor Author

With swiftlang/swift#60630

@swift-ci please test

Copy link
Contributor

@CodaFi CodaFi left a comment

Choose a reason for hiding this comment

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

LGTM, test especially. Thanks for adding it.

@CodaFi
Copy link
Contributor

CodaFi commented Sep 16, 2022

Since you're not updating the C++ libSyntax parsing this can be merged independently of the compiler PR whenever you want.

@beccadax
Copy link
Contributor Author

@CodaFi You’d think so, but it actually breaks the compiler build by introducing references to an ObjCImplementationAttr class that hasn’t been added there yet. Check it out: https://ci.swift.org/job/swift-syntax-PR-macOS/615/consoleText

@beccadax beccadax force-pushed the at-implementation branch 2 times, most recently from a71cb0d to 2688154 Compare October 5, 2022 17:40
@@ -399,7 +399,11 @@ def __init__(self, name, swift_name=None):
NotSerialized,
ABIBreakingToAdd, ABIBreakingToRemove, APIBreakingToAdd, APIBreakingToRemove,
code=71),
# NOTE: 72 is unused
Copy link
Member

Choose a reason for hiding this comment

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

I have a vague memory of reading somewhere that it’s unsafe to reuse old codes but can’t find it anymore. @CodaFi do you remember readings something of the sort when migrating AttributeKinds.py from the compiler repository?

Part of swiftlang/swift#60630, but safe to merge before the compiler-side implementation.
@beccadax
Copy link
Contributor Author

With swiftlang/swift#60630

@swift-ci please test

@beccadax beccadax merged commit 397798a into swiftlang:main Oct 21, 2022
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