swiftlang / swift

The Swift Programming Language
https://swift.org
Apache License 2.0
66.67k stars 10.28k forks source link

Not all concurrency annotations added to Objective-C are visible in the Swift translation #74629

Open mattmassicotte opened 1 week ago

mattmassicotte commented 1 week ago

Motivation

I've discovered that if I add concurrency-related annotations to Objective-C signatures, the compiler understands them, but Xcode does not make them visible. Here's an example:

+ (void)jetPackConfiguration:(void (NS_SWIFT_SENDABLE ^)(void))completionHandler NS_SWIFT_DISABLE_ASYNC;

Note the lack of @Sendable

class func jetPackConfiguration(_ completionHandler: @escaping () -> Void)

Now it is entirely possible this is not a compiler issue. I'm just guessing because of this:

https://github.com/swiftlang/swift/pull/72037

Proposed solution

I'd like to see the fully annotated function siguature!

Alternatives considered

No response

Additional information

No response

MaxDesiatov commented 1 week ago

Is this reproducible for you with VS Code? If it's Xcode only, it might require filing an FB I'm afraid.

mattmassicotte commented 6 days ago

Yeah, it could be this is an Xcode issue. But, reason I assumed that may not be the case is because it took a compiler change to expose global actors in this same place.