Comments (6)
Hi @s4cha, first of all, sorry for the radio silence lately, I haven't had as much time lately to help out. I'll look into your feedback on #51 and try and reproduce the differences between our environments and be sure to let you know ASAP what I find out.
from then.
@bernardowilson First of all thank you so much for taking the time to issue a PR, this is really appreciated :) I've had to relax the timings locally as well when testing with swift 5, it's not a big deal.
Concerning the breaking changes I need to check what's going on, we'll do that on #51.
PS: I'm currently trying to update to the latest Xcode at home with a terrible network connection might take some time ;)
from then.
When will swift5 be supported ?
from then.
How about such a minimal revision?
extension Promise where T == Void {
public convenience init(callback: @escaping (
_ resolve: @escaping (() -> Void),
_ reject: @escaping ((Error) -> Void)) -> Void) {
self.init()
setProgressCallBack { resolve, reject, _ in
//swift 5 build fix:
callback({
resolve(())
}, reject)
}
}
public convenience init(callback2: @escaping (
_ resolve: @escaping (() -> Void),
_ reject: @escaping ((Error) -> Void),
_ progress: @escaping ((Float) -> Void)) -> Void) {
self.init()
setProgressCallBack { resolve, reject, progress in
//swift 5 build fix:
callback2({
resolve(())
}, reject, progress)
}
}
}
from then.
@vksenfontov eagle eye, indeed that's what I had on my side that enables migrating without all the changes highlighted on #51
here is mine for reference:
extension Promise where T == Void {
public convenience init(callback: @escaping (
_ resolve: @escaping (() -> Void),
_ reject: @escaping ((Error) -> Void)) -> Void) {
self.init()
setProgressCallBack { resolve, reject, _ in
let wrapped = { resolve(()) }
callback(wrapped, reject)
}
}
public convenience init(callback2: @escaping (
_ resolve: @escaping (() -> Void),
_ reject: @escaping ((Error) -> Void),
_ progress: @escaping ((Float) -> Void)) -> Void) {
self.init()
setProgressCallBack { resolve, reject, progress in
let wrapped = { resolve(()) }
callback2(wrapped, reject, progress)
}
}
}
from then.
@arden it is now :)
@bernardowilson Congrats ! Thank you so much for you work
Release: https://github.com/freshOS/then/releases/tag/5.0.0
Pod: https://cocoapods.org/pods/thenPromise)
Closing this for now, don't hesitate to reopen if needed :)
from then.
Related Issues (20)
- can oc do it? HOT 5
- Add @discardableResult to await HOT 4
- Data race HOT 4
- "Incompatible Swift version - framework was built with 4.2 (swiftlang-1000.11.37.1 clang-1000.11.45.1) and the local version is 4.2.1 (swiftlang-1000.11.42 clang-1000.11.45.1)." HOT 5
- Progress not getting called HOT 8
- Library name HOT 2
- .progress should be able to return Progress, not Float HOT 1
- Resolve promise on main thread HOT 4
- Can not upload update of app to App Store after name change HOT 1
- Add watchOS platform support
- Wrapping completion handlers HOT 4
- Mapping a response to `Void` HOT 1
- Xcode 11.2.1: fatal error: Unexpected Swift version HOT 3
- Cocoapods support HOT 3
- Readme code snippet typoed HOT 1
- Thread explosion causing a deadlock? HOT 1
- Warning Xcode 12: Simulator deployment target ‘IPHONEOS_DEPLOYMENT_TARGET’ is set to 8.0 HOT 1
- How about support iOS 15? HOT 4
- M1 - Apple Silicon with arm64 excluded architecture issue HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from then.