Merge pull request #294 from stencilproject/feature/drop-swift-4
Drop Swift 4 support
This commit is contained in:
16
.travis.yml
16
.travis.yml
@@ -1,25 +1,13 @@
|
||||
matrix:
|
||||
include:
|
||||
- os: osx
|
||||
osx_image: xcode9.2
|
||||
env: SWIFT_VERSION=4.0.3
|
||||
- os: osx
|
||||
osx_image: xcode9.4
|
||||
env: SWIFT_VERSION=4.1
|
||||
- os: osx
|
||||
osx_image: xcode10
|
||||
osx_image: xcode11.4
|
||||
env: SWIFT_VERSION=4.2
|
||||
- os: osx
|
||||
osx_image: xcode10.2
|
||||
osx_image: xcode11.4
|
||||
env: SWIFT_VERSION=5.0
|
||||
- os: linux
|
||||
env: SWIFT_VERSION=4.0.3
|
||||
- os: linux
|
||||
env: SWIFT_VERSION=4.1
|
||||
- os: linux
|
||||
env: SWIFT_VERSION=4.2
|
||||
- os: linux
|
||||
env: SWIFT_VERSION=4.2.3
|
||||
- os: linux
|
||||
env: SWIFT_VERSION=5.0
|
||||
language: generic
|
||||
|
||||
@@ -4,7 +4,9 @@
|
||||
|
||||
### Breaking
|
||||
|
||||
_None_
|
||||
- Drop support for Swift < 4.2. For Swift 4 support, you should use Stencil 0.13.1.
|
||||
[David Jennes](https://github.com/djbe)
|
||||
[#294](https://github.com/stencilproject/Stencil/pull/294)
|
||||
|
||||
### Enhancements
|
||||
|
||||
@@ -22,7 +24,6 @@ _None_
|
||||
- Fixed using parenthesis in boolean expressions, they now can be used without spaces around them.
|
||||
[Ilya Puchka](https://github.com/ilyapuchka)
|
||||
[#254](https://github.com/stencilproject/Stencil/pull/254)
|
||||
|
||||
- Throw syntax error on empty variable tags (`{{ }}`) instead `fatalError`.
|
||||
[Ilya Puchka](https://github.com/ilyapuchka)
|
||||
[#263](https://github.com/stencilproject/Stencil/pull/263)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// swift-tools-version:4.0
|
||||
// swift-tools-version:4.2
|
||||
import PackageDescription
|
||||
|
||||
let package = Package(
|
||||
@@ -18,5 +18,6 @@ let package = Package(
|
||||
"Stencil",
|
||||
"Spectre"
|
||||
])
|
||||
]
|
||||
],
|
||||
swiftLanguageVersions: [.v4_2]
|
||||
)
|
||||
|
||||
@@ -1,23 +0,0 @@
|
||||
// swift-tools-version:4.2
|
||||
import PackageDescription
|
||||
|
||||
let package = Package(
|
||||
name: "Stencil",
|
||||
products: [
|
||||
.library(name: "Stencil", targets: ["Stencil"])
|
||||
],
|
||||
dependencies: [
|
||||
.package(url: "https://github.com/kylef/PathKit.git", from: "0.9.0"),
|
||||
.package(url: "https://github.com/kylef/Spectre.git", from: "0.9.0")
|
||||
],
|
||||
targets: [
|
||||
.target(name: "Stencil", dependencies: [
|
||||
"PathKit"
|
||||
], path: "Sources"),
|
||||
.testTarget(name: "StencilTests", dependencies: [
|
||||
"Stencil",
|
||||
"Spectre"
|
||||
])
|
||||
],
|
||||
swiftLanguageVersions: [.v4, .v4_2]
|
||||
)
|
||||
@@ -19,5 +19,5 @@ let package = Package(
|
||||
"Spectre"
|
||||
])
|
||||
],
|
||||
swiftLanguageVersions: [.v4, .v4_2, .v5]
|
||||
swiftLanguageVersions: [.v4_2, .v5]
|
||||
)
|
||||
|
||||
@@ -1,42 +1,5 @@
|
||||
import Foundation
|
||||
|
||||
#if !swift(>=4.1)
|
||||
public extension Sequence {
|
||||
func compactMap<ElementOfResult>(_ transform: (Element) throws -> ElementOfResult?) rethrows -> [ElementOfResult] {
|
||||
return try flatMap(transform)
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
#if !swift(>=4.1)
|
||||
public extension Collection {
|
||||
func index(_ index: Self.Index, offsetBy offset: Int) -> Self.Index {
|
||||
let indexDistance = Self.IndexDistance(offset)
|
||||
return self.index(index, offsetBy: indexDistance)
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
#if !swift(>=4.1)
|
||||
public extension TemplateSyntaxError {
|
||||
public static func == (lhs: TemplateSyntaxError, rhs: TemplateSyntaxError) -> Bool {
|
||||
return lhs.reason == rhs.reason &&
|
||||
lhs.description == rhs.description &&
|
||||
lhs.token == rhs.token &&
|
||||
lhs.stackTrace == rhs.stackTrace &&
|
||||
lhs.templateName == rhs.templateName
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
#if !swift(>=4.1)
|
||||
public extension Variable {
|
||||
public static func == (lhs: Variable, rhs: Variable) -> Bool {
|
||||
return lhs.variable == rhs.variable
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
#if !swift(>=4.2)
|
||||
extension ArraySlice where Element: Equatable {
|
||||
func firstIndex(of element: Element) -> Int? {
|
||||
|
||||
@@ -23,12 +23,12 @@
|
||||
"osx": "10.9",
|
||||
"tvos": "9.0"
|
||||
},
|
||||
"cocoapods_version": ">= 1.4.0",
|
||||
"swift_version": "5.0",
|
||||
"cocoapods_version": ">= 1.7.0",
|
||||
"swift_versions": ["4.2", "5.0"],
|
||||
"requires_arc": true,
|
||||
"dependencies": {
|
||||
"PathKit": [
|
||||
"~> 0.9.0"
|
||||
"~> 1.0.0"
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user