Open 0xTim opened 3 weeks ago
The issue with renaming CryptoKitError is that on Apple platforms these errors actually come from CryptoKit. Changing the error there is pretty hard: it would represent an ABI break to rename completely, even with the typealias, so that’s not tenable, meaning there’d be two similar errors only one of which is thrown.
While I agree this is a paper cut, I don’t think this issue is severe enough to warrant a change. But I’d be happy to hear disagreement.
Adding a typealias for CryptoKitError
to CryptoError
wouldn't break anything right? All the original stuff would continue to work but people using Swift Crypto would be able to catch and deal with CryptoError
s instead of knowing about CryptoKit
Yes, the typealias in the reverse direction will work.
New API Proposal:
CryptoError
Motivation:
CryptoKit errors are publicly exposed in the API which is confusing since from the outside CryptoKit is an implementation detail so it would be nice to rename this to reflect the name of the package. A
typealias
would help for those that want the backwards compatibilityImportance:
Not major but definitely a paper cut