Bind composite errors
I have made things!
Checklist
- [x] I have double checked that there are no unrelated changes in this pull request (old patches, accidental config files, etc)
- [x] I have created at least one test case for the changes I have made
- [ ] I have updated the documentation for the changes I have made
- [ ] I have added my changes to the
CHANGELOG.md
Related issues
This pull request fixes the issue of error types not composing in chains by using Union, improving clarity and type safety. However, Any can still appear in some cases. Setting Success and Failure to use _Nothing or NoReturn instead of Any helps with type inference but breaks many existing tests. I’m not an expert in type theory, but personally, I’d find it very useful to see fully composed error types without Any
Codecov Report
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 100.00%. Comparing base (
82ef3ef) to head (4648079). Report is 176 commits behind head on master.
Additional details and impacted files
@@ Coverage Diff @@
## master #1975 +/- ##
==========================================
Coverage 100.00% 100.00%
==========================================
Files 80 81 +1
Lines 2485 2601 +116
Branches 437 44 -393
==========================================
+ Hits 2485 2601 +116
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
@sobolevn Added similar behavior for ResultLike: IOResult, FutureResult, RequiresContextResult, and RequiresContextIOResult as requested. Let me know if I got everything right or missed something.
The CI is failing, please take a look.
There was a linting issue, it should be fine now.