diff --git a/.swift-version b/.swift-version index 8c50098..5186d07 100644 --- a/.swift-version +++ b/.swift-version @@ -1 +1 @@ -3.1 +4.0 diff --git a/Package.swift b/Package.swift index 1320542..23f76c5 100644 --- a/Package.swift +++ b/Package.swift @@ -1,5 +1,25 @@ +// swift-tools-version:4.0 import PackageDescription let package = Package( - name: "SwiftShell" + name: "SwiftShell", + products: [ + .library( + name: "SwiftShell", + targets: ["SwiftShell"]) + ], + targets: [ + .target( + name: "SwiftShell"), + .testTarget( + name: "SwiftShellTests", + dependencies: ["SwiftShell"]), + .testTarget( + name: "StreamTests", + dependencies: ["SwiftShell"]), + .testTarget( + name: "GeneralTests", + dependencies: ["SwiftShell"]), + ], + swiftLanguageVersions: [4] ) diff --git a/Sources/SwiftShell/Command.swift b/Sources/SwiftShell/Command.swift index b2811b5..f4ff052 100755 --- a/Sources/SwiftShell/Command.swift +++ b/Sources/SwiftShell/Command.swift @@ -128,8 +128,6 @@ public func == (e1: CommandError, e2: CommandError) -> Bool { return c1 == c2 case (.inAccessibleExecutable, .returnedErrorCode), (.returnedErrorCode, .inAccessibleExecutable): return false - default: - fatalError("not implemented") } } diff --git a/Sources/SwiftShell/Stream/Lazy-split.swift b/Sources/SwiftShell/Stream/Lazy-split.swift index 055d8ea..9f9a9b7 100644 --- a/Sources/SwiftShell/Stream/Lazy-split.swift +++ b/Sources/SwiftShell/Stream/Lazy-split.swift @@ -19,12 +19,9 @@ extension Collection where Iterator.Element: Equatable { /// A sequence from splitting a Collection lazily. public struct LazySplitSequence : IteratorProtocol, LazySequenceProtocol where Base.Iterator.Element: Equatable, - Base.SubSequence: Collection, - Base.SubSequence.Iterator.Element==Base.Iterator.Element, - Base.SubSequence==Base.SubSequence.SubSequence { - + Base.SubSequence: Collection { public fileprivate(set) var remaining: Base.SubSequence? - public let separator: Base.Generator.Element + public let separator: Base.Iterator.Element public let allowEmptySlices: Bool /// Creates a lazy sequence by splitting a Collection repeatedly. @@ -50,9 +47,7 @@ public struct LazySplitSequence : IteratorProtocol, LazySequen } extension LazyCollectionProtocol where Elements.Iterator.Element: Equatable, - Elements.SubSequence: Collection, - Elements.SubSequence.Iterator.Element==Elements.Iterator.Element, - Elements.SubSequence==Elements.SubSequence.SubSequence { + Elements.SubSequence: Collection { /// Creates a lazy sequence by splitting this Collection repeatedly. /// @@ -71,9 +66,7 @@ extension LazyCollectionProtocol where Elements.Iterator.Element: Equatable, /// A sequence from splitting a series of Collections lazily, as if they were one Collection. public struct PartialSourceLazySplitSequence : IteratorProtocol, LazySequenceProtocol where Base.Iterator.Element: Equatable, - Base.SubSequence: RangeReplaceableCollection, - Base.SubSequence.Iterator.Element==Base.Iterator.Element, - Base.SubSequence==Base.SubSequence.SubSequence { + Base.SubSequence: RangeReplaceableCollection { private var gs: LazyMapIterator, LazySplitSequence> private var g: LazySplitSequence? diff --git a/SwiftShell.xcodeproj/xcshareddata/xcschemes/SwiftShell-iOS.xcscheme b/SwiftShell.xcodeproj/xcshareddata/xcschemes/SwiftShell-iOS.xcscheme index ba25c0e..c9fe9a7 100644 --- a/SwiftShell.xcodeproj/xcshareddata/xcschemes/SwiftShell-iOS.xcscheme +++ b/SwiftShell.xcodeproj/xcshareddata/xcschemes/SwiftShell-iOS.xcscheme @@ -1,6 +1,6 @@ @@ -104,6 +105,7 @@ buildConfiguration = "Debug" selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB" selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB" + language = "" launchStyle = "0" useCustomWorkingDirectory = "NO" ignoresPersistentStateOnLaunch = "NO"