Closed tejassharma96 closed 7 months ago
Thanks! Looking forward to this. @jpsim wdyt? 🙏
+1 for this too
ok rebased and updated the changelog 🙏
older swift versions do not understand any Protocol
and the tests are failing because of that:
Encoder.swift:229:45: protocol 'StringProtocol' can only be used as a generic constraint because it has Self or associated type requirements
updated to add a #if swift(>=5.6)
, which I believe is when support for that was added, and for prior versions just try to cast to String
instead of any StringProtocol
@tejassharma96 just making sure you see the CI failures here.
yes, sorry - somewhat distracted. I don't have an environment where I can install old versions of xcode since I'm on sonoma :/ how would you suggest I debug?
Ah actually - based on this article, the check should be for 5.7 instead of 5.6:
in Swift 5.7 the requirements around protocols with a Self requirement have been relaxed
Updated the check, could you see if CI succeeds now please?
hmmm, one failure still but looks unrelated to this change:
Failing tests:
YamsTests:
PerformanceTests.testUsingComposeWithUTF8()
PerformanceTests.testUsingComposeWithUTF8()
will see if I can repro locally
CI is all ✅
I’ll merge shortly.
Thank you both 🙌
Solves #405 by adding a new option for encoding scalars which contain newlines