demystifyfp/FsToolkit.ErrorHandling
60.9
Adequate · 23 September 2026
16.4k
lines of production code
F#
primary language
5
measurements over time
What this system is
FsToolkit.ErrorHandling is an F\# library that provides composable error-handling types such as Result, Option, and Validation, along with their asynchronous and cancellable variants. It extends these types with computation expression builders and traversal helpers for standard .NET tasks, Hopac Jobs, and AsyncSeq sequences. The system includes comprehensive tooling for performance benchmarking, API comparison, and structured documentation to support functional programming workflows.
How it got here
2018 — Architecture overhaul and async feature expansion
5 changes.
The project underwent a significant infrastructure modernization, migrating to .NET 9, adopting Central Package Management, and restructuring the repository with standardized build configurations. Concurrently, FsToolkit.ErrorHandling expanded its capabilities by introducing comprehensive async-aware combinators and array traversal helpers, supported by new GitBook documentation and extensive unit test coverage.
2019–2021 — Hopac and AsyncSeq integration
5 changes.
This period focused on extending the library's error-handling capabilities to support Hopac's Job type and FSharp.Control.AsyncSeq. New modules and computation expressions were introduced for JobResult, JobOption, and AsyncResultBuilder, accompanied by comprehensive test suites to ensure correct behavior. A FunctionMap tool was also added to help users navigate API differences across F\# functional abstractions.
2022–2025 — IcedTasks integration and build optimization
5 changes.
This period focused on extending the library with CancellableTask computation expressions for Option, Result, and Validation types, accompanied by comprehensive test coverage. The work also involved modernizing the build infrastructure with .env support and CI optimizations, while updating benchmark reports to reflect performance data on .NET 9.
Features
AsyncSeq computation expression support for AsyncResultBuilder
The FsToolkit.ErrorHandling.AsyncSeq package now provides native support for using AsyncSeq within the AsyncResultBuilder computation expression. This change introduces a new library module that extends the AsyncResultBuilder with specific implementations for the 'While' and 'For' loops, allowing users to seamlessly iterate over asynchronous sequences of results or plain values while maintaining error handling semantics. The package version has been updated to 6.0.0 to reflect this new capability.
src/FsToolkit.ErrorHandling.AsyncSeq · high confidence
Initial GitBook documentation for FsToolkit.ErrorHandling
The repository now includes a complete GitBook documentation site for the FsToolkit.ErrorHandling library. This adds structured reference pages for the entire public API surface, covering modules such as Result, Option, AsyncResult, AsyncOption, AsyncResultOption, Task, and their respective computation expressions, operators, and helper functions (e.g., map, bind, traverse, require, orElse). Users can now consult this documentation to understand function signatures, usage examples, and best practices for error handling in F\#.
gitbook · high confidence
Introduce Hopac JobResult support with version 6.0.0
This release adds a new FsToolkit.ErrorHandling.JobResult module that brings the library's Result-based error handling to Hopac's Job type. It provides core combinators (map, bind, apply, orElse, orElseWith, requireTrue/False/Some/None, etc.), computation expressions for both JobResult and JobOption, and list traversal functions (traverse/sequence) in both monadic and applicative styles. The assembly version is bumped to 6.0.0.
src/FsToolkit.ErrorHandling.JobResult · high confidence
Introduces CancellableTask computation expressions for Option, Result, and Validation
The FsToolkit.ErrorHandling.IcedTasks package now provides new computation expression builders (CancellableTaskOption, CancellableTaskResult, and CancellableTaskValidation) that allow users to write asynchronous workflows with built-in cancellation support. These builders enable the use of F\# async-style syntax (e.g., \let!\, \do!\, \return!\) for tasks that return \Option\<'T\>\, \Result\<'T, 'Error\>\, or \Validation\<'T, 'Error\>\, automatically propagating cancellation tokens and handling state transitions via resumable state machines. This adds a new way to compose cancellable asynchronous operations within the library's error-handling framework.
src/FsToolkit.ErrorHandling.IcedTasks · high confidence
New FunctionMap tool to compare F\# async and error-handling APIs
A new \FunctionMap\ tool has been added to the \tools\ directory. This utility analyzes reflection data from FSharp.Core, FsToolkit.ErrorHandling, and Hopac to generate a Markdown table comparing method availability across various F\# functional programming abstractions (such as Option, ValueOption, Async, Job, Result, Validation, and their variants). This helps users understand which functions are supported by which libraries and how to map between them.
tools · high confidence
New async and array traversal helpers in FsToolkit.ErrorHandling
The library now provides comprehensive support for traversing arrays of asynchronous computations and options. New modules and functions have been added to \Array.fs\ for monadic (\traverseResultM\, \sequenceResultM\, \traverseOptionM\) and applicative (\traverseResultA\, \traverseValidationA\, \traverseAsyncResultA\) traversal of arrays, allowing users to process collections of async results and options with early-exit or full-error-collection semantics. Additionally, new \AsyncOption\, \AsyncResult\, \AsyncResultOption\, and \AsyncValidation\ modules expose corresponding async-aware combinators (map, bind, apply, orElse, etc.) and computation expression builders, enabling seamless integration of async workflows with these error-handling types.
src/FsToolkit.ErrorHandling · high confidence
Architecture
Repository scaffolding and build configuration overhaul
The repository has been restructured with a new solution layout that introduces dedicated test projects (FsToolkit.ErrorHandling.Tests, JobResult.Tests, AsyncSeq.Tests, IcedTasks.Tests) and a benchmarks project, alongside a centralized build system using FAKE and dotnet local tools. Build configuration is now standardized via Directory.Build.props and Directory.Solution.targets, which enforce nullness on .NET 9.0, set F\# language versions dynamically, and handle tool restoration. The development environment is further defined by an .editorconfig for consistent formatting (including Fantomas settings), a .babelrc for Fable builds, and a global.json pinning the .NET SDK to version 10.0.100.
(repo-wide) · high confidence
Behavioural changes
New build infrastructure with .env support and CI optimizations
The build system now includes a new DotEnv module to automatically load environment variables from a .env file, simplifying local configuration. The build.fs script has been updated to optimize CI performance by limiting CPU usage to 2 cores on GitHub Actions runners and introduces a dedicated target for running F\# analyzers (fsharp-analyzers) to provide code quality checks during the build process.
build · high confidence
Updated benchmark reports for .NET 9 and BenchmarkDotNet v0.15.0
The benchmark artifacts in the \BenchmarkDotNet.Artifacts\ directory have been regenerated, updating the environment metadata to reflect BenchmarkDotNet v0.15.0, Windows 11, and the .NET 9.0.3 runtime. This change includes new result files for \ApplicativeTests\, \AsyncResultCEExtensions\, \TaskResultCEExtensions\, \SeqTests\, and \BindBenchmarks\, providing fresh performance data for these specific test suites under the updated runtime and tooling configuration.
BenchmarkDotNet.Artifacts · high confidence
Test coverage
Added benchmarks for alternative Result and Async/Task computation expressions; Added comprehensive unit tests for FsToolkit.ErrorHandling; Added test suite for AsyncSeq error handling; Added test suite for Hopac-based JobResult and JobOption types; Added tests for IcedTasks cancellable and value task computation expressions.
Dependencies
Migrate to .NET 9 and Central Package Management
The project has upgraded its build infrastructure to support .NET 9 alongside .NET 8 and .NET Standard 2.0/2.1, replacing the legacy Paket dependency manager with MSBuild's Central Package Management (via Directory.Packages.props). This change updates core dependencies to FSharp.Core 6.0.1 and Fable 4.2.0, and modernizes the build tooling to FAKE 5.22.0, enabling the library to target the latest .NET runtime while maintaining compatibility with older frameworks.
(dependencies) · high confidence
Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.
How this codebase got here
Score
- CAI 58 → 61 (+2.8)
- Rubric changed (rubric-2026.08.19 → rubric-2026.09.15) — scores are not directly comparable.
Lenses
- Code Health 72 → 83 (+10.9)
- Architecture 97 → 99 (+2.2)
- Maturity 53 → 54 (+1.0)
- Readiness 60 → 71 (+11.1)
- Security 71 → 73 (+3.0)
- Accessibility 57 → 57 (+0.0)
Resolved (150)
- Critical CVE: [GHSA redacted] (package-lock.json)
- Dependency hygiene not measured — no packages were read
- Duplicated block (10 lines × 2) (src/FsToolkit.ErrorHandling.IcedTasks/CancellableTaskOption.fs)
- Duplicated block (10 lines × 2) (src/FsToolkit.ErrorHandling.IcedTasks/CancellableTaskOption.fs)
- Duplicated block (10 lines × 2) (src/FsToolkit.ErrorHandling.IcedTasks/CancellableTaskResultCE.fs)
- Duplicated block (10 lines × 2) (src/FsToolkit.ErrorHandling.IcedTasks/CancellableTaskValidationCE.fs)
- Duplicated block (10 lines × 2) (src/FsToolkit.ErrorHandling.IcedTasks/CancellableTaskValidationCE.fs)
- Duplicated block (10 lines × 2) (src/FsToolkit.ErrorHandling.IcedTasks/CancellableTaskValidationCE.fs)
- Duplicated block (10 lines × 2) (src/FsToolkit.ErrorHandling.IcedTasks/ValueTaskValueOptionCE.fs)
- Duplicated block (10 lines × 2) (src/FsToolkit.ErrorHandling/Array.fs)
- Duplicated block (10 lines × 2) (src/FsToolkit.ErrorHandling/List.fs)
- Duplicated block (10 lines × 2) (src/FsToolkit.ErrorHandling/TaskValidationCE.fs)
- Duplicated block (10 lines × 2) (src/FsToolkit.ErrorHandling/TaskValidationCE.fs)
- Duplicated block (10 lines × 2) (src/FsToolkit.ErrorHandling/ValueOption.fs)
- Duplicated block (10 lines × 3) (src/FsToolkit.ErrorHandling.IcedTasks/ValueTaskValueOptionCE.fs)
- Duplicated block (10 lines × 4) (src/FsToolkit.ErrorHandling.IcedTasks/ValueTaskValueOptionCE.fs)
- Duplicated block (10 lines × 7) (src/FsToolkit.ErrorHandling.IcedTasks/CancellableValueTaskResultCE.fs)
- Duplicated block (11 lines × 2) (src/FsToolkit.ErrorHandling.IcedTasks/CancellableTaskOption.fs)
- Duplicated block (11 lines × 2) (src/FsToolkit.ErrorHandling.IcedTasks/CancellableTaskOption.fs)
- Duplicated block (11 lines × 2) (src/FsToolkit.ErrorHandling.IcedTasks/CancellableTaskOptionBuilderBase.fs)
- …and 130 more
New (204)
- BackgroundCancellableTaskOptionBuilder.Run (cognitive 20) (src/FsToolkit.ErrorHandling.IcedTasks/CancellableTaskOptionCE.fs)
- BackgroundCancellableTaskResultBuilder.Run (cognitive 20) (src/FsToolkit.ErrorHandling.IcedTasks/CancellableTaskResultCE.fs)
- BackgroundCancellableValueTaskOptionBuilder.Run (cognitive 20) (src/FsToolkit.ErrorHandling.IcedTasks/CancellableValueTaskOptionCE.fs)
- BackgroundCancellableValueTaskResultBuilder.Run (cognitive 20) (src/FsToolkit.ErrorHandling.IcedTasks/CancellableValueTaskResultCE.fs)
- CancellableTaskOptionBuilderBase.WhileAsync (cognitive 21) (src/FsToolkit.ErrorHandling.IcedTasks/CancellableTaskOptionBuilderBase.fs)
- CancellableTaskResultBuilderBase.WhileAsync (cognitive 21) (src/FsToolkit.ErrorHandling.IcedTasks/CancellableTaskResultBuilderBase.fs)
- CancellableValueTaskOptionBuilderBase.WhileAsync (cognitive 21) (src/FsToolkit.ErrorHandling.IcedTasks/CancellableValueTaskOptionCE.fs)
- Critical CVE: [GHSA redacted] (package-lock.json)
- Critical CVE: NuGet.Packaging 5.11.0
- Documentation: no installation or build instructions (README.md)
- Documentation: no usage examples (README.md)
- Duplicated block (10 lines × 2) (src/FsToolkit.ErrorHandling/Array.fs)
- Duplicated block (10 lines × 2) (src/FsToolkit.ErrorHandling/Array.fs)
- Duplicated block (10 lines × 2) (src/FsToolkit.ErrorHandling/AsyncValidation.fs)
- Duplicated block (10 lines × 2) (src/FsToolkit.ErrorHandling/Option.fs)
- Duplicated block (10 lines × 2) (src/FsToolkit.ErrorHandling/ResultCE.fs)
- Duplicated block (10 lines × 2) (src/FsToolkit.ErrorHandling/TaskResultCE.fs)
- Duplicated block (10 lines × 2) (src/FsToolkit.ErrorHandling/TaskResultCE.fs)
- Duplicated block (10 lines × 3) (src/FsToolkit.ErrorHandling/Array.fs)
- Duplicated block (10 lines × 4) (src/FsToolkit.ErrorHandling.IcedTasks/ValueTaskValueOptionCE.fs)
- …and 184 more
Changes since last survey
- 4 commits — 3 feature/other, 1 fixes
By area
- (root) — 2 commits
- src/FsToolkit.ErrorHandling.IcedTasks — 1 commit
- tests/FsToolkit.ErrorHandling.Tests — 1 commit
Notable commits
- fix: Fix premature task CE completion during async disposal (#374)
- change: Bump version to 6.0.0-beta002
- change: Update .NET SDK to 10.0.100
- change: Update fantomas version to 8.0.0-alpha-017
Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.
Survey your own repository
demystifyfp/FsToolkit.ErrorHandling was measured the same way every project in this corpus was: the same rubric, at a pinned commit, with the result published in full. Point a surveyor at a repository you know and see whether you agree with it.
About this page
- The score is its most recent published measurement, taken on 23 September 2026 at a pinned commit. It is not a live figure and does not change until the project is measured again.
- Measured at commit d482e196cc3333e820355a0e412e01111944f3a7 — the exact code this score is about.
- Scored under rubric-2026.09.15 — the same rubric and the same method as every other entry in this index.
- Measured by watchdog.canine.dev using codehealth-analyzer preprod-955b9cee9818.