Skip to content

Commit

Permalink
Merge pull request #415 from SwiftGen/feature/xcode-9.3
Browse files Browse the repository at this point in the history
Update to Xcode 9.3
  • Loading branch information
djbe authored Apr 27, 2018
2 parents 3fce250 + 920de2d commit 77a1115
Show file tree
Hide file tree
Showing 14 changed files with 34 additions and 34 deletions.
2 changes: 1 addition & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ defaults:
CIRCLE_TEST_REPORTS: /tmp/circleci-test-results
BUNDLE_PATH: vendor/bundle
macos:
xcode: "9.2.0"
xcode: "9.3.0"
shell: /bin/bash --login -eo pipefail
- &prepare-storage
run:
Expand Down
2 changes: 1 addition & 1 deletion .ruby-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2.4.2
2.3.7
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,9 @@
* Enabled some extra SwiftLint rules for better code consistency.
[David Jennes](https://github.com/djbe)
[#402](https://github.com/SwiftGen/SwiftGen/pull/402)
* Updated to latest Xcode (9.3.0).
[David Jennes](https://github.com/djbe)
[#415](https://github.com/SwiftGen/SwiftGen/pull/415)

## 5.3.0

Expand Down
24 changes: 12 additions & 12 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@ GEM
ast (2.4.0)
atomos (0.1.2)
claide (1.0.2)
cocoapods (1.4.0)
cocoapods (1.5.0)
activesupport (>= 4.0.2, < 5)
claide (>= 1.0.2, < 2.0)
cocoapods-core (= 1.4.0)
cocoapods-core (= 1.5.0)
cocoapods-deintegrate (>= 1.0.2, < 2.0)
cocoapods-downloader (>= 1.1.3, < 2.0)
cocoapods-downloader (>= 1.2.0, < 2.0)
cocoapods-plugins (>= 1.0.0, < 2.0)
cocoapods-search (>= 1.0.0, < 2.0)
cocoapods-stats (>= 1.0.0, < 2.0)
Expand All @@ -27,16 +27,16 @@ GEM
escape (~> 0.0.4)
fourflusher (~> 2.0.1)
gh_inspector (~> 1.0)
molinillo (~> 0.6.4)
molinillo (~> 0.6.5)
nap (~> 1.0)
ruby-macho (~> 1.1)
xcodeproj (>= 1.5.4, < 2.0)
cocoapods-core (1.4.0)
xcodeproj (>= 1.5.7, < 2.0)
cocoapods-core (1.5.0)
activesupport (>= 4.0.2, < 6)
fuzzy_match (~> 2.0.4)
nap (~> 1.0)
cocoapods-deintegrate (1.0.2)
cocoapods-downloader (1.1.3)
cocoapods-downloader (1.2.0)
cocoapods-plugins (1.0.0)
nap
cocoapods-search (1.0.0)
Expand All @@ -48,7 +48,7 @@ GEM
colored2 (3.1.2)
concurrent-ruby (1.0.5)
escape (0.0.4)
faraday (0.14.0)
faraday (0.15.0)
multipart-post (>= 1.2, < 3)
fourflusher (2.0.1)
fuzzy_match (2.0.4)
Expand All @@ -58,20 +58,20 @@ GEM
minitest (5.11.3)
molinillo (0.6.5)
multipart-post (2.0.0)
nanaimo (0.2.4)
nanaimo (0.2.5)
nap (1.1.0)
netrc (0.11.0)
octokit (4.8.0)
sawyer (~> 0.8.0, >= 0.5.3)
parallel (1.12.1)
parser (2.5.0.5)
parser (2.5.1.0)
ast (~> 2.4.0)
powerpack (0.1.1)
public_suffix (3.0.2)
rainbow (3.0.0)
rake (10.5.0)
rouge (2.0.7)
rubocop (0.54.0)
rubocop (0.55.0)
parallel (~> 1.10)
parser (>= 2.5)
powerpack (~> 0.1)
Expand All @@ -86,7 +86,7 @@ GEM
thread_safe (0.3.6)
tzinfo (1.2.5)
thread_safe (~> 0.1)
unicode-display_width (1.3.0)
unicode-display_width (1.3.2)
xcodeproj (1.5.7)
CFPropertyList (>= 2.3.3, < 4.0)
atomos (~> 0.1.2)
Expand Down
2 changes: 1 addition & 1 deletion Sources/SwiftGen/Config/Config.swift
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ extension Config {
case .missingEntry(let key):
return Config.Error.missingEntry(key: "\(prefix).\(key)")
case .wrongType(let key, let expected, let got):
let fullKey = [prefix, key].flatMap({ $0 }).joined(separator: ".")
let fullKey = [prefix, key].compactMap({ $0 }).joined(separator: ".")
return Config.Error.wrongType(key: fullKey, expected: expected, got: got)
default:
return self
Expand Down
2 changes: 1 addition & 1 deletion Sources/SwiftGenKit/Parsers/AssetsCatalogParser.swift
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ extension AssetsCatalogParser {
This method recursively parses a directory structure, processing each folder (files are ignored).
*/
func process(folder: Path, withPrefix prefix: String = "") -> [Catalog.Entry] {
return (try? folder.children().sorted(by: <).flatMap {
return (try? folder.children().sorted(by: <).compactMap {
process(item: $0, withPrefix: prefix)
}) ?? []
}
Expand Down
2 changes: 1 addition & 1 deletion Sources/SwiftGenKit/Parsers/FontsParser.swift
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ extension CTFont {
let descs = CTFontManagerCreateFontDescriptorsFromURL(file.url as CFURL) as NSArray?
guard let descRefs = (descs as? [CTFontDescriptor]) else { return [] }

return descRefs.flatMap { desc -> Font? in
return descRefs.compactMap { desc -> Font? in
let font = CTFontCreateWithFontDescriptorAndOptions(desc, 0.0, nil, [.preventAutoActivation])
let postScriptName = CTFontCopyPostScriptName(font) as String
guard let familyName = CTFontCopyAttribute(font, kCTFontFamilyNameAttribute) as? String,
Expand Down
6 changes: 3 additions & 3 deletions Sources/SwiftGenKit/Parsers/StoryboardParser.swift
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ public final class StoryboardParser: Parser {
}

// Scenes
let scenes = Set<Storyboard.Scene>(document.xpath(XML.Scene.sceneXPath(initial: initialSceneID)).flatMap {
let scenes = Set<Storyboard.Scene>(document.xpath(XML.Scene.sceneXPath(initial: initialSceneID)).compactMap {
guard $0.tagName != XML.Scene.placeholderTag else { return nil }
return Storyboard.Scene(with: $0)
})
Expand Down Expand Up @@ -136,8 +136,8 @@ public final class StoryboardParser: Parser {
}

private func collectModules(from storyboard: Storyboard) -> [String] {
var result: [String] = storyboard.scenes.flatMap { $0.customModule } +
storyboard.segues.flatMap { $0.customModule }
var result: [String] = storyboard.scenes.compactMap { $0.customModule } +
storyboard.segues.compactMap { $0.customModule }

if let module = storyboard.initialScene?.customModule {
result += [module]
Expand Down
6 changes: 5 additions & 1 deletion SwiftGen.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -760,7 +760,7 @@
isa = PBXProject;
attributes = {
LastSwiftUpdateCheck = 0800;
LastUpgradeCheck = 0900;
LastUpgradeCheck = 0930;
ORGANIZATIONNAME = AliSoftware;
TargetAttributes = {
09A87B4F1BCCA2C600D9B9F5 = {
Expand Down Expand Up @@ -1335,12 +1335,14 @@
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_COMMA = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
Expand Down Expand Up @@ -1387,12 +1389,14 @@
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_COMMA = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "0910"
LastUpgradeVersion = "0930"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
Expand All @@ -10,7 +10,6 @@
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
language = ""
shouldUseLaunchSchemeArgsEnv = "YES">
<Testables>
<TestableReference
Expand All @@ -31,7 +30,6 @@
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
language = ""
launchStyle = "0"
useCustomWorkingDirectory = "NO"
ignoresPersistentStateOnLaunch = "NO"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "0910"
LastUpgradeVersion = "0930"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
Expand All @@ -26,7 +26,6 @@
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
language = ""
shouldUseLaunchSchemeArgsEnv = "YES">
<Testables>
<TestableReference
Expand Down Expand Up @@ -56,7 +55,6 @@
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
language = ""
launchStyle = "0"
useCustomWorkingDirectory = "NO"
ignoresPersistentStateOnLaunch = "NO"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "0910"
LastUpgradeVersion = "0930"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
Expand All @@ -10,7 +10,6 @@
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
language = ""
shouldUseLaunchSchemeArgsEnv = "YES">
<Testables>
<TestableReference
Expand All @@ -31,7 +30,6 @@
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
language = ""
launchStyle = "0"
useCustomWorkingDirectory = "NO"
ignoresPersistentStateOnLaunch = "NO"
Expand Down
4 changes: 1 addition & 3 deletions SwiftGen.xcodeproj/xcshareddata/xcschemes/swiftgen.xcscheme
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "0900"
LastUpgradeVersion = "0930"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
Expand Down Expand Up @@ -40,7 +40,6 @@
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
language = ""
shouldUseLaunchSchemeArgsEnv = "YES">
<Testables>
<TestableReference
Expand Down Expand Up @@ -90,7 +89,6 @@
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
language = ""
launchStyle = "0"
useCustomWorkingDirectory = "NO"
ignoresPersistentStateOnLaunch = "NO"
Expand Down
3 changes: 2 additions & 1 deletion SwiftGenKit.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,10 @@ Pod::Spec.new do |s|
s.social_media_url = 'https://twitter.com/aligatr'

s.platform = :osx, '10.9'
s.swift_version = '4.1'
s.cocoapods_version = '>= 1.4.0'

s.source = { git: 'https://github.com/SwiftGen/SwiftGenKit.git', tag: s.version.to_s }

s.source_files = 'Sources/**/*.swift'

s.dependency 'Kanna'
Expand Down

0 comments on commit 77a1115

Please sign in to comment.