arrow icon indicating copy to clipboard operation
arrow copied to clipboard

Introduce resourceSaga

Open kyay10 opened this issue 1 month ago • 2 comments

An alternative to #3804 and #3795, this introduces a new handler resourceSaga that gives access to both ResourceScope and SagaScope, in such a way that the compensators and finalizers run in the expected order (which is different from just doing resourceScope { saga {...}.transact()}). I went for contexts immediately because making an intersection interface results in conflicting JVM signatures because both Resource.bind and Saga.bind have the same signature

kyay10 avatar Dec 01 '25 14:12 kyay10

Kover Report

File Coverage [63.64%]
arrow-libs/resilience/arrow-resilience/src/commonMain/kotlin/arrow/resilience/Saga.kt 63.64%
Total Project Coverage 47.10%

github-actions[bot] avatar Dec 01 '25 15:12 github-actions[bot]

Converted to a draft temporarily until we add context bridges for Resource and Saga

kyay10 avatar Dec 10 '25 02:12 kyay10