You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Unfortunately Turf's JSONArray conflicts with this extension due to:
Conflicting conformance of 'Array<Element>' to protocol 'RawRepresentable'; there cannot be more than one conformance, even with different conditional bounds
If Swift won't allow multiple RawRepresentable extensions, what are our options here? Is it possible to keep JSONArray internal to the Turf package? For that matter, do any of the JSON types need to be public?
So far I've been unable to find another way to express the Array extension that makes the compiler happy, so would love to hear any other ideas.
Note: I'm not using Turf directly, it comes with the Mapbox SDK.
The text was updated successfully, but these errors were encountered:
The RawRepresentable usage in this package always seemed a bit too magical to me, but people seemed to like how it led to less typing when writing runtime styling code in the map SDK. #219 would replace this conformance with something more custom, also for JSONObject.
There's a popular pattern of folks extending arrays of
Codable
to allow use with@AppStorage
as described here:https://stackoverflow.com/questions/62562534/swiftui-what-is-appstorage-property-wrapper/62563773#62563773
Unfortunately Turf's
JSONArray
conflicts with this extension due to:Conflicting conformance of 'Array<Element>' to protocol 'RawRepresentable'; there cannot be more than one conformance, even with different conditional bounds
If Swift won't allow multiple
RawRepresentable
extensions, what are our options here? Is it possible to keepJSONArray
internal to the Turf package? For that matter, do any of theJSON
types need to be public?So far I've been unable to find another way to express the
Array
extension that makes the compiler happy, so would love to hear any other ideas.Note: I'm not using Turf directly, it comes with the Mapbox SDK.
The text was updated successfully, but these errors were encountered: