swift-foundation icon indicating copy to clipboard operation
swift-foundation copied to clipboard

FoundationEssentials: add `RawRepresentable` conformance to `_ErrorCo…

Open compnerd opened this issue 1 year ago • 6 comments

…deProtocol`

The Self constraint suggests that the protocol provide a RawRepresentable conformance. Silence the compiler warning by adding the conformance.

compnerd avatar May 26 '23 18:05 compnerd

I actually tried to fix this too, but it causes an ABI breakage on Darwin. I'm not sure it's possible to compatibly add a requirement to a protocol like this.

parkera avatar May 30 '23 16:05 parkera

@parkera oh, interesting. I wonder if we can add the conformance conditionally?

compnerd avatar May 30 '23 17:05 compnerd

I think it boils down to a new requirement that would be imposed upon anyone who adopts this (outside the framework), which we don't have any mechanism to enforce. I could be wrong though.

parkera avatar May 30 '23 17:05 parkera

@swift-ci please test macOS

iCharlesHu avatar Jun 08 '23 18:06 iCharlesHu

@compnerd any idea what we can do about this one, given the ABI break?

parkera avatar Sep 18 '23 20:09 parkera

I need to try to build this again to remember what is going on here; I wonder if the constraint might be something that we need on the typealias? But either way, the new constraint is the issue. I'm not sure if there is a way to adopt this type without that, but at the same time, we don't have a way to silence the warning.

compnerd avatar Sep 19 '23 03:09 compnerd