Skip to content

Conversation

@mattt
Copy link
Contributor

@mattt mattt commented Jan 18, 2026

Follow-up to #244

yyjson provides several compile-time options via C preprocessor macros that allow developers to disable unused features and reduce binary size. With Swift 6.1's package traits, these options are now configurable directly from Swift Package Manager, making it easy for Swift projects to customize their yyjson builds without modifying source files or managing custom build settings.

This PR adds a Swift 6.1 package manifest with traits for optional features: noReader, noWriter, noIncrementalReader, noUtilities, noFastFloatingPoint, strictStandardJSON, noUTF8Validation.

To maintain backwards compatibility, we take advantage of version-specific manifests. This PR renames the original manifest to [email protected], which Swift versions before 6.1 will fall back to.

We use this approach currently in mattt/swift-yyjson to allow package consumers to tailor their installation according to their particular needs. If this PR is merged and a new minor release is cut, we'll be able to depend directly on this repo as a package dependency, rather than vendoring it as we currently do.

Introduce Swift 6.1 manifest with traits for optional features:
- noReader, noWriter, noIncrementalReader, noUtilities
- noFastFloatingPoint, strictStandardJSON, noUTF8Validation

Rename original manifest to [email protected] to maintain
backward compatibility with Swift 5.x and 6.0.
@codecov
Copy link

codecov bot commented Jan 18, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 98.49%. Comparing base (c3fc708) to head (de3700a).
⚠️ Report is 7 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #245   +/-   ##
=======================================
  Coverage   98.49%   98.49%           
=======================================
  Files           2        2           
  Lines        7686     7686           
=======================================
  Hits         7570     7570           
  Misses        116      116           
Flag Coverage Δ
unittests 98.49% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@ibireme
Copy link
Owner

ibireme commented Jan 19, 2026

Thanks!

@ibireme ibireme merged commit 0ea5212 into ibireme:master Jan 19, 2026
42 checks passed
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.

2 participants