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

Initial Swift 3 compatibility #27

Merged
merged 6 commits into from
Aug 18, 2016
Merged

Initial Swift 3 compatibility #27

merged 6 commits into from
Aug 18, 2016

Conversation

jakeheis
Copy link
Contributor

These changes are the minimum required to make FileKit work with Swift 3. This means that the following were not changed, but perhaps should be addressed in a future pull request before a final 4.0 release:

  • Access control could be reconsidered - Xcode automatically converted public to the now equivalent open and similarly private to fileprivate, though perhaps the new public and private would be more appropriate in some situations
  • Methods names were converted by Xcode to maintain the same API, not to have more Swifty names. For example, func symlinkFileToPath(path: Path) was changed to func symlinkFileToPath(_ path: Path), while perhaps its eventual name should be func symlinkFile(to path: Path)

While these could be addressed in this pull request, I believe they would be better served by a future one.

The only consideration left in this pull request is Path's conformance to Indexable. For a reason I could not deduce, Swift 3 throws errors when Path conforms to both Indexable and Sequence, so in this pull request I removed conformance to Indexable in order to fix the errors. The Indexable conformance is not actually utilized anywhere, so I think it would be best to just remove it, but I'm happy to do whatever you think is best in this situation.

@nvzqz
Copy link
Owner

nvzqz commented Aug 18, 2016

This fails to build on iOS due to missing DispatchFileSystemWatcherDelegate. Please review your changes.

@jakeheis
Copy link
Contributor Author

Whoops 🙈 sorry about that, shouldn't have done the final testing only on the OSX target. Should be good now

@nvzqz nvzqz merged commit 6487009 into nvzqz:develop Aug 18, 2016
@nvzqz nvzqz mentioned this pull request Aug 18, 2016
2 tasks
@nvzqz nvzqz added this to the Version 4.0.0 milestone Aug 18, 2016
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.

None yet

2 participants