Skip to content

v1.2.0 Support Sendable conformance for expanded builders

Choose a tag to compare

@alschmut alschmut released this 14 May 09:04
· 17 commits to main since this release

When the original struct, class or enum explicitly conforms to Sendable then the expanded/generated Builder also conforms to Sendable. See the below example:

@Buildable
struct Person: Sendable {
    let name: String
}

// Expanded
struct PersonBuilder : Sendable {
    var name: String = ""

    func build() -> Person {
        return Person(
            name: name
        )
    }
}