Skip to content

Add Swift Package Manager support - #28

Merged
100mango merged 3 commits into
masterfrom
swiftpm-support
Oct 24, 2026
Merged

100mango merged 3 commits into
masterfrom
swiftpm-support

Conversation

@100mango

@100mango 100mango commented Oct 24, 2026 •

Copy link
Copy Markdown
Owner

Summary

  • Add the SwiftTimer SwiftPM library, preserving its public API, Swift 5 language mode, Carthage/Xcode integration, and historical platform declarations.
  • Expand package coverage to 29 XCTest cases: timer lifecycle and capture release; manual/scheduled firing; handler/interval changes; countdown zero/negative, reset, suspend/resume and callback release; queue selection; debounce/throttle cancellation, reentrancy, and concurrent same/different identifiers; interval conversion boundaries.
  • Fix two verified regressions: reentrant throttle registrations were ignored, and reentrant debounce registrations were removed by the previous handler's cleanup. A tokenized, locked private registry now claims pending work before invoking user code, with cancellation and user callbacks outside the lock.
  • Document version-based SwiftPM installation starting at 1.2.0, and queue/cancellation semantics.
  • Run minimal read-only macos-15 debug/release CI on PRs and master pushes. Checkout does not persist credentials; timeout is 15 minutes, without secrets, signing, uploads, or deployment steps.

Verification

Final PR head: d681bdad5f06ccbbac77b7282412c408e3723930.

  • Linux, official Swift 6.4.1: debug 29/29 and release 29/29 passed.
  • Focused concurrency/reentrancy tests passed five consecutive Linux runs.
  • Both new reentrant regressions failed against the old implementation, then passed after the fix.
  • Independent code review found no blocker; an isolated 29-test run passed.
  • macOS CI run 40100760271: debug and release passed on the final head.
  • git diff --check passed.

iOS, tvOS, watchOS, device builds, and the original Xcode iOS suite have not been run. Modern macOS/Linux results do not establish every historical deployment target. Existing platform declarations remain unchanged.

Release verification

Merged as a4823a86f4304650c4df8e4df1ae38717256ebed; master CI run 40101015058 passed debug and release with 29 tests each.

Release 1.2.0 is published, not a draft or prerelease. Its tag points exactly to the merge commit; existing tags were not overwritten.

A separate consumer fetched https://github.com/100mango/SwiftTimer.git with exact version 1.2.0, resolved that same merge revision, built in release mode, and passed 2 debug plus 2 release integration tests, including the reentrant-throttle fix.

@100mango
100mango marked this pull request as ready for review October 24, 2026 14:06
@100mango
100mango merged commit a4823a8 into master Oct 24, 2026
1 check 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.

1 participant