kareman / SwiftShell

A Swift framework for shell scripting.
https://kareman.github.io/SwiftShell
MIT License
1.03k stars 87 forks source link

Swift 3.1 Correctly Removes Task #35

Closed Yasumoto closed 7 years ago

Yasumoto commented 7 years ago

Looks like this may be fallout from https://bugs.swift.org/browse/SR-3279

Yasumoto commented 7 years ago

This might need a bit more testing to make sure it works as expected (and actually fixes the issue I'm seeing). I'll be back with some better examples + tests.

Yasumoto commented 7 years ago

Yep, swift test passes on 3.0.2 and when I update to

cat ./.swift-version 
3.1-DEVELOPMENT-SNAPSHOT-2017-03-16-a

on Ubuntu 14.04 LTS.

kareman commented 7 years ago

@Yasumoto Very good. Could you try simplifying it to

#if !(os(macOS) || os(iOS) || os(tvOS) || os(watchOS)) && !swift(>=3.1)
typealias Process = Task
#endif

I think that should do the same thing.

kareman commented 7 years ago

Thank you very much for the fix. I will update Travis to automatically test both Swift 3.0.2 and Swift 3.1 beta from now on.