realm / jazzy

Soulful docs for Swift & Objective-C
https://realm.io
MIT License
7.35k stars 413 forks source link

objc method produces multiple methods in generated swift interface but jazzy ignores some of them #1311

Open gerchicovy opened 2 years ago

gerchicovy commented 2 years ago

Example:

NS_ASSUME_NONNULL_BEGIN
typedef void(^SomeCompletion)(NSString * _Nullable str);

@interface SomeClass: NSObject
- (void)loadTokenWithCompletionHandler:(SomeCompletion)completionHandler;
@end
NS_ASSUME_NONNULL_END

Generated swift file:

public typealias SomeCompletion = (String?) -> Void

open class SomeClass : NSObject {
open func loadToken(completionHandler: @escaping SomeCompletion)
open func loadToken() async -> String?
}

Generated documentation contains description of open func loadToken() async -> String? only which is even less intuitive.

johnfairh commented 2 years ago

This is a Swift issue -- they give both methods the same 'unique' USR. It might be possible to work around in sourcekitten.