The problem Some tests need to be skipped when executing on CI (continuous integration like travis.org). What tests? In my case, it's performance tests. Why? because I can't trust all CI results and sometimes, randomly, some tests will fail without good reason, like this one:…
Package.swift - manual
Here is documentation for SPM manifest file Package.swift. I couldn't find a list of possible configuration values for Package.swift, so I created one, for future reference. I put here all available settings, with examples of use. Please find examples at the end of the post. Preamble…
Documenting Swift protocol
In Swift, I can write documentation at a protocol level now. There is a kick-ass feature added recently to Xcode 8 (beta 4). If I add documentation of function at the protocol level, it's available at the level of implementation. Look, I wrote documentation to Task.run() and…
Status of Portable Swift code
Portable Swift [http://swift.org] source code is so damn hard to do. Main problem is that OSX and Linux Swift is using different Foundation codebase. Linux is using SwiftFoundation [https://github.com/apple/swift-corelibs-foundation] and OSX is using Foundation [https://developer.apple.com/library/mac/documentation/Cocoa/Reference/Foundation/…
Overload Swift type ambiguity
I may define default type for overloaded functions. sometimes. This is Swift [https://swift.org/] return overloading that may lead to ambiguity: extension String { func encode() -> NSData? { return self.dataUsingEncoding(NSUTF8StringEncoding)?.base64EncodedDataWithOptions([]) } func encode() -> String? { return self.dataUsingEncoding(NSUTF8StringEncoding)?.base64EncodedStringWithOptions([]) } } I have two functions encode() that…