Skip to content

Add Linux support - #16

Merged
mattt merged 5 commits into
mattt:mainfrom
alexey1312:alexey1312/add-linux
Feb 6, 2026
Merged

Add Linux support#16
mattt merged 5 commits into
mattt:mainfrom
alexey1312:alexey1312/add-linux

Conversation

@alexey1312

Copy link
Copy Markdown
Contributor

Description

Add Linux support for the swift-yyjson library with platform-specific workarounds for swift-corelibs-foundation limitations.

Changes

  • Add Linux CI workflow with Swift 6.1 testing
  • Add Linux traits CI job for noReader and noWriter traits
  • Implement platform-specific isBoolNumber() using NSNumber singleton comparison on Linux
  • Implement NSMutableString workaround using mutableCopy() on Linux
  • Replace preconditionFailure with throwing YYJSONError for better error handling
  • Add documentation for Linux-specific workarounds
  • Skip readWithMutableLeaves test on Linux (swift-corelibs-foundation limitation)
  • Update actions/checkout to v6

Testing

  • All 465 tests pass on macOS
  • CI configured to run on Linux with Swift 6.1

@alexey1312

Copy link
Copy Markdown
Contributor Author

@mattt it is the last one for today, please look when you have time)

@mattt mattt changed the title feat: Add Linux support Add Linux support Feb 6, 2026
@mattt
mattt requested a review from Copilot February 6, 2026 09:52

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 readWithMutableLeaves test 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.

Comment thread .github/workflows/ci.yml
Comment thread .github/workflows/ci.yml
Comment thread Sources/YYJSON/Serialization.swift Outdated
@mattt

mattt commented Feb 6, 2026

Copy link
Copy Markdown
Owner

Looking good! Thanks for all of your help, @alexey1312 🫶

@mattt
mattt merged commit e4842c6 into mattt:main Feb 6, 2026
21 checks passed
@alexey1312
alexey1312 deleted the alexey1312/add-linux branch February 6, 2026 11:46

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants