Brightify / Cuckoo

Boilerplate-free mocking framework for Swift!
MIT License
1.67k stars 175 forks source link

Cuckoo does not support block-type closure #472

Closed DanyilNefodov closed 7 months ago

DanyilNefodov commented 1 year ago

Hi!

I have next protocol with block-type closure:

protocol AsyncSampleProtocol {
    func async(execute work: @escaping @convention(block) () -> Void)
}

extension AsyncSample : AsyncSampleProtocol {
    func async(execute work: @escaping @convention(block) () -> Void) {
        async(group: nil, qos: .unspecified, flags: [], execute: work)
    }
}

When add this files to generator input it fails with:

Script path: /path/to/generator/CuckooGenerator
xargs: /path/to/generator/cuckoo_generator: terminated with signal 11; aborting
MatyasKriz commented 1 year ago

Hi, yeah, this is one of the last things I want to fix before releasing the SwiftSyntax version that's in progress. Unfortunately it requires me to redo the typing system to be more flexible for which I haven't been able to find enough motivation so far.

MatyasKriz commented 1 year ago

Good news is that I've added support for this attribute in the upcoming release of Cuckoo 2.0. 🙂