CodableWrappers icon indicating copy to clipboard operation
CodableWrappers copied to clipboard

Feature: Sendable @OptionalDecoding<ISO8601DateDecoding> and @ISO8601DateDecoding

Open adammcarter opened this issue 1 year ago • 1 comments

I'm using the wrappers @OptionalDecoding<ISO8601DateDecoding> and @ISO8601DateDecoding in my struct to decode dates, but making the struct conform to Sendable gives warnings for the properties with these wrappers as they don't conform to Sendable themselves

It looks like I can silence the warnings from Xcode with the following:

extension ISO8601DateDecoding: @unchecked Sendable {}
extension OptionalDecoding: @unchecked Sendable {}

But is there a technical reason this isn't done as part of the wrappers? Or is has it just not been implemented yet?

adammcarter avatar Feb 27 '24 11:02 adammcarter

I haven't tackled any Structured Concurrency issues with this yet. If I understand it correctly, I don't think this we be a problem. But I'd like to do a bit more research/testing on the effects before adding it. Would you be interested in a branch with this support for testing?

GottaGetSwifty avatar Apr 27 '24 17:04 GottaGetSwifty