feat(Async+Task+ValueTask): consistent helper modules#19844
Conversation
✅ No release notes required |
5850539 to
7ad7946
Compare
There was a problem hiding this comment.
Pull request overview
Note
Copilot was unable to run its full agentic suite in this review.
Adds new camelCase helpers for Async, Task, and ValueTask in FSharp.Core, along with unit tests and surface area/release note updates.
Changes:
- Introduced
result,map,bind,ignore,catchWith,catch,emptyforAsync,Task,ValueTask(+Task.ofValueTask,ValueTask.ofTaskwhere available). - Added unit tests covering success/failure flows for the new helpers.
- Updated netstandard surface area baselines and release notes.
Reviewed changes
Copilot reviewed 12 out of 12 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/FSharp.Core.UnitTests/FSharp.Core/Microsoft.FSharp.Control/TaskModuleFunctions.fs | New tests for Task/ValueTask camelCase helpers. |
| tests/FSharp.Core.UnitTests/FSharp.Core/Microsoft.FSharp.Control/AsyncModuleFunctions.fs | New tests for Async camelCase helpers. |
| tests/FSharp.Core.UnitTests/FSharp.Core.UnitTests.fsproj | Includes the new test files in the test project. |
| tests/FSharp.Core.UnitTests/FSharp.Core.SurfaceArea.netstandard21.release.bsl | Surface area baseline updated for new APIs. |
| tests/FSharp.Core.UnitTests/FSharp.Core.SurfaceArea.netstandard21.debug.bsl | Surface area baseline updated for new APIs. |
| tests/FSharp.Core.UnitTests/FSharp.Core.SurfaceArea.netstandard20.release.bsl | Surface area baseline updated for new APIs. |
| tests/FSharp.Core.UnitTests/FSharp.Core.SurfaceArea.netstandard20.debug.bsl | Surface area baseline updated for new APIs. |
| src/FSharp.Core/tasks.fsi | Public signatures/docs for new Task/ValueTask modules. |
| src/FSharp.Core/tasks.fs | Implementation of new Task/ValueTask helpers. |
| src/FSharp.Core/async.fsi | Public signatures/docs for new Async camelCase helpers. |
| src/FSharp.Core/async.fs | Implementation of new Async camelCase helpers. |
| docs/release-notes/.FSharp.Core/11.0.100.md | Release notes entry for the new APIs. |
|
Hi Ruben, just to let you know - I am waiting for when we stop flowing into .NET 10 releases (10.0.400). |
|
Thanks @T-Gro; will be ready when the times come. Some open questions for when you have a minute to scan:
|
|
@T-Gro Two more notes
|
T-Gro
left a comment
There was a problem hiding this comment.
Focused on the consistency premise across Async/Task/ValueTask. Two decisions already settled: module suffix (compiled TaskModule/ValueTaskModule) and cancellation propagates everywhere (first-class, not caught like a normal exception — applies to both catch and catchWith). Inline comments have repros + proposed fixes.
|
@bartelink I noticed I was owing a few replies here, I apologize for taking a longer time.
Let's keep it out of this PR. It adds throttling + cancel-on-first-exception + aggregation and overlaps
The ergonomics are real, but a blessed
Noted — happy to review once that lands. I believe that clears everything I had outstanding — if I've missed a question anywhere in the thread, or any of the above needs more detail, flag it and I'll follow up. |
|
Thanks for catches - this is ready for re-review from my perspective (checklist removed and reposted below) |
|
@T-Gro I believe I've addressed all open feedback and hence it's ready for another review at this point Will attempt to be more responsive in addressing feedback quickly so we can get it into people's hands. Checklist:
|
Adds consistent helper modules for
Async,TaskandValueTask.Resolves fsharp/fslang-suggestions#1466
Checklist
consider anot now anywayTask.waithelper