-
Notifications
You must be signed in to change notification settings - Fork 207
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix a build error on linux: kCFStringEncodingUTF8
is not defined.
#173
Fix a build error on linux: kCFStringEncodingUTF8
is not defined.
#173
Conversation
`kCFStringEncodingUTF8` is not defined. Instead, use `CFStringBuiltInEncodings.UTF8.rawValue`. Also fix a type error I was getting in a unit test.
It seems like this is a breaking change in the core libraries that come with Swift 5.3. Could you please guard your change with |
Codecov Report
@@ Coverage Diff @@
## master #173 +/- ##
=======================================
Coverage 98.01% 98.02%
=======================================
Files 91 91
Lines 5909 5914 +5
=======================================
+ Hits 5792 5797 +5
Misses 117 117
Continue to review full report at Codecov.
|
LGTM Generated by 🚫 Danger Swift against 81bf68f |
…wift 5.3 and later, as it does not compile on swift 5.2 on linux (but does on swift 5.2 for mac, suggesting a fixed bug in the open source version of CoreFoundation?)
Thanks for the super quick response. You're right, this does seem to be a swift 5.3 change on linux. Oddly, the fix compiles for me on swift 5.2 with macOS CoreFoundation, but not the linux CoreFoundation. Pushed a commit that makes this conditional for 5.3. I verified the project compiles against the Thanks for this amazing project! It's been a joy to work with. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you!
kCFStringEncodingUTF8
is available in C, but not in swift. I thinkCFStringBuiltInEncodings.UTF8.rawValue
is what's intended. However, I didn't take a close look at this code, so please let me know if I'm missing something.Also fix a type error I was getting in a unit test with Swift 5.3.