apple / swift-cluster-membership

Distributed Membership Protocol implementations in Swift
https://apple.github.io/swift-cluster-membership/
Apache License 2.0
201 stars 20 forks source link

Compiling SWIMNIOExample fails (logs included) #74

Closed Davidde94 closed 3 years ago

Davidde94 commented 3 years ago

Compiling SWIMNIOExample fails with the below log

[1/10] Compiling CNIOLinux ifaddrs-android.c [2/10] Compiling CNIOWindows WSAStartup.c [3/10] Compiling CNIOWindows shim.c [4/10] Compiling CNIOLinux shim.c [5/16] Compiling CNIODarwin shim.c [6/16] Compiling CNIOSHA1 c_nio_sha1.c [7/16] Compiling Logging Locks.swift [8/17] Merging module ClusterMembership [11/17] Compiling CoreMetrics Metrics.swift [12/17] Compiling Logging Logging.swift [14/19] Merging module Logging [15/19] Merging module CoreMetrics [16/20] Compiling c-nioatomics.c [17/20] Compiling c-atomics.c [18/23] Compiling NIOConcurrencyHelpers NIOAtomic.swift [19/23] Compiling NIOConcurrencyHelpers lock.swift [20/23] Compiling NIOConcurrencyHelpers atomics.swift [21/24] Merging module NIOConcurrencyHelpers [22/95] Compiling NIO AddressedEnvelope.swift [23/96] Compiling NIO ThreadWindows.swift [24/96] Compiling NIO TypeAssistedChannelHandler.swift [25/96] Compiling NIO UniversalBootstrapSupport.swift [26/96] Compiling NIO Utilities.swift [27/96] Merging module Metrics [28/108] Compiling NIO PriorityQueue.swift [29/108] Compiling NIO RecvByteBufferAllocator.swift [30/108] Compiling NIO Resolver.swift [31/108] Compiling NIO Selectable.swift [32/108] Compiling NIO Linux.swift [33/108] Compiling NIO LinuxCPUSet.swift [34/108] Compiling NIO MarkedCircularBuffer.swift [35/108] Compiling NIO MulticastChannel.swift [36/108] Compiling SWIM Events.swift [37/108] Compiling SWIM Member.swift [38/108] Compiling SWIM Metrics.swift [39/108] Compiling SWIM Peer.swift [40/108] Compiling SWIM SWIM.swift [41/108] Compiling NIO IO.swift [42/108] Compiling NIO IOData.swift [43/108] Compiling NIO IntegerTypes.swift [44/108] Compiling NIO Interfaces.swift [45/108] Compiling NIO NIOAny.swift [46/108] Compiling NIO NIOCloseOnErrorHandler.swift [47/108] Compiling NIO NIOThreadPool.swift [48/108] Compiling NIO NonBlockingFileIO.swift [49/108] Compiling NIO SocketProtocols.swift [50/108] Compiling NIO System.swift [51/108] Compiling NIO Thread.swift [52/108] Compiling NIO ThreadPosix.swift [53/108] Compiling NIO FileHandle.swift [54/108] Compiling NIO FileRegion.swift [55/108] Compiling NIO GetaddrinfoResolver.swift [56/108] Compiling NIO HappyEyeballs.swift [57/108] Compiling NIO Heap.swift [58/108] Compiling NIO PendingDatagramWritesManager.swift [59/108] Compiling NIO PendingWritesManager.swift [60/108] Compiling NIO PipeChannel.swift [61/108] Compiling NIO PipePair.swift [62/108] Compiling NIO Codec.swift [63/108] Compiling NIO ControlMessage.swift [64/108] Compiling NIO ConvenienceOptionSupport.swift [65/108] Compiling NIO DatagramVectorReadManager.swift [66/108] Compiling NIO DeadChannel.swift [67/108] Compiling NIO Socket.swift [68/108] Compiling NIO SocketAddresses.swift [69/108] Compiling NIO SocketChannel.swift [70/108] Compiling NIO SocketOptionProvider.swift [71/108] Compiling SWIM String+Extensions.swift [72/108] Compiling SWIM _PrettyLog.swift [73/108] Compiling NIO ByteBuffer-views.swift [74/108] Compiling NIO Channel.swift [75/108] Compiling NIO ChannelHandler.swift [76/108] Compiling NIO SelectableEventLoop.swift [77/108] Compiling NIO Selector.swift [78/108] Compiling NIO ServerSocket.swift [79/108] Compiling NIO SingleStepByteToMessageDecoder.swift [80/108] Compiling NIO ChannelHandlers.swift [81/108] Compiling NIO ChannelInvoker.swift [82/108] Compiling NIO ChannelOption.swift [83/108] Compiling NIO ChannelPipeline.swift [84/108] Compiling NIO CircularBuffer.swift [85/108] Compiling NIO DispathQueue+WithFuture.swift [86/108] Compiling NIO Embedded.swift [87/108] Compiling NIO EventLoop.swift [88/108] Compiling NIO EventLoopFuture.swift [89/108] Compiling NIO FileDescriptor.swift [90/108] Compiling SWIM SWIMInstance.swift [91/108] Compiling SWIM Settings.swift [92/108] Compiling SWIM Status.swift [93/108] Compiling SWIM Dispatch+Extensions.swift [94/108] Compiling SWIM Heap.swift [95/109] Merging module NIO [96/126] Compiling NIOExtras JSONRPCFraming.swift [97/126] Compiling NIOExtras FixedLengthFrameDecoder.swift [98/126] Compiling NIOExtras NIOExtrasError.swift [99/126] Compiling NIOExtras DebugInboundEventsHandler.swift [100/126] Compiling NIOExtras DebugOutboundEventsHandler.swift [101/126] Compiling NIOExtras RequestResponseHandler.swift [102/126] Compiling NIOExtras QuiescingHelper.swift [103/126] Compiling NIOExtras LineBasedFrameDecoder.swift [104/126] Compiling NIOExtras PCAPRingBuffer.swift [105/126] Compiling NIOExtras LengthFieldBasedFrameDecoder.swift [106/126] Compiling NIOExtras LengthFieldPrepender.swift [107/126] Compiling NIOExtras JSONRPCFraming+ContentLengthHeader.swift [108/126] Compiling NIOExtras WritePCAPHandler.swift [110/127] Merging module NIOExtras [123/128] Merging module NIOFoundationCompat [125/129] Merging module SWIM [126/141] Compiling SWIMNIOExample Coding.swift [127/142] Compiling SWIMNIOExample Message.swift [128/142] Compiling SWIMNIOExample Logging.swift [129/142] Compiling SWIMNIOExample Settings.swift [130/142] Compiling SWIMNIOExample Metrics+Extensions.swift [131/142] Compiling SWIMNIOExample String+Extensions.swift [132/142] Merging module it_Clustered_swim_suspension_reachability [133/142] Compiling SWIMNIOExample SWIMNIOShell.swift /private/tmp/.nio-release-tools_YZyUPi/swift-cluster-membership/Sources/SWIMNIOExample/SWIMNIOShell.swift:398:45: error: ambiguous use of 'recordInterval' self.swim.metrics.shell.pingRequestResponseTimeAll.recordInterval(since: pingRequestSentAt) ^ /private/tmp/.nio-release-tools_YZyUPi/swift-cluster-membership/Sources/SWIMNIOExample/Metrics+Extensions.swift:21:10: note: found this candidate func recordInterval(since: DispatchTime, now: DispatchTime = .now()) { ^ /private/tmp/.nio-release-tools_YZyUPi/swift-cluster-membership/.build/checkouts/swift-metrics/Sources/Metrics/Metrics.swift:42:10: note: found this candidate func recordInterval(since: DispatchTime, end: DispatchTime = .now()) { ^ /private/tmp/.nio-release-tools_YZyUPi/swift-cluster-membership/Sources/SWIMNIOExample/SWIMNIOShell.swift:426:41: error: ambiguous use of 'recordInterval' self.swim.metrics.shell.pingRequestResponseTimeFirst.recordInterval(since: startedSendingPingRequestsSentAt) ^ /private/tmp/.nio-release-tools_YZyUPi/swift-cluster-membership/Sources/SWIMNIOExample/Metrics+Extensions.swift:21:10: note: found this candidate func recordInterval(since: DispatchTime, now: DispatchTime = .now()) { ^ /private/tmp/.nio-release-tools_YZyUPi/swift-cluster-membership/.build/checkouts/swift-metrics/Sources/Metrics/Metrics.swift:42:10: note: found this candidate func recordInterval(since: DispatchTime, end: DispatchTime = .now()) { ^ [134/142] Compiling SWIMNIOExample NIOPeer.swift [135/142] Linking it_Clustered_swim_suspension_reachability [136/142] Compiling SWIMNIOExample time.swift [138/142] Compiling SWIMNIOExample SWIMNIOHandler.swift

ktoso commented 3 years ago

Thank you @Davidde94! Seems I forgot to remove our own extension once Swift Metrics was released that includes this convenience.

On it...

ktoso commented 3 years ago

Fixed, thanks!