returns: Improve Failure tracibility
dry-rb has a cool feature: tracing failures https://dry-rb.org/gems/dry-monads/1.3/tracing-failures/
We need something similar to improve debugging experience. It might be included into the core, or just into some contrib/ package.
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Comments: 33 (33 by maintainers)
I think it’s better to patch a method (
_get_trace) from_Failurethan modify theFailurethat’s our Public API! What do you think??It was a great discussion! I’ll open the PR ASAP
Now this looks like it can be implemented in its final form! @thepabloaguilar thanks a lot for your amazing research work!
This is a hard thing to say, but! I like the monkeypatch solution 😆
I don’t know other way than uses something in the system, but it’s a bad thing because
Failurewon’t be deterministic.And, if we monkey patch
Failure? Adding a callable or boolean parameter to it, and insidecollect_traceswe mokey patchFailurewith a partially applied that parameter.Let’s make this feature ready for production! Awesome work 🎉