Skip to content

Modernize and cleanup: Swift 5.9, concurrency safety, and documentation#1

Merged
maximkhatskevich merged 15 commits intomasterfrom
modernize-and-cleanup
Mar 4, 2026
Merged

Modernize and cleanup: Swift 5.9, concurrency safety, and documentation#1
maximkhatskevich merged 15 commits intomasterfrom
modernize-and-cleanup

Conversation

@maximkhatskevich
Copy link
Member

Summary

Brings the codebase to Swift 5.9 standard with Swift 6.0 readiness.

Changes

Important

  • Bump swift-tools-version to 5.9, macOS minimum to 12+
  • Fix data race in waitForFirstResult() — added .receive(on: DispatchQueue.main) serialization + resumed guard
  • Switch ensureMainThread() to DispatchQueue.main for consistency
  • Apply @Sendable consistently across all operators and Pipeline static methods
  • Add tests for waitForFirstResult() — success, failure, and empty completion cases

Enhancements

  • Add LocalizedError conformance to FailedConditionCheck and CompletedWithoutValue
  • Add async variants to SimpleWrappermap, inspect, mutate
  • Make FailedConditionCheck public
  • Add CompletedWithoutValue error type for publishers that complete without a value
  • Remove unimplemented operators (.!/, ./>, !!)

Cleanup

  • Fix typos in comments
  • Remove //infix comment noise from all operator functions
  • Remove dead //import XCERequirement from test files
  • Standardize doc comments to /// style
  • Update README with current badges, features, and documentation

Test Results

45/45 tests pass (up from 42 — 3 new waitForFirstResult tests).

Files Changed

  • Package.swift — version + platform bumps
  • Sources/Core/Extensions/Publisher+Helpers.swift — concurrency fix
  • Sources/Core/Operators.swift — cleanup + @Sendable
  • Sources/Core/Pipeline.swift — public types + LocalizedError + @Sendable
  • Sources/Core/SimpleWrapper.swift — async variants + @Sendable
  • Sources/Core/Take.swift — typo fix
  • Tests/AllTests/PublisherTests.swift — new tests
  • Tests/AllTests/OperatorsTests.swift — dead import removed
  • Tests/AllTests/OperatorsAsyncTests.swift — dead import removed
  • README.md — full update

Pull Request opened by Augment Code with guidance from the PR author

Mx added 15 commits February 22, 2026 23:27
Agent-Id: agent-873e080b-a0e7-43e4-9632-4a18a275a1e8
Linked-Note-Id: 969c5ad8-5b04-4682-b2dc-dae546604a1f
…tently

Agent-Id: agent-49df8443-bf85-4917-9034-b91e20394d4c
Agent-Id: agent-8f2caa11-22ef-4ed3-b6ae-b1b894e2300d
Agent-Id: agent-28f92b6f-b558-4c07-ad9b-b4428046c1de
Agent-Id: agent-f285cd2e-08ec-4cfb-abbe-5d86b17b051a
Linked-Note-Id: b4d6a212-bfc5-49d0-aa74-c1cc39203ac8
Agent-Id: agent-6336b15b-0338-451c-b550-fe2b5c27ad43
Linked-Note-Id: 502fcdc5-23c3-4b8f-ba93-76ccde2ac247
Agent-Id: agent-184c7653-fa77-4f8a-a539-e1760f337dfc
Agent-Id: agent-b7d4bec8-e411-42e6-b1c9-e05f9ce606c9
Agent-Id: agent-2b5daece-15e6-4fa3-826e-71941eb6ecf8
Agent-Id: agent-33e5e741-f86d-42e9-a509-aa8331f0b331
Agent-Id: agent-4a47c7ed-d518-4ce1-99fb-2052cdc3edb7
@maximkhatskevich maximkhatskevich merged commit 16ecc67 into master Mar 4, 2026
2 checks passed
@maximkhatskevich maximkhatskevich deleted the modernize-and-cleanup branch March 4, 2026 22:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant