Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Transact overloads #320

Merged
merged 6 commits into from
May 16, 2022
Merged

Add Transact overloads #320

merged 6 commits into from
May 16, 2022

Conversation

bartelink
Copy link
Collaborator

@bartelink bartelink commented Mar 15, 2022

Some relatively low usage overloads from the field. Some may be removed or tweaked before final V4 release.

@bartelink bartelink added this to the 4.0 milestone Mar 15, 2022
@bartelink bartelink force-pushed the master branch 2 times, most recently from b1a5694 to a7486eb Compare May 13, 2022 21:13
bartelink added 5 commits May 16, 2022 08:53
Add missing interpret overloads
Add TransactEx with non-async decide
@bartelink bartelink marked this pull request as ready for review May 16, 2022 09:04
/// 2. (if events yielded) Attempt to sync the yielded events to the stream.
/// (Restarts up to <c>maxAttempts</c> times with updated state per attempt, throwing <c>MaxResyncsExhaustedException</c> on failure of final attempt.)
/// 3. Yields a final 'view produced by <c>render</c> from the final persisted <c>ISyncContext</c>
member _.TransactEx(interpret : 'state -> 'event list, render : ISyncContext<'state> -> 'view, ?option) : Async<'view> =
Copy link
Collaborator Author

@bartelink bartelink May 16, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

NOTE this disambiguates a relatively common case where attempting to use a lambda of the form TransactEx(fun c -> myInterpret c.State, fun c -> render c.Version, c.State) gives a confusing error messages that ordinarily needs to be resolved by wrapping as TransactEx((fun c -> myInterpret c.State), fun c -> render c.Version, c.State)

@bartelink bartelink merged commit 8f3b094 into master May 16, 2022
@bartelink bartelink deleted the decider-ex branch May 16, 2022 09:16
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