Skip to content

Conversation

@ShikiSuen
Copy link
Contributor

@ShikiSuen ShikiSuen commented Dec 21, 2025

This allows macOS IME developers to simply import LibChewing as a Swift Package.

The added Swift Unit Test files are only for making sure that C APIs are accessible from Swift.

On macOS, as long as libchewing is compilable using cargo, one can always run swift tests to build and run Swift package on macOS with Xcode 26 installed (or standalone Swift 6.1+ installation). Earlier Xcode is okay as long as its shipped Swift is 6.1+.

@codecov
Copy link

codecov bot commented Dec 21, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 92.06%. Comparing base (c04ae27) to head (3a3df8b).
⚠️ Report is 1 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #790   +/-   ##
=======================================
  Coverage   92.06%   92.06%           
=======================================
  Files          37       37           
  Lines        9253     9253           
=======================================
  Hits         8519     8519           
  Misses        734      734           

☔ 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.

@kanru
Copy link
Member

kanru commented Dec 29, 2025

Thanks for the contribution!

I'm not familiar with Swift. Is it possible to put everything related to Swift under the swift/ top level directory?

It would be good to run the tests in the CI.

@ShikiSuen
Copy link
Contributor Author

image

@kanru I'm afraid that the Package.swift has to be situated at the root folder of the repo. You can fact-check this with Claude Opus, Codex, Raptor... or whatever AI coding agent you trust.

Other files are relocateable.

@ShikiSuen
Copy link
Contributor Author

It would be good to run the tests in the CI.

I'll give it a try.

@ShikiSuen
Copy link
Contributor Author

@kanru

  • All files are relocated to {REPO_ROOT}/swift folder, excepting the mandatory Package.swift.
  • CI tests against this Swift Package are added. For now, these tests only run on macOS platform (macOS 26 image). If future modifications are needed, maintainers may delegate the modification tasks to GitHub copilot instead in case no one is available for this task.
  • All CI tests are green now: http://github.com/chewing/libchewing/actions/runs/20565593988/job/59063310287?pr=790 despite a useless warning "This header is deprecated. Include <chewing.h> directly.".

@kanru kanru merged commit 999ee00 into chewing:master Dec 29, 2025
12 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