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

Add sendable conformance to appropriate types

Open jmjauer opened this issue 2 years ago • 11 comments

Add Sendable conformance to appropriate types would allow to enabled additional safety checks at compile time. Without it, developers have to guess whether a type is Sendable or not.

jmjauer avatar Mar 09 '23 12:03 jmjauer

Ah the by Github listed "mention" was a red herring, I was trying to write "amount: 150" using pound sign, which was a silly thing to do, since I forgot GH lists is a references... Sorry for misleading "mention".

But YES I agree Sendable would be great to have, when safe to mark as such!

Sajjon avatar Mar 26 '23 21:03 Sajjon

I see no reason for ECDSASignature to not be Sendable, nor any reason for why all PublicKeys cannot be Sendable.

Sajjon avatar Apr 13 '23 06:04 Sajjon

Huh, I thought I commented on this. Regardless: we've heard this feedback internally, thanks for providing it!

Lukasa avatar Apr 13 '23 06:04 Lukasa

@Lukasa mind if I submit a PR making PublicKeys Equatable? I know different topic... but IMO falls under non dangerous protocol conformances helping devs :)

Sajjon avatar Apr 13 '23 07:04 Sajjon

This is a good suggestion, thanks. As this affects the common API layer between CryptoKit and Swift Crypto, while you can make a PR we will be unable to merge it until an equivalent change ships in CryptoKit.

Lukasa avatar Apr 14 '23 08:04 Lukasa

Are the people who maintain CryptoKit the same ones who maintain Swift Crypto - or should I post this suggestion somewhere else?

jmjauer avatar Apr 14 '23 09:04 jmjauer

I'm afraid that's not something I can get into detail about, but I will say that filing a request using Feedback Assistant is always valuable.

Lukasa avatar Apr 14 '23 10:04 Lukasa