Skip to content

Bump FP to 1.8.1 + propagate Sendable#13

Merged
luizmb merged 1 commit into
mainfrom
feat/sendable-and-fp-1.8.1
May 21, 2026
Merged

Bump FP to 1.8.1 + propagate Sendable#13
luizmb merged 1 commit into
mainfrom
feat/sendable-and-fp-1.8.1

Conversation

@luizmb
Copy link
Copy Markdown
Owner

@luizmb luizmb commented May 21, 2026

Summary

  • Bump FP dependency from 1.7.0 to 1.8.1 (FunctionWrapper now refines Sendable; composition surfaces require @sendable closures).
  • RequestPublisher's stored run closure and init are now @Sendable (required by the FunctionWrapper conformance).
  • Functor / Applicative / Monad methods on RequestPublisher updated to take @Sendable closures: map, fmap, replace, mapError, flatMap, bind, kleisli, kleisliBack, flatMapError; pure requires A: Sendable; apply takes @Sendable inner closure.
  • Operator overloads (<£>, <&>, £>, , >>-, -<<, >=>, <=<, <*>) match the same shape.
  • TemplateValue (the Context value type) now conforms Sendable.
  • Test closures and typed lets annotated with @Sendable where the new signatures require it.

Test plan

  • swift build — green
  • swift test — all pass

🤖 Generated with Claude Code

FP 1.8.1 makes FunctionWrapper refine Sendable and requires @sendable
closures across composition. Updates here:

- Package.swift: bump FP from 1.7.0 to 1.8.1.
- RequestPublisher's stored `run` closure and init are now @sendable
  (required by FunctionWrapper).
- Functor / Applicative / Monad methods on RequestPublisher take
  @sendable closures: map, fmap, replace, mapError, flatMap, bind,
  kleisli, kleisliBack, flatMapError; pure requires A: Sendable;
  apply takes @sendable inner closure.
- Operator overloads (<£>, <&>, £>, <£, >>-, -<<, >=>, <=<, <*>)
  match: @sendable closure parameters, @sendable curried returns where
  applicable.
- TemplateValue enum (Context's value type) now conforms Sendable so
  the renderToken context capture is valid in a @sendable closure.
- Test closures and typed lets annotated with @sendable where the new
  signatures require it.

Build + tests green.
@luizmb luizmb merged commit 7aaaf88 into main May 21, 2026
2 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.

1 participant