johanhaleby / occurrent

Unintrusive Event Sourcing Library for the JVM
https://occurrent.org
120 stars 16 forks source link

fix for error in the sequence command composition code that leaves old events in the sequence #131

Closed chrisdginn closed 1 year ago

chrisdginn commented 1 year ago

Unlike the composeCommands function for lists, the composeCommands function for sequences doesn't drop the initial set when folding. This causes duplicate event exceptions when composing commands for a non-empty initial stream.

johanhaleby commented 1 year ago

Wow, great catch! And thanks for the test.