Add Linux support - #16
Conversation
|
@mattt it is the last one for today, please look when you have time) |
There was a problem hiding this comment.
Pull request overview
This pull request adds Linux support to the swift-yyjson library, including platform-specific workarounds for swift-corelibs-foundation limitations and comprehensive Linux CI testing with Swift 6.1.
Changes:
- Added Linux CI workflows with Swift 6.1 testing for both standard and trait configurations
- Implemented platform-specific boolean NSNumber detection using singleton comparison on Linux
- Implemented NSMutableString creation workaround using mutableCopy() on Linux
- Conditionally skipped
readWithMutableLeavestest on Linux due to NSDictionary type casting limitation - Updated GitHub Actions checkout to v6
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| .github/workflows/ci.yml | Added two new Linux CI jobs: test-linux for standard builds and test-linux-traits for trait-specific testing; updated all checkout actions to v6 |
| Sources/YYJSON/Serialization.swift | Added isBoolNumber() helper with Darwin/Linux implementations; added platform-specific NSMutableString creation using mutableCopy() on Linux |
| Tests/YYJSONTests/SerializationTests.swift | Made readWithMutableLeaves test Darwin-only with explanatory comment about Linux NSDictionary behavior |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
Looking good! Thanks for all of your help, @alexey1312 🫶 |
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 3 out of 3 changed files in this pull request and generated no new comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Description
Add Linux support for the swift-yyjson library with platform-specific workarounds for swift-corelibs-foundation limitations.
Changes
noReaderandnoWritertraitsisBoolNumber()using NSNumber singleton comparison on LinuxNSMutableStringworkaround usingmutableCopy()on LinuxpreconditionFailurewith throwingYYJSONErrorfor better error handlingreadWithMutableLeavestest on Linux (swift-corelibs-foundation limitation)actions/checkoutto v6Testing