Skip to content

3.0.0

Choose a tag to compare

@velocityzen velocityzen released this 14 Nov 16:58
· 9 commits to main since this release
a811376

Release Notes (changes since 2.2.0)

⚠️ Breaking Changes

  • New minimum platforms: FPBracket now requires macOS 27, iOS 27,
    tvOS 27, watchOS 27 and visionOS 27. Earlier OS versions are no longer
    supported. uncancellableDispose now uses Swift's
    withTaskCancellationShield, which is only available from OS 27.
  • Swift 6.4 or newer: The package now uses Swift tools version 6.4.

If you need OS 26 or Swift 6.3, stay on 2.2.0.

✨ Improvements

  • uncancellableDispose runs in the caller's task:
    BracketAsync(acquire:uncancellableDispose:) now runs the dispose inside
    withTaskCancellationShield instead of a new unstructured Task. The
    dispose still doesn't see the caller's cancellation, and cancellation is
    visible again once it returns. In addition:
    • The resource and error types no longer need to be Sendable, and the
      closure no longer needs to be @Sendable. Code that met these
      requirements still compiles.
    • The dispose runs on the caller's actor, like every other dispose.
    • A call no longer starts a task, so it allocates nothing: the
      uncancellableDispose benchmark's allocation count dropped to zero.
  • Docs: the Handling Cancellation guide now uses
    withTaskCancellationShield to make only part of a dispose uncancellable.

🧪 Testing

  • Daily deep property runs: A scheduled workflow runs the property tests
    on macOS and on Linux (x86_64 and arm64) with new random inputs each day,
    and 20 times as many cases per property as CI.
  • The cancellation property now fails a run that goes 5 seconds without
    progress before its cancel arrives, instead of hanging.
  • A new test checks that an uncancellable dispose of a non-Sendable
    resource runs on the main actor and doesn't see the caller's cancellation.

🛠 Under the Hood

  • fp-swift 4.4.2 or later is now required (was 4.4.1).
  • CI builds and tests on macOS 27 with Xcode 27.1, and on the iOS, tvOS,
    watchOS and visionOS 27 simulators. Linux CI runs Swift 6.4 only.
  • The property tests use hegel-swift 0.51.8. It is a test-only dependency,
    and FPBracket's library products do not depend on it.