Skip to content

Commit 7521741

Browse files
committed
Update to Xcode 9.3 and swift 4.1
1 parent 268c6e2 commit 7521741

File tree

9 files changed

+18
-24
lines changed

9 files changed

+18
-24
lines changed

.swift-version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
4.0
1+
4.1

FileKit.podspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Pod::Spec.new do |s|
22
s.name = "FileKit"
3-
s.version = "5.0.0"
3+
s.version = "5.1.0"
44
s.summary = "Simple and expressive file management in Swift."
55
s.homepage = "https://github.com/nvzqz/FileKit"
66
s.license = { :type => "MIT", :file => "LICENSE.md" }

FileKit.xcodeproj/project.pbxproj

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -495,7 +495,7 @@
495495
isa = PBXProject;
496496
attributes = {
497497
LastSwiftUpdateCheck = 0700;
498-
LastUpgradeCheck = 0900;
498+
LastUpgradeCheck = 0930;
499499
ORGANIZATIONNAME = "Nikolai Vazquez";
500500
TargetAttributes = {
501501
5204B84A1B96B83800AA473F = {
@@ -826,12 +826,14 @@
826826
CLANG_WARN_BOOL_CONVERSION = YES;
827827
CLANG_WARN_COMMA = YES;
828828
CLANG_WARN_CONSTANT_CONVERSION = YES;
829+
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
829830
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
830831
CLANG_WARN_EMPTY_BODY = YES;
831832
CLANG_WARN_ENUM_CONVERSION = YES;
832833
CLANG_WARN_INFINITE_RECURSION = YES;
833834
CLANG_WARN_INT_CONVERSION = YES;
834835
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
836+
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
835837
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
836838
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
837839
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
@@ -884,12 +886,14 @@
884886
CLANG_WARN_BOOL_CONVERSION = YES;
885887
CLANG_WARN_COMMA = YES;
886888
CLANG_WARN_CONSTANT_CONVERSION = YES;
889+
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
887890
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
888891
CLANG_WARN_EMPTY_BODY = YES;
889892
CLANG_WARN_ENUM_CONVERSION = YES;
890893
CLANG_WARN_INFINITE_RECURSION = YES;
891894
CLANG_WARN_INT_CONVERSION = YES;
892895
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
896+
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
893897
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
894898
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
895899
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;

FileKit.xcodeproj/xcshareddata/xcschemes/FileKit-OSX.xcscheme

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<Scheme
3-
LastUpgradeVersion = "0900"
3+
LastUpgradeVersion = "0930"
44
version = "1.3">
55
<BuildAction
66
parallelizeBuildables = "YES"
@@ -26,7 +26,6 @@
2626
buildConfiguration = "Debug"
2727
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
2828
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
29-
language = ""
3029
shouldUseLaunchSchemeArgsEnv = "YES">
3130
<Testables>
3231
<TestableReference
@@ -56,7 +55,6 @@
5655
buildConfiguration = "Release"
5756
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
5857
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
59-
language = ""
6058
launchStyle = "0"
6159
useCustomWorkingDirectory = "NO"
6260
ignoresPersistentStateOnLaunch = "NO"

FileKit.xcodeproj/xcshareddata/xcschemes/FileKit-iOS.xcscheme

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<Scheme
3-
LastUpgradeVersion = "0900"
3+
LastUpgradeVersion = "0930"
44
version = "1.3">
55
<BuildAction
66
parallelizeBuildables = "YES"
@@ -26,7 +26,6 @@
2626
buildConfiguration = "Debug"
2727
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
2828
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
29-
language = ""
3029
shouldUseLaunchSchemeArgsEnv = "YES">
3130
<Testables>
3231
</Testables>
@@ -37,7 +36,6 @@
3736
buildConfiguration = "Release"
3837
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
3938
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
40-
language = ""
4139
launchStyle = "0"
4240
useCustomWorkingDirectory = "NO"
4341
ignoresPersistentStateOnLaunch = "NO"

FileKit.xcodeproj/xcshareddata/xcschemes/FileKit-tvOS.xcscheme

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<Scheme
3-
LastUpgradeVersion = "0900"
3+
LastUpgradeVersion = "0930"
44
version = "1.3">
55
<BuildAction
66
parallelizeBuildables = "YES"
@@ -26,7 +26,6 @@
2626
buildConfiguration = "Debug"
2727
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
2828
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
29-
language = ""
3029
shouldUseLaunchSchemeArgsEnv = "YES">
3130
<Testables>
3231
</Testables>
@@ -37,7 +36,6 @@
3736
buildConfiguration = "Release"
3837
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
3938
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
40-
language = ""
4139
launchStyle = "0"
4240
useCustomWorkingDirectory = "NO"
4341
ignoresPersistentStateOnLaunch = "NO"

FileKit.xcodeproj/xcshareddata/xcschemes/FileKit-watchOS.xcscheme

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<Scheme
3-
LastUpgradeVersion = "0900"
3+
LastUpgradeVersion = "0930"
44
version = "1.3">
55
<BuildAction
66
parallelizeBuildables = "YES"
@@ -26,7 +26,6 @@
2626
buildConfiguration = "Debug"
2727
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
2828
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
29-
language = ""
3029
shouldUseLaunchSchemeArgsEnv = "YES">
3130
<Testables>
3231
</Testables>
@@ -37,7 +36,6 @@
3736
buildConfiguration = "Release"
3837
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
3938
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
40-
language = ""
4139
launchStyle = "0"
4240
useCustomWorkingDirectory = "NO"
4341
ignoresPersistentStateOnLaunch = "NO"

FileKit.xcodeproj/xcshareddata/xcschemes/FileKitTests.xcscheme

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<Scheme
3-
LastUpgradeVersion = "0900"
3+
LastUpgradeVersion = "0930"
44
version = "1.3">
55
<BuildAction
66
parallelizeBuildables = "YES"
@@ -10,9 +10,8 @@
1010
buildConfiguration = "Debug"
1111
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
1212
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
13-
language = ""
14-
shouldUseLaunchSchemeArgsEnv = "YES"
15-
codeCoverageEnabled = "YES">
13+
codeCoverageEnabled = "YES"
14+
shouldUseLaunchSchemeArgsEnv = "YES">
1615
<Testables>
1716
<TestableReference
1817
skipped = "NO">
@@ -32,7 +31,6 @@
3231
buildConfiguration = "Debug"
3332
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
3433
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
35-
language = ""
3634
launchStyle = "0"
3735
useCustomWorkingDirectory = "NO"
3836
ignoresPersistentStateOnLaunch = "NO"

Sources/Path.swift

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ public struct Path {
5858
public static func volumes(_ options: FileManager.VolumeEnumerationOptions = []) -> [Path] {
5959
let volumes = FileManager.default.mountedVolumeURLs(includingResourceValuesForKeys: nil,
6060
options: options)
61-
return (volumes ?? []).flatMap { Path(url: $0) }
61+
return (volumes ?? []).compactMap { Path(url: $0) }
6262
}
6363

6464
// MARK: - Properties
@@ -127,13 +127,13 @@ public struct Path {
127127
return []
128128
}
129129
if isAbsolute {
130-
return (absolute.rawValue as NSString).pathComponents.enumerated().flatMap {
130+
return (absolute.rawValue as NSString).pathComponents.enumerated().compactMap {
131131
(($0 == 0 || $1 != "/") && $1 != ".") ? Path($1) : nil
132132
}
133133
} else {
134134
let comps = (self.rawValue as NSString).pathComponents.enumerated()
135135
// remove extraneous `/` and `.`
136-
let cleanComps = comps.flatMap {
136+
let cleanComps = comps.compactMap {
137137
(($0 == 0 || $1 != "/") && $1 != ".") ? Path($1) : nil
138138
}
139139
return _cleanComponents(cleanComps)
@@ -144,7 +144,7 @@ public struct Path {
144144
fileprivate func _cleanComponents(_ comps: [Path]) -> [Path] {
145145
var isContinue = false
146146
let count = comps.count
147-
let cleanComps: [Path] = comps.enumerated().flatMap {
147+
let cleanComps: [Path] = comps.enumerated().compactMap {
148148
if ($1.rawValue != ".." && $0 < count - 1 && comps[$0 + 1].rawValue == "..") || ($1.rawValue == ".." && $0 > 0 && comps[$0 - 1].rawValue != "..") {
149149
isContinue = true
150150
return nil

0 commit comments

Comments
 (0)