Would someone mind sanity-checking me on something, please?
I'm trying to build the RabbitMQ Client, while porting it to Swift 3 and OS X (which it doesn't support). That is, the tests are written in Swift while the RabbitMQ library itself remains Obj-C. I'm have a frustrating compile error between the two. I've boiled the error down to the following two files. When I make an Xcode 8 project with just these, it won't build... and they couln't be simpler...
ChannelSpy.swift :
import Foundation
class ChannelSpy: RMQChannel {
func direct(_ name: String!) {}
}
RMQChannel.h :
#import <Foundation/Foundation.h>
@protocol RMQChannel
- (void) direct:(NSString *)name;
@end
Bridging-Header.h :
#import "RMQChannel.h"
Upon Build, I get the following:
Type 'ChannelSpy' does not conform to protocol 'RMQChannel'
Protocol requires function 'dirent' with type '(String!) -> Void'; do you want to add a stub?
/Proj/. . ./ChannelSpy.swift:4:7: error: type 'ChannelSpy' does not conform to protocol 'RMQChannel'
class ChannelSpy: RMQChannel {
^
__ObjC.RMQChannel:2:17: note: protocol requires function 'dirent' with type '(String!) -> Void'; do you want to add a stub?
public func dirent(_ name: String!)
^
What's this "dirent" stuff? Am I (or the Rabbit project) not allowed to use the name "direct"? I googled this (extensively, of course) and I see vestiges of "#define direct dirent" in ancient BSD code remnants, but I'm sure that has nothing to do with anything.
Can anyone shed any light on this mystery? Or help verify whether or not I've lost my mind? Thanks SO MUCH for any help...
Tadd