Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Swift 5 migration #38

Merged
merged 9 commits into from
May 28, 2019
Merged

Swift 5 migration #38

merged 9 commits into from
May 28, 2019

Conversation

getaaron
Copy link
Contributor

All tests pass.

  • Migrated sample project and QuickTableViewController source code to Swift 5
  • Migrated English localization to en
  • Removed access modifiers considered redundant in Swift 5
  • Use .default for potential future unknown UITableViewCellStyles using Swift 5's new @unknown default for enums imported from C-based languages
  • Updated SwiftLint to 0.32.0 (version which supports Swift 5)

Out of scope:

  • Updating Quick and Nimble to a newer version

Podfile Outdated Show resolved Hide resolved
Podfile Outdated Show resolved Hide resolved
Podfile Outdated Show resolved Hide resolved
Podfile Outdated Show resolved Hide resolved
@codecov
Copy link

codecov bot commented May 27, 2019

Codecov Report

Merging #38 into develop will decrease coverage by 0.27%.
The diff coverage is 100%.

@@            Coverage Diff             @@
##           develop     #38      +/-   ##
==========================================
- Coverage    95.37%   95.1%   -0.28%     
==========================================
  Files           14      14              
  Lines          281     347      +66     
==========================================
+ Hits           268     330      +62     
- Misses          13      17       +4
Impacted Files Coverage Δ
Source/Rows/NavigationRow.swift 100% <100%> (ø) ⬆️
Source/Model/Subtitle.swift 87.5% <100%> (+7.5%) ⬆️
Source/Protocol/Reusable.swift 100% <100%> (ø) ⬆️
Source/Model/RadioSection.swift 95.34% <100%> (ø) ⬆️
Source/Model/Deprecated.swift 100% <100%> (ø) ⬆️
Source/QuickTableViewController.swift 90.24% <0%> (-1.25%) ⬇️
Source/Rows/SwitchRow.swift 100% <0%> (ø) ⬆️

@codecov
Copy link

codecov bot commented May 27, 2019

Codecov Report

Merging #38 into develop will decrease coverage by 0.27%.
The diff coverage is 100%.

@@            Coverage Diff             @@
##           develop     #38      +/-   ##
==========================================
- Coverage    95.37%   95.1%   -0.28%     
==========================================
  Files           14      14              
  Lines          281     347      +66     
==========================================
+ Hits           268     330      +62     
- Misses          13      17       +4
Impacted Files Coverage Δ
Source/Rows/NavigationRow.swift 100% <100%> (ø) ⬆️
Source/Model/Subtitle.swift 87.5% <100%> (+7.5%) ⬆️
Source/Protocol/Reusable.swift 100% <100%> (ø) ⬆️
Source/Model/RadioSection.swift 95.34% <100%> (ø) ⬆️
Source/Model/Deprecated.swift 100% <100%> (ø) ⬆️
Source/QuickTableViewController.swift 90.24% <0%> (-1.25%) ⬇️
Source/Rows/SwitchRow.swift 100% <0%> (ø) ⬆️

@getaaron
Copy link
Contributor Author

Seems like the only untested code is the addition of @unknown default: return ".default". Probably not worth writing a test for that? Seems like you'd have to force the Objective-C Runtime to send an illegal enum case or something?

@getaaron
Copy link
Contributor Author

@bcylin I could use your help in resolving these errors when building the docs:

❌  error: /Users/travis/build/bcylin/QuickTableViewController/Pods/SwiftLint/Carthage/Checkouts/xcconfigs/Base/Configurations/Release.xcconfig: unable to open file (in project "SwiftLint") (in target 'SwiftLintFramework')
❌  error: /Users/travis/build/bcylin/QuickTableViewController/Pods/SwiftLint/Carthage/Checkouts/xcconfigs/Mac OS X/Mac-Framework.xcconfig: unable to open file (in target "SwiftLintFramework" in project "SwiftLint") (in target 'SwiftLintFramework')
❌  error: /Users/travis/build/bcylin/QuickTableViewController/Pods/SwiftLint/Carthage/Checkouts/xcconfigs/Base/Configurations/Release.xcconfig: unable to open file (in project "SwiftLint") (in target 'SwiftLintFramework')
❌  error: /Users/travis/build/bcylin/QuickTableViewController/Pods/SwiftLint/Carthage/Checkouts/xcconfigs/Mac OS X/Mac-Framework.xcconfig: unable to open file (in target "SwiftLintFramework" in project "SwiftLint") (in target 'SwiftLintFramework')
❌  error: /Users/travis/build/bcylin/QuickTableViewController/Pods/SwiftLint/Carthage/Checkouts/xcconfigs/Base/Configurations/Release.xcconfig: unable to open file (in project "SwiftLint") (in target 'SwiftLintFramework')
❌  error: /Users/travis/build/bcylin/QuickTableViewController/Pods/SwiftLint/Carthage/Checkouts/xcconfigs/Mac OS X/Mac-Framework.xcconfig: unable to open file (in target "SwiftLintFramework" in project "SwiftLint") (in target 'SwiftLintFramework')

@bcylin
Copy link
Owner

bcylin commented May 28, 2019

Hi @getaaron, thank you very much for this pull request! No worries about the untested @unknown default.

The Pods/SwiftLint/Carthage error is a bit weird. Pod installed portable_swiftlint.zip should only contain an executable:

Pods/SwiftLint
├── LICENSE
└── swiftlint

Can you try getaaron/QuickTableViewController@getaaron:swift-5...bcylin:swift-5 and see if it works?

@bcylin bcylin force-pushed the develop branch 3 times, most recently from e161b7b to 0045694 Compare May 28, 2019 22:36
@bcylin bcylin merged commit f0f5fd8 into bcylin:develop May 28, 2019
@getaaron
Copy link
Contributor Author

Nice, you beat me to it @bcylin! What happened with index vs. firstIndex?

@getaaron getaaron deleted the swift-5 branch May 28, 2019 23:04
@bcylin
Copy link
Owner

bcylin commented May 29, 2019

I've still got some issue with CwlPreconditionTesting.h in the testing target. 😅

What's about index vs. firstIndex? Is it 369e652#diff-457d78d98b22052d0d7662f3f9506a44?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants