Make Witchcraft.Chain.do_notation respect chainer
Summary
This PR fixes Witchcraft.Chain.do_notation/2.
Previously it ignored second argument assuming any chainer is Witchcraft.Chain.chain/2.
However, there is a call of do_notation/2 across Witchcraft codebase in which chainer other then chain/2 is passed:
https://github.com/witchcrafters/witchcraft/blob/6c61c3ecd5b431c52e8b60aafb05596d9182205e/lib/witchcraft/monad.ex#L284-L287
Test plan (required)
mix test should be enough
Closing issues
Fixes #108
After Merge
- [ ] Does this change invalidate any docs or tutorials? If so ensure the changes needed are either made or recorded
- [x] Does this change require a release to be made? Is so please create and deploy the release
Moreover, the fact mention above can be proved as follows.
Running this snippet before would've returned [links: []], which points that no process were spawn_link'ed to shell process (if the snippet is run from shell).
async [] do
let a = 1
let b = 2
return a + b
return Process.info(self, :links)
end
Now, it shows that the process is indeed linked: [links: [#PID<0.238.0>]]
@QuinnWilton could you take a look?
Wow, thanks for the PR, @florius0 I'll review it shortly and incorporate into doma-engineering fork and provide feedback here + at fission discord. 💙 💛