Repository navigation
Rebase impl, docs and surface API on FSharp.Core v 11 APIs - #373
Conversation
396bce5 to
84fb50a
Compare
|
@TheAngryByrd still WIP but worth a review now:
|
There was a problem hiding this comment.
🟡 Changes recommended
Unresolved critical build and cancellation issues remain, along with moderate documentation and test-target defects.
Get a fresh assessment by requesting another Copilot review.
Pull request overview
Adds .NET 10/FSharp.Core 11 interoperability, compatibility shims for older targets, API renames, and related test and documentation updates.
Changes:
- Adds conditional Async/Task shims and .NET 10 targeting.
- Aligns constructors and exception-handling APIs with FSharp.Core conventions.
- Updates source, tests, build configuration, benchmarks, and documentation.
File summaries
| File | Reviewed changes and findings |
|---|---|
tests/FsToolkit.ErrorHandling.Tests/TaskValueOptionCE.fs |
Updates task/value-option CE tests. |
tests/FsToolkit.ErrorHandling.Tests/TaskValueOption.fs |
Replaces task constructor usages. |
tests/FsToolkit.ErrorHandling.Tests/TaskValidationCE.fs |
Updates validation CE tests. |
tests/FsToolkit.ErrorHandling.Tests/TaskValidation.fs |
Updates task constructors. |
tests/FsToolkit.ErrorHandling.Tests/TaskResultOption.fs |
Updates result-option constructors. |
tests/FsToolkit.ErrorHandling.Tests/TaskResultCE.fs |
Updates result CE tests. |
tests/FsToolkit.ErrorHandling.Tests/TaskResult.fs |
Updates catch-related tests. |
tests/FsToolkit.ErrorHandling.Tests/TaskOptionCE.fs |
Updates option CE tests. |
tests/FsToolkit.ErrorHandling.Tests/TaskOption.fs |
Updates option constructors. |
tests/FsToolkit.ErrorHandling.Tests/Result.fs |
Updates defaulting tests. |
tests/FsToolkit.ErrorHandling.Tests/ParallelAsyncValidationCE.fs |
Updates async constructors. |
tests/FsToolkit.ErrorHandling.Tests/ParallelAsyncResultCE.fs |
Updates async constructors. |
tests/FsToolkit.ErrorHandling.Tests/Option.fs |
Updates async/task constructors. |
tests/FsToolkit.ErrorHandling.Tests/FsToolkit.ErrorHandling.Tests.fsproj |
Adds .NET 10 testing. |
tests/FsToolkit.ErrorHandling.Tests/BackgroundTaskValueOptionCE.fs |
Updates background-task CE tests. |
tests/FsToolkit.ErrorHandling.Tests/BackgroundTaskResultCE.fs |
Updates background-task result tests. |
tests/FsToolkit.ErrorHandling.Tests/BackgroundTaskOptionCE.fs |
Updates background-task option tests. |
tests/FsToolkit.ErrorHandling.Tests/AsyncValidation.fs |
Updates async validation constructors. |
tests/FsToolkit.ErrorHandling.Tests/AsyncResultOptionCE.fs |
Updates result-option constructors. |
tests/FsToolkit.ErrorHandling.Tests/AsyncResultCE.fs |
Updates async result tests. |
tests/FsToolkit.ErrorHandling.Tests/AsyncResult.fs |
Updates catch tests. |
tests/FsToolkit.ErrorHandling.Tests/AsyncOptionCE.fs |
Updates async option CE tests. |
tests/FsToolkit.ErrorHandling.Tests/AsyncOption.fs |
Updates async constructors. |
tests/FsToolkit.ErrorHandling.JobResult.Tests/JobResultOption.fs |
Updates JobResult option constructors. |
tests/FsToolkit.ErrorHandling.JobResult.Tests/JobResultCE.fs |
Updates JobResult CE tests. |
tests/FsToolkit.ErrorHandling.JobResult.Tests/JobResult.fs |
Updates JobResult APIs in tests. |
tests/FsToolkit.ErrorHandling.JobResult.Tests/JobOptionCE.fs |
Updates JobOption CE tests. |
tests/FsToolkit.ErrorHandling.JobResult.Tests/JobOption.fs |
Updates JobOption tests. |
tests/FsToolkit.ErrorHandling.JobResult.Tests/FsToolkit.ErrorHandling.JobResult.Tests.fsproj |
Adds .NET 10 testing. Moderate finding (1 vote): the .NET 10 leg resolves a library whose targets stop at .NET 9. |
tests/FsToolkit.ErrorHandling.IcedTasks.Tests/ValueTaskValueOptionCE.fs |
Updates value-task CE tests. |
tests/FsToolkit.ErrorHandling.IcedTasks.Tests/FsToolkit.ErrorHandling.IcedTasks.Tests.fsproj |
Adds targets and warning configuration. Critical finding (1 vote): retain FS3511 in NoWarn; moderate finding (1 vote): the .NET 10 leg resolves a library whose targets stop at .NET 9. |
tests/FsToolkit.ErrorHandling.IcedTasks.Tests/CancellableTaskValidationCE.fs |
Updates cancellable-task validation constructors. |
tests/FsToolkit.ErrorHandling.IcedTasks.Tests/CancellableTaskResultCE.fs |
Updates cancellable-task result constructors. |
tests/FsToolkit.ErrorHandling.AsyncSeq.Tests/FsToolkit.ErrorHandling.AsyncSeq.Tests.fsproj |
Adds .NET 10 testing. Moderate finding (1 vote): the .NET 10 leg resolves a library whose targets stop at .NET 9. |
tests/Directory.Build.props |
Selects FSharp.Core versions by target framework. |
src/FsToolkit.ErrorHandling/TaskValueOption.fs |
Uses Task.result. |
src/FsToolkit.ErrorHandling/TaskValidationCE.fs |
Uses Task.result. |
src/FsToolkit.ErrorHandling/TaskValidation.fs |
Uses Task.result. |
src/FsToolkit.ErrorHandling/TaskResultOption.fs |
Adds some and compatibility support. |
src/FsToolkit.ErrorHandling/TaskResultCE.fs |
Uses Task.result. |
src/FsToolkit.ErrorHandling/TaskResult.fs |
Adds catchWith and updates task handling. |
src/FsToolkit.ErrorHandling/TaskOption.fs |
Uses Task.result. |
src/FsToolkit.ErrorHandling/Task.FSharpCore11.fs |
Adds older-target Task shims. Critical finding (1 vote): backgroundTask is unavailable on the older FSharp.Core baseline. Critical finding (1 vote): the NET_10_0_OR_GREATER guard is misspelled and includes compatibility implementations in the .NET 10 build. |
src/FsToolkit.ErrorHandling/Task.fs |
Removes or shims overlapping Task APIs. Critical finding (1 vote): the misspelled target guard leaves obsolete Task.singleton enabled on .NET 10. |
src/FsToolkit.ErrorHandling/ResultOptionCE.fs |
Uses ResultOption.some. |
src/FsToolkit.ErrorHandling/ResultOption.fs |
Adds some and compatibility support. |
src/FsToolkit.ErrorHandling/Result.fs |
Conditionally removes overlapping FSharp.Core APIs. Critical finding (1 vote): unqualified map and mapError calls can fail the .NET 10 build, including the occurrence at line 504. Nit (1 vote): the retained valueOr documentation links to removed documentation. Critical finding (1 vote): the misspelled target guard leaves local helpers defined on .NET 10. |
src/FsToolkit.ErrorHandling/ParallelAsyncValidationCE.fs |
Uses Async.result. |
src/FsToolkit.ErrorHandling/ParallelAsyncResultCE.fs |
Uses Async.result. |
src/FsToolkit.ErrorHandling/List.fs |
Uses Async.result. |
src/FsToolkit.ErrorHandling/FsToolkit.ErrorHandling.fsproj |
Adds .NET 10 and shim files. |
src/FsToolkit.ErrorHandling/AsyncValidationCE.fs |
Uses Async.result. |
src/FsToolkit.ErrorHandling/AsyncValidation.fs |
Uses Async.result. |
src/FsToolkit.ErrorHandling/AsyncResultOptionCE.fs |
Uses Async.result and some. |
src/FsToolkit.ErrorHandling/AsyncResultOption.fs |
Adds some and compatibility support. |
src/FsToolkit.ErrorHandling/AsyncResultCE.fs |
Uses Async.result. |
src/FsToolkit.ErrorHandling/AsyncResult.fs |
Adds catchWith and updates async handling. |
src/FsToolkit.ErrorHandling/AsyncOptionCE.fs |
Uses Async.result. |
src/FsToolkit.ErrorHandling/AsyncOption.fs |
Uses Async.result. |
src/FsToolkit.ErrorHandling/Async.FSharpCore11.fs |
Adds older-target Async shims. Critical finding (3 votes): cancellation exceptions are caught instead of rethrown at lines 106 and 130. Critical finding (1 vote): the misspelled target guard includes the shim in the .NET 10 build. Nits (1 vote each): the module summary describes Task computations, and the example uses unavailable Async.RunSynchronouslyImmediate. |
src/FsToolkit.ErrorHandling/Async.fs |
Removes or shims overlapping Async APIs. Critical finding (1 vote): the misspelled target guard leaves obsolete Async.singleton enabled on .NET 10. |
src/FsToolkit.ErrorHandling.JobResult/List.fs |
Uses renamed JobResult APIs. |
src/FsToolkit.ErrorHandling.JobResult/JobResultOptionCE.fs |
Uses some. |
src/FsToolkit.ErrorHandling.JobResult/JobResultOption.fs |
Adds some and compatibility support. |
src/FsToolkit.ErrorHandling.JobResult/JobResult.fs |
Adds ok and catchWith. |
src/FsToolkit.ErrorHandling.JobResult/JobOptionCE.fs |
Uses Job.result. |
src/FsToolkit.ErrorHandling.JobResult/JobOption.fs |
Adds some and none. |
src/FsToolkit.ErrorHandling.JobResult/Job.fs |
Uses Job.result. |
src/FsToolkit.ErrorHandling.IcedTasks/CancellableValueTaskResultCE.fs |
Adds ok and compatibility support. |
src/FsToolkit.ErrorHandling.IcedTasks/CancellableTaskValidationCE.fs |
Adds ok and updates lifting. |
src/FsToolkit.ErrorHandling.IcedTasks/CancellableTaskResultCE.fs |
Adds ok and compatibility support. |
src/Directory.Build.props |
Adds FSharp.Core 11 and asset configuration. |
RELEASE_NOTES.md |
Documents .NET 10 API changes. |
playground.fsx |
Updates API examples. |
gitbook/taskValueOption/zip.md |
Updates task constructor examples. |
gitbook/taskValueOption/map.md |
Updates task constructor examples. |
gitbook/taskValueOption/bind.md |
Updates task constructor examples. |
gitbook/taskValueOption/apply.md |
Updates task constructor examples. |
gitbook/taskResult/ofTask.md |
Updates exception-handling documentation. Nit (2 votes): the link should point to catchWith.md, not the incorrect catch API/page. |
gitbook/taskResult/ofCatchTask.md |
Removes obsolete documentation. |
gitbook/taskResult/catchWith.md |
Adds catchWith documentation. Nit (1 vote): the page is not listed in SUMMARY.md. |
gitbook/taskResult/catch.md |
Documents catch behavior. Moderate finding (1 vote): the signature and examples describe a call that does not match the API. |
gitbook/taskOption/zip.md |
Updates option examples. Moderate finding (3 votes): TaskOption.some None produces an outer Some, not the documented None. |
gitbook/taskOption/map.md |
Updates task examples. |
gitbook/taskOption/bind.md |
Updates task examples. |
gitbook/taskOption/apply.md |
Updates task examples. |
gitbook/task/zip.md |
Updates task examples. |
gitbook/task/map.md |
Updates task examples. |
gitbook/task/catch.md |
Removes obsolete documentation. Nit (1 vote): SUMMARY.md still links to this deleted page. |
gitbook/task/apply.md |
Updates task examples. |
gitbook/SUMMARY.md |
Updates documentation navigation. Nit (2 votes): the TaskResult entry links to catch.md instead of the new catchWith.md. |
gitbook/result/others.md |
Removes valueOr documentation. |
gitbook/option/sequenceTask.md |
Updates task examples. |
gitbook/option/sequenceAsync.md |
Updates async examples. |
gitbook/list/sequenceJobResultM.md |
Updates JobResult examples. |
gitbook/list/sequenceJobResultA.md |
Updates JobResult examples. |
gitbook/jobResultOption/map.md |
Updates JobResult examples. |
gitbook/jobResult/zipError.md |
Updates JobResult examples. |
gitbook/jobResult/zip.md |
Updates JobResult examples. |
gitbook/jobResult/ofResult.md |
Removes obsolete documentation. Nit (1 vote): SUMMARY.md still points to the deleted page. |
gitbook/jobResult/catchWith.md |
Updates catchWith examples. Nit (1 vote): SUMMARY.md points to the missing catch.md. |
gitbook/jobOption/map.md |
Updates Job examples. |
gitbook/jobOption/either.md |
Updates Job examples. Moderate finding (2 votes): the example has an extra closing parenthesis and does not parse. |
gitbook/jobOption/apply.md |
Updates Job examples. |
gitbook/job/zip.md |
Updates Job examples. |
gitbook/job/result.md |
Renames Job documentation. |
gitbook/job/apply.md |
Updates Job examples. |
gitbook/cancellableValueTaskResult/zip.md |
Updates result examples. |
gitbook/cancellableValueTaskResult/map.md |
Updates result examples. |
gitbook/cancellableValueTaskResult/apply.md |
Updates result examples. |
gitbook/cancellableValueTaskOption/zip.md |
Updates option examples. |
gitbook/cancellableValueTaskOption/map.md |
Updates option examples. |
gitbook/cancellableValueTaskOption/either.md |
Updates option examples. |
gitbook/cancellableValueTaskOption/bind.md |
Updates option examples. |
gitbook/cancellableValueTaskOption/apply.md |
Updates option examples. |
gitbook/cancellableTaskValidation/orElse.md |
Updates validation examples. |
gitbook/cancellableTaskValidation/ok.md |
Renames validation documentation. |
gitbook/cancellableTaskResult/ok.md |
Renames result documentation. |
gitbook/cancellableTaskOption/zip.md |
Updates cancellable-task examples. Moderate finding (3 votes): CancellableTaskOption.result is not defined and the example does not compile. |
gitbook/cancellableTaskOption/map.md |
Updates cancellable-task examples. |
gitbook/cancellableTaskOption/bind.md |
Updates cancellable-task examples. |
gitbook/cancellableTaskOption/apply.md |
Updates cancellable-task examples. |
gitbook/asyncResult/catchWith.md |
Updates catchWith examples. Nit (1 vote): SUMMARY.md still links to the missing catch.md. |
gitbook/asyncOption/orElseFunctions.md |
Updates Async option examples. |
gitbook/asyncOption/map.md |
Updates Async option examples. |
gitbook/asyncOption/bind.md |
Updates Async option examples. |
gitbook/asyncOption/apply.md |
Updates Async option examples. |
Directory.Build.props |
Updates language and nullable settings. |
build/DotEnv.fs |
Applies formatting updates. |
build/build.fs |
Updates build scripts. |
benchmarks/Benchmarks.fs |
Updates benchmark constructors. |
benchmarks/AsyncResultCE.fs |
Updates benchmark Async usage. |
Review details
Suppressed comments (14)
gitbook/asyncResult/catchWith.md:1
- This new page is named
catchWith, butgitbook/SUMMARY.mdstill links the AsyncResult entry to the missingasyncResult/catch.md. Update the summary entry so the documented API is reachable.
gitbook/jobResult/catchWith.md:1 - This new page is named
catchWith, butgitbook/SUMMARY.mdstill links the JobResult entry to the missingjobResult/catch.md. Update the summary entry so the documented API is reachable.
gitbook/jobResult/ofResult.md:1 - Deleting this page leaves
gitbook/SUMMARY.mdpointing atjobResult/ofResult.md, which makes the published documentation navigation link dead. Update the summary to remove the entry or point it at the replacement page.
gitbook/task/catch.md:1 - Deleting this page leaves
gitbook/SUMMARY.mdpointing attask/catch.md, which makes the published documentation navigation link dead. Update the summary to remove the entry or point it at the replacement API page.
gitbook/taskResult/catch.md:12 - The new signature and examples do not match the API:
TaskResult.catchis the obsolete two-argument mapper alias in the source, while the one-argumentTask<'T> -> Task<Result<'T, exn>>function isTask.catch; custom error mapping isTaskResult.catchWith. This page therefore documents a call that will not compile.
gitbook/taskResult/catchWith.md:1 - This
catchWithpage is not listed ingitbook/SUMMARY.md; the TaskResult navigation only exposescatch.md. Add the new page to the summary so users can discover the API.
src/FsToolkit.ErrorHandling/Async.FSharpCore11.fs:131 - This separate catch-all has the same cancellation bug even if
catchWithis corrected: a canceled computation is converted toErrorinstead of remaining canceled. Delegate through the cancellation-preservingcatchWithafter mapping success toOk.
src/FsToolkit.ErrorHandling/Async.FSharpCore11.fs:11 - The module summary describes
Taskcomputations, but this file defines theAsyncshims. This makes the generated API documentation misleading; describe asynchronous computations instead.
src/FsToolkit.ErrorHandling/Async.FSharpCore11.fs:24 - The shim is compiled for pre-net10 targets, but this example invokes
Async.RunSynchronouslyImmediate, which is a newer FSharp.Core API and is not provided by this shim. The copied examples therefore do not work for the targets this file supports; use the broadly availableAsync.RunSynchronouslythroughout the shim documentation.
src/FsToolkit.ErrorHandling/Result.fs:504 - This net10 guard removes
defaultValue, whileignoreErrorstill callsdefaultValueunqualified at line 558. That leaves the net10 source with an unresolved binding; useResult.defaultValueor keep a local compatibility definition.
src/FsToolkit.ErrorHandling/Result.fs:678 - The XML documentation for the retained pre-net10
valueOrfunction still links toresult/others#valueor, but this PR removes that section fromgitbook/result/others.md. The generated API docs will contain a dead link; update the link to the replacementdefaultWithdocumentation or remove it.
tests/FsToolkit.ErrorHandling.AsyncSeq.Tests/FsToolkit.ErrorHandling.AsyncSeq.Tests.fsproj:5 - This test project now has a
net10.0leg, but its project reference points to a library whoseTargetFrameworksstop atnet9.0. The net10 test therefore resolves the net9 source asset and does not validate the AsyncSeq package under the intended FSharp.Core 11/net10 target; add a matching net10 library target or remove this misleading test leg.
tests/FsToolkit.ErrorHandling.IcedTasks.Tests/FsToolkit.ErrorHandling.IcedTasks.Tests.fsproj:5 - This test project now has a
net10.0leg, but its project reference points to a library whoseTargetFrameworksstop atnet9.0. The net10 test therefore resolves the net9 source asset and does not validate the IcedTasks package under the intended FSharp.Core 11/net10 target; add a matching net10 library target or remove this misleading test leg.
tests/FsToolkit.ErrorHandling.JobResult.Tests/FsToolkit.ErrorHandling.JobResult.Tests.fsproj:5 - This test project now has a
net10.0leg, but its project reference points to a library whoseTargetFrameworksstop atnet9.0. The net10 test therefore resolves the net9 source asset and does not validate the dependent package under the intended FSharp.Core 11/net10 target; add a matching net10 library target or remove this misleading test leg.
- Files reviewed: 132/132 changed files
- Comments generated: 14
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
I think that we should consider going to |
That was my initial instinct; I only changed tack due to it being a preview SDK and the CI not being rigged for it as yet. Definitely don't want to release a non-beta release depending on FSharp.Core 11-rc That said, non-LTS TFM-specific builds have less value for me and should be candidates for trimming (leave net6.0 etc, but remove net9.0, and maybe run the tests under net8.0 (to cover the net8.0 TFM build)). I'd venture running tests under net9.0 should also removed, i.e. maybe replace the existing net9.0 stuff with net10.0 as part of this release cycle then we pin its API surface via Package Validation (e.g. https://github.com/jet/equinox/blob/master/src/Equinox/Equinox.fsproj#L5). So maybe:
|
be58ca2 to
1a49f69
Compare
2265c31 to
6caa072
Compare
| * Result | ||
| * [apply](result/apply.md) | ||
| * [bind](result/bind.md) | ||
| * [bind](result/bind.md) (from FSharp.Core) |
There was a problem hiding this comment.
Should these be removed from the docs?
| } | ||
| async.Bind( | ||
| Async.CancellationToken, | ||
| t |
There was a problem hiding this comment.
would recommend adjusting fantomas rules - this is great as a one or two liner
TheAngryByrd
left a comment
There was a problem hiding this comment.
Adversarial review (Claude and Codex) at afd058428c8218e12e47909889c45ab3ed82f333. Scope: src/FsToolkit.ErrorHandling/** and gitbook/**.
Inline: 3 × P2, 1 × Question, 5 × P3.
Two earlier threads are still open at this head, and I replied in each: the net10 FSharp.Core 11 load failure (P1) and Task.sequential parity with rc3.
- global.json: SDK 11.0.100. - Test projects, benchmarks, and FunctionMap target net10.0 and net11.0. The FAKE build project targets net11.0. .NET 8 and 9 reached end of support on 2026-11-10. - CI: a local composite action, .github/actions/setup-dotnet, now holds the setup-dotnet version and the runtime list for build.yml and publish.yml. - FunctionMap: nonNull for DeclaringType.FullName, which the net10 BCL marks as nullable. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
FAKE 5.22.0 brought 8 advisories into the build project, 2 of them critical (NuGet.Packaging GHSA-68w7-72jg-6qpp, System.Drawing.Common GHSA-rxg9-xrhp-64gj). The library packages had none. - Fake.* 5.22.0 -> 6.2.0, NuGet.Protocol 6.6.1 -> 6.12.5. - Direct MSBuild.StructuredLogger and NuGet.Protocol references lift the System.Drawing.Common and NuGet.Packaging versions that FAKE 6.2.0 still brings in. - FAKE 6 reads a "### [x.y.z]" heading as the latest release. With the 4.15.3 and 4.16.0 headings, it parsed version 2024. Remove the brackets from those headings. - build.fs fails when the parsed version does not match the first heading, so a release cannot publish or tag a wrong version. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The net10.0 asset depended on FSharp.Core 11 rc3. A default net10 app on SDK 10 gets FSharp.Core 10.x, so it built with NU1605 and failed at start with FileNotFoundException for FSharp.Core 11.0.0.0. - Add net11.0 to FsToolkit.ErrorHandling, AsyncSeq, JobResult, and IcedTasks. Keep net9.0 and net6.0. - Async and Task shims forward to FSharp.Core 11 under NET11_0_OR_GREATER. The net10.0 asset compiles the shims. - FSharp.Core minimum: netstandard2.x and net6.0 6.0.4, net9.0 9.0.300, net10.0 10.0.100, net11.0 11.0.101. Tests use the same versions, so the net10.0 run tests the shims and the net11.0 run tests FSharp.Core 11. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Fable 4.28.0 and 4.29.0 hang on SDK 11 after the project restore, with no CPU use. Fable 5.27.0 compiles the tests to JavaScript and Python. - .config/dotnet-tools.json: fable 4.28.0 -> 5.27.0. - Directory.Build.props: keep Nullable off when FABLE_COMPILER is true. Fable 5 checks nullness, and Nullness.fs polyfills non-nullable types for Fable, so isNull on SeqNull failed with FS3261. - build.yml: Fable Python tests run on Python 3.12 and 3.13. Fable 5 emits PEP 695 generics, which need Python 3.12 or newer. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Fable 5 no longer bundles its Python runtime library in the NuGet package. It publishes fable-library on PyPI with the same version as the fable tool. Without it, the tests fail with "ModuleNotFoundError: No module named 'fable_library'". runPythonTests reads the fable version from .config/dotnet-tools.json and installs fable-library at that version, so one pin controls both. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
With Fable 5, the JavaScript run stopped at "ParallelAsyncResult.zip tests - Error result fails fast 1" and node exited with code 0, so NpmTest passed without about 50 tests. - The JS Async.never was a Promise that never resolves and ignored cancellation. Fable 4 Async.Parallel failed fast like Promise.all. Fable 5 cancels the other computations and waits for them, as .NET does, so it waited forever. Async.never now registers on the cancellation token on every platform. This also removes the Async.Sleep loop. - The Fable JS entry point sets exit code 1 on "beforeExit". Pyxpecto ends every finished run with process.exit, so "beforeExit" fires only when a test never completes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The net10.0 test run uses the FsToolkit shims and the net11.0 run uses FSharp.Core 11, so each test also checks that both implementations behave the same. - Async.Await: one fault raises the inner exception, two faults keep AggregateException. A mutant that changes "InnerExceptions.Count = 1" to "= 0" now fails a test. - Task.catch, Task.catchWith, Async.catch, Async.catchWith: success, fault, and canceled input. - Task.sequential, Task.sequentialDo, Task.parallelLimit, Task.parallelDoLimit: start order and concurrency limit, with TaskCompletionSource gates. - Task.map: a mapper that throws OperationCanceledException gives Faulted for a completed input and Canceled for a pending input. RELEASE_NOTES.md now describes this change. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
fable-library for Python implements Async.Parallel without the maxDegreeOfParallelism argument, so Async.parallelLimit and Async.parallelDoLimit failed with "parallel() takes 1 positional argument but 2 were given". Fable 5 for JavaScript supports the argument. - Under FABLE_COMPILER_PYTHON, parallelLimit runs min(limit, count) workers. Each worker takes the next computation when it finishes, and results keep the input order. - New AsyncParallelLimit tests run on .NET, Fable JavaScript, and Fable Python. They hold each computation on a continuation and check how many started before each release. A mutant that starts one worker per computation fails 3 tests. - The net11 Obsolete messages and module docs now say net11, to match the NET11_0_OR_GREATER gate. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…demystifyfp#384) The net10 shim of Task.sequential and Task.sequentialDo follows dotnet/fsharp main, which checks the token before each factory (dotnet/fsharp#20695). FSharp.Core 11.0.101 was built without that change, and net11 consumers bind to it directly. - New tests: a canceled token cancels the task and calls no factory. They run on net10 and are pending on net11 until FSharp.Core ships dotnet/fsharp#20695. - A NOTE above sequential links to demystifyfp#384, which lists the steps for that release. - The net11 Obsolete messages and module docs now say net11. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Automated: written by Claude Code for the maintainer. I pushed 9 commits to this branch (
Local results: .NET net10 1,535 passed, net11 1,533 passed with 2 pending (#384), Fable JavaScript 874 passed, Fable Python 869 passed. |
…able On Linux CI, Fable 5 reports "Generic args are ignored in type testing" for `:? AsyncResultErrorException<'error>` at ParallelAsyncResult.fs(36,12). TreatWarningsAsErrors makes it an error, so NpmTest and PythonTest failed to compile. Fable 4 did not report it. Fable consumers compile this source too, so they can hit the same error. Under FABLE_COMPILER, AsyncResultErrorException is non-generic and carries the error boxed. map2 and map3 unbox it. The .NET code does not change. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
global.json asks for SDK 11.0.100, so the dev container failed with "A compatible .NET SDK was not found". The tests run on net10.0 and net11.0, and Fable 5 Python output needs Python 3.12 or newer. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The merge from master brought in a test that calls Async.singleton, which this PR marks obsolete. TreatWarningsAsErrors turned FS0044 into a build error in every dotnet-build job. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
There was a problem hiding this comment.
does Fable not implement Async.Parallel? ParallelLimit is a one liner?
i.e. I'd understand more if this was for an exotic bespoke algorithm with nuance like the Task equivalents
There was a problem hiding this comment.
Automated: written by Claude Code for the maintainer.
The one-liner is the .NET path. On Fable it was not one line:
| Target | Async.Parallel(computations, maxDegreeOfParallelism = n) |
|---|---|
| Fable 4.28 JavaScript | ignored the limit, all computations started at once |
| Fable 5.27 JavaScript | supports the limit |
Fable 5.27 Python (fable-library 5.27.0) |
parallel() takes 1 positional argument but 2 were given |
So 5e800d6 adds a worker implementation under FABLE_COMPILER_PYTHON (Async.FSharpCore11.fs). That bespoke path is what these tests pin. They run on .NET, Fable JavaScript, and Fable Python, so they also catch a Fable runtime that drops the limit again. A mutant that removes the limit in the Python path fails all 3 tests.
- Async XML examples: printfn, and Async.RunSynchronously (the shim file compiles only where FSharp.Core has no RunSynchronouslyImmediate). - AsyncResult.ofTask/ofTaskAction obsolete message: Async.Await is the function that unwraps a single-inner AggregateException. - getOrReraise.md: use Async.Await, Async.catch, and catchWith. - SUMMARY.md: Result.ignore is not from FSharp.Core. - jobResult/fromAsync.md: the example returns Ok. - RELEASE_NOTES.md: the Result removals apply to all TFMs. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The shim modules hold map, bind, and ignore on every TFM. Each release note now names its shim module and the TFMs where it is AutoOpen. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
master released 6.0.0-beta004. The notes of this PR move to a new 6.0.0-beta005 - tba section above it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
netstandard2.0 already gets the Async.Await ValueTask overloads and the ValueTask module through Microsoft.Bcl.AsyncInterfaces. Task.ofValueTask had a NETSTANDARD2_1 || NET guard, so netstandard2.0 did not get it. - Remove the guard. This adds API only. - Tests: completed, pending, and faulted value tasks. - RELEASE_NOTES.md: the netstandard2.0 ValueTask surface, and the known Task.sequential difference on net11 until FSharp.Core ships dotnet/fsharp#20695 (demystifyfp#384). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
FSharp.Core 11 adds utility functions for
Async,Task, andValueTask(fsharp/fslang-suggestions#1466 and fsharp/fslang-suggestions#1467). Many of them overlap with FsToolkit.ErrorHandling or came from it. Some signatures clash. For example, FSharp.Core 11Task.catchreturnsResult, and the FsToolkitTask.catchreturnedChoice.This PR aligns the FsToolkit API with FSharp.Core 11 on every target. Where FSharp.Core 11 is available, FsToolkit forwards to it. In the long term, the shims and their docs go away.
Changes
netstandard2.0,netstandard2.1,net9.0,net10.0, and a newnet11.0asset. Each asset keeps its own FSharp.Core minimum: 6.0.4 fornetstandard2.x, 9.0.300 fornet9.0, 10.0.100 fornet10.0, and 11.0.101 fornet11.0. A net10 app on SDK 10 does not need FSharp.Core 11.net11.0, the shim modules forward to FSharp.Core 11. They areObsoleteand not AutoOpen, so consumer code binds to FSharp.Core directly.net10.0and lower, and on Fable, AutoOpen shims supply the FSharp.Core 11 API. Examples:Async.Await,Async.StartTaskImmediate,Task.startAsyncImmediate,catchandcatchWithforAsyncandTask,Task.sequential, andAsync.parallelLimit.netstandard2.0, theValueTaskoverloads, theValueTaskmodule, andTask.ofValueTaskare also available, throughMicrosoft.Bcl.AsyncInterfaces. FSharp.Core 11 has them only onnetstandard2.1and later.Async.parallelLimithas its own worker implementation, becausefable-librarydoes not support the limit argument.singletonbecomes obsolete in favor ofresult,ok, orsome.catchbecomes obsolete in favor ofcatchWith. The obsoleteofTask,ofAsync, andofCatchTaskfunctions keep their old behavior.RELEASE_NOTES.mdnames the replacement for each.Option.map,map2,map3, andbindare removed. TheAsync,Task, andResultfunctions that FSharp.Core supplies move toFSharpCore11*Shimsmodules.AggregateExceptionwrapping. The builders useAsync.Awaitin place ofAsync.AwaitTask. Code can catch the actual exception type of an awaited task (Task to AsyncResult transition wrapsExceptioninto theAggregateException#154).net10.0andnet11.0. FAKE 6.2.0 removes the vulnerable build packages. Fable 5.27.0 replaces Fable 4, which hangs on SDK 11. Fable Python needs Python 3.12 or later andfable-libraryfrom PyPI. A Fable JavaScript test run now fails when a test never completes.Breaking changes
RELEASE_NOTES.md(6.0.0-beta005) lists each change. In summary:Async,Task, andResultfunctions moved to the shim modules.open FsToolkit.ErrorHandlingkeeps source compatibility.Task.catchreturnsTask<Result<_,_>>.ignorerequires explicit type arguments. TheOptionfunctions are removed, and FSharp.Core supplies the same functions.Task.catchandTask.catchWithdo not trapOperationCanceledException. This matches FSharp.Core 11.Task.mapon a completed task givesFaultedwhen the mapper throwsOperationCanceledException.AggregateException.Known differences
Task.sequentialandTask.sequentialDowith a canceled token. Onnet10.0and lower, the result isCanceled. Onnet11.0, FSharp.Core 11.0.101 calls the first task factory, because it does not contain refactor(CancellableTasks): Delegate to Task.sequential/parallelLimit dotnet/fsharp#20695. Task.sequential/sequentialDo: align net11.0 when FSharp.Core ships dotnet/fsharp#20695 #384 tracks the FSharp.Core release with the fix. Until then, the two tests for this case are pending onnet11.0.Async.catchandAsync.catchWithreturnErrorfor an awaited canceled task. This matches FSharp.Core 11. TheTaskvariants rethrow.Async.Awaitshim. It unwraps a single innerAggregateExceptionand resumes on the caller'sSynchronizationContext. Its stack traces include an extra rethrow frame that FSharp.Core 11 does not have.Async.Awaitoverloads (and the relatedStartTaskImmediatehelpers) are not shimmed. They cause overload ambiguity in the tests (Async.Await<_>andAsync.Await<_, _, _>). The real FSharp.Core API does not have this problem.Resolves #372
Resolves #154
Resolves #361
Automated: Claude Code updated this description for the maintainer.