Is it possible to use current master toolchain (13 October snapshot) in development SwfitUI/Combine apps?
I try to use this toolchain, but several compilation errors occurred.
Just(42).debounce(for: 0.5, scheduler: DispatchQueue.main)
// error: Argument type 'DispatchQueue' does not conform to expected type 'Scheduler'
// error: Cannot convert value of type 'Double' to expected argument type 'DispatchQueue.SchedulerTimeType.Stride'
Just(Data()).decode(type: Int.self, decoder: JSONDecoder())
// error: Cannot invoke 'decode' with an argument list of type '(type: Int.Type, decoder: JSONDecoder)'
let url = URL(string: "url")!
URLSession.shared.dataTaskPublisher(for: url)
// error: Value of type 'URLSession' has no member 'dataTaskPublisher'
I'm a little unsure what you mean by "current master toolchain". I assume you mean Xcode 11.2 beta 2 (11B44) which was released on 11 October. If so, you can definitely use it to develop SwiftUI/Combine apps.
Looking at your samples provided:
I'm not sure what you're importing. That might be part of your issues.
You should always keep a reference to your publishers or they will be deinit'd immediately.
For the debounce example, you are specifying the wrong type of argument for "for:"
I've cleaned things up a bit, this works for me in the 11B44 build in a playground. I only really changed the debounce example though.