nvzqz / FileKit

Simple and expressive file management in Swift
https://nvzqz.github.io/FileKit/docs/
MIT License
2.34k stars 207 forks source link

Static let 'NowEventId' is internal and cannot be referenced from a default argument value #53

Closed miralem-cebic closed 6 years ago

miralem-cebic commented 6 years ago

Hi, I'm getting a compiler error when building my macOS app using FileKit integrated with Cocoapods.

The app is for macOS 10.13. I'm using Xcode 9.0.1, Cocoapods and FileKit 4.0.1 (5.0.0 was not available over Cocoapods)

If I want to compile the I getting this error:

Static let 'NowEventId' is internal and cannot be referenced from a default argument value

public init(paths: [Path],
                sinceWhen: FSEventStreamEventId = FileSystemEvent.NowEventId,
                flags: FileSystemEventStreamCreateFlags = [.UseCFTypes, .FileEvents],
                latency: CFTimeInterval = 0,
                queue: DispatchQueue? = nil,
                callback: @escaping (FileSystemEvent) -> Void
        ) {
        self.lastEventId = sinceWhen
        self.paths       = paths
        self.flags       = flags
        self.latency     = latency
        self.queue       = queue
        self._callback   = callback
    }
phimage commented 6 years ago

I see the issue in 4.0.1 I think with previous compilator it was not a problem

I create a swift3.2 branch. You can use it if you want to use swift3