Closed kamcma closed 2 years ago
@kamcma I've renamed the protocol to XMLDecodableSequence
and made it public in #244, does that resolve your issue?
It does. Thanks.
Great, I've tagged 0.14.0 which includes this change. Thanks for reporting the issue!
Was having trouble decoding into
IdentifiedArray
, a data structure from @pointfreeco. It conforms toCodable
. Came up with the following minimal reproduction:I would expect both tests to pass. The vanilla array decoding does pass, but the
IdentifiedArray
decoding throws the following:Had a little trouble understanding
XMLCoder
's internals, but did notice that it extends a few standard library data structures to conform to an internal protocolAnySequence
. If I change my minimal reproduction like so:then both tests pass.
Are my findings correct that conformance to this internal protocol are necessary to decode arbitrary data structures from outside the standard library?
I think ideally this would not be the case, and the encoder/decoder implementations would support arbitrary
Codable
types generally. But I understand the maintainers of the library are not the original authors.In the mean time, if conformance to
AnySequence
is required, what do the maintainers think about making it public?