Closed Andrew-Lees11 closed 5 years ago
I agree that we should define compactMap
for older swift versions, and maybe we should do this in a _SwiftSupport.swift
file, where we can collect all these backwards compat. fixes.
The ==
can also be implemented there.
Hey Thank you for the quick review. As suggested I have moved all the changes into a single file. This extends Collection to so future compact maps and index should work for Swift 4.0 as well.
Note for those wondering: the file should be named _SwiftSupport
so that it's the first to compile, otherwise Swift doesn't always find the extensions.
@djbe Could this be tagged so that SwiftPM can pick up this fix?
I am part of the Kitura team and we would like to update to the latest version of Stencil, however since we support Swift 4.0 and so are unable to use the latest version unless Stencil also supports Swift 4.0.
This pull requests adds support for Swift 4.0 by
Swift 4.0.3 builds have also been added to travis to check for future Swift 4.0 is supported in future builds.
These changes allow Stencil to compile and run on Swift 4.0 while still compiling with no build warnings for Swift 4.1