Skip to content

Commit c33eabf

Browse files
committed
Merge branch 'master' into v5-2-update-fantomas
2 parents 6a5fea9 + edc9ae0 commit c33eabf

File tree

14 files changed

+71
-615
lines changed

14 files changed

+71
-615
lines changed

.config/dotnet-tools.json

Lines changed: 31 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,34 @@
11
{
2-
"version": 1,
3-
"isRoot": true,
4-
"tools": {
5-
"paket": {
6-
"version": "8.0.3",
7-
"commands": [
8-
"paket"
9-
],
10-
"rollForward": false
11-
},
12-
"fable": {
13-
"version": "4.4.0",
14-
"commands": [
15-
"fable"
16-
],
17-
"rollForward": false
18-
},
19-
"fantomas": {
20-
"version": "6.3.16",
21-
"commands": [
22-
"fantomas"
23-
],
24-
"rollForward": false
25-
},
26-
"femto": {
27-
"version": "0.19.0",
28-
"commands": [
29-
"femto"
30-
],
31-
"rollForward": false
2+
"version": 1,
3+
"isRoot": true,
4+
"tools": {
5+
"paket": {
6+
"version": "8.0.3",
7+
"commands": [
8+
"paket"
9+
],
10+
"rollForward": false
11+
},
12+
"fable": {
13+
"version": "4.4.0",
14+
"commands": [
15+
"fable"
16+
],
17+
"rollForward": false
18+
},
19+
"fantomas": {
20+
"version": "6.3.16",
21+
"commands": [
22+
"fantomas"
23+
],
24+
"rollForward": false
25+
},
26+
"femto": {
27+
"version": "0.19.0",
28+
"commands": [
29+
"femto"
30+
],
31+
"rollForward": false
32+
}
3233
}
33-
}
3434
}

RELEASE_NOTES.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,14 @@
1-
### 5.0.0-beta001
1+
### 5.0.0-beta001 - December 7, 2024
22
- BREAKING: [Remove Ply and update to FSharp 6](https://github.com/demystifyfp/FsToolkit.ErrorHandling/pull/248) Credits @TheAngryByrd
33
- BREAKING: [Remove MergeSources (and!) from some implementations](https://github.com/demystifyfp/FsToolkit.ErrorHandling/pull/261) Credits @TheAngryByrd
4+
- BREAKING: [Merge TaskResult into Core library](https://github.com/demystifyfp/FsToolkit.ErrorHandling/pull/285) Credits @TheAngryByrd
5+
- This means FsToolkit.ErrorHandling.TaskResult is no longer a separate package and will not be updated. It is now part of the core library.
46
- [Use Microsoft.Bcl.AsyncInterfaces in netstandard2.0 (Allows IAsyncDisposable and IAsyncEnumerable)](https://github.com/demystifyfp/FsToolkit.ErrorHandling/pull/250) Credits @TheAngryByrd
57
- [Build against Net8](https://github.com/demystifyfp/FsToolkit.ErrorHandling/pull/251) Credits @TheAngryByrd
68
- [Fix Overload Resolution to Align to Computation Expression used](https://github.com/demystifyfp/FsToolkit.ErrorHandling/pull/252) Credits @TheAngryByrd
79
- [refactor!: Seq.sequenceResultM returns Array instead of seq](https://github.com/demystifyfp/FsToolkit.ErrorHandling/pull/255) Credits @bartelink
810
- [feat(Seq): sequenceResultA](https://github.com/demystifyfp/FsToolkit.ErrorHandling/pull/255) Credits @bartelink
11+
-
912

1013

1114
### 4.18.0 - October 23, 2024

src/FsToolkit.ErrorHandling.AsyncSeq/AssemblyInfo.fs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,15 @@ open System.Reflection
55
[<assembly: AssemblyTitleAttribute("FsToolkit.ErrorHandling.AsyncSeq")>]
66
[<assembly: AssemblyProductAttribute("FsToolkit.ErrorHandling")>]
77
[<assembly: AssemblyDescriptionAttribute("FsToolkit.ErrorHandling is a utility library to work with the Result type in F#, and allows you to do clear, simple and powerful error handling.")>]
8-
[<assembly: AssemblyVersionAttribute("4.18.0")>]
9-
[<assembly: AssemblyFileVersionAttribute("4.18.0")>]
8+
[<assembly: AssemblyVersionAttribute("5.0.0")>]
9+
[<assembly: AssemblyFileVersionAttribute("5.0.0")>]
1010
[<assembly: AssemblyConfigurationAttribute("Release")>]
1111
do ()
1212

1313
module internal AssemblyVersionInformation =
1414
let [<Literal>] AssemblyTitle = "FsToolkit.ErrorHandling.AsyncSeq"
1515
let [<Literal>] AssemblyProduct = "FsToolkit.ErrorHandling"
1616
let [<Literal>] AssemblyDescription = "FsToolkit.ErrorHandling is a utility library to work with the Result type in F#, and allows you to do clear, simple and powerful error handling."
17-
let [<Literal>] AssemblyVersion = "4.18.0"
18-
let [<Literal>] AssemblyFileVersion = "4.18.0"
17+
let [<Literal>] AssemblyVersion = "5.0.0"
18+
let [<Literal>] AssemblyFileVersion = "5.0.0"
1919
let [<Literal>] AssemblyConfiguration = "Release"

src/FsToolkit.ErrorHandling.IcedTasks/AssemblyInfo.fs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,15 @@ open System.Reflection
55
[<assembly: AssemblyTitleAttribute("FsToolkit.ErrorHandling.IcedTasks")>]
66
[<assembly: AssemblyProductAttribute("FsToolkit.ErrorHandling")>]
77
[<assembly: AssemblyDescriptionAttribute("FsToolkit.ErrorHandling is a utility library to work with the Result type in F#, and allows you to do clear, simple and powerful error handling.")>]
8-
[<assembly: AssemblyVersionAttribute("4.18.0")>]
9-
[<assembly: AssemblyFileVersionAttribute("4.18.0")>]
8+
[<assembly: AssemblyVersionAttribute("5.0.0")>]
9+
[<assembly: AssemblyFileVersionAttribute("5.0.0")>]
1010
[<assembly: AssemblyConfigurationAttribute("Release")>]
1111
do ()
1212

1313
module internal AssemblyVersionInformation =
1414
let [<Literal>] AssemblyTitle = "FsToolkit.ErrorHandling.IcedTasks"
1515
let [<Literal>] AssemblyProduct = "FsToolkit.ErrorHandling"
1616
let [<Literal>] AssemblyDescription = "FsToolkit.ErrorHandling is a utility library to work with the Result type in F#, and allows you to do clear, simple and powerful error handling."
17-
let [<Literal>] AssemblyVersion = "4.18.0"
18-
let [<Literal>] AssemblyFileVersion = "4.18.0"
17+
let [<Literal>] AssemblyVersion = "5.0.0"
18+
let [<Literal>] AssemblyFileVersion = "5.0.0"
1919
let [<Literal>] AssemblyConfiguration = "Release"

src/FsToolkit.ErrorHandling.IcedTasks/CancellableTaskResultBuilderBase.fs

Lines changed: 0 additions & 199 deletions
Original file line numberDiff line numberDiff line change
@@ -828,124 +828,12 @@ module CancellableTaskResultBuilderBase =
828828
: CancellableTaskResultBuilderBaseCode<_, _, _, 'Builder> =
829829
this.Bind(awaiterT = awaiterT, continuation = (fun v -> this.Return v))
830830

831-
// [<NoEagerConstraintApplication>]
832-
// member inline this.BindReturn
833-
// (
834-
// awaiterT: 'Awaiter,
835-
// [<InlineIfLambda>] mapper: 'a -> 'TResult2
836-
// ) : CancellableTaskResultBuilderBaseCode<'TResult2, 'TResult2, 'Error, 'Builder> =
837-
// this.Bind(awaiterT = awaiterT, continuation = (fun v -> this.Return(mapper v)))
838-
839-
840831
/// <exclude/>
841832
[<AutoOpen>]
842833
module LowPriority =
843834
// Low priority extensions
844835
type CancellableTaskResultBuilderBase with
845836

846-
// /// <summary>
847-
// /// The entry point for the dynamic implementation of the corresponding operation. Do not use directly, only used when executing quotations that involve tasks or other reflective execution of F# code.
848-
// /// </summary>
849-
// [<NoEagerConstraintApplication>]
850-
// static member inline BindDynamic
851-
// (
852-
// sm:
853-
// byref<ResumableStateMachine<CancellableTaskResultBuilderBaseStateMachineData<'TOverall, 'Error, 'Builder>>>,
854-
// [<InlineIfLambda>] getAwaiter: CancellationToken -> 'Awaiter,
855-
// continuation:
856-
// ('TResult1
857-
// -> CancellableTaskResultBuilderBaseCode<'TOverall, 'TResult2, 'Error, 'Builder>)
858-
// ) : bool =
859-
// sm.Data.ThrowIfCancellationRequested()
860-
861-
// let mutable awaiter = getAwaiter sm.Data.CancellationToken
862-
863-
// let cont =
864-
// (CancellableTaskResultBuilderBaseResumptionFunc<'TOverall, 'Error, _>(fun sm ->
865-
// let result = Awaiter.GetResult awaiter
866-
867-
// match result with
868-
// | Ok result -> (continuation result).Invoke(&sm)
869-
// | Error e ->
870-
// sm.Data.Result <- Error e
871-
// true
872-
// ))
873-
874-
// // shortcut to continue immediately
875-
// if Awaiter.IsCompleted awaiter then
876-
// cont.Invoke(&sm)
877-
// else
878-
// sm.ResumptionDynamicInfo.ResumptionData <-
879-
// (awaiter :> ICriticalNotifyCompletion)
880-
881-
// sm.ResumptionDynamicInfo.ResumptionFunc <- cont
882-
// false
883-
884-
// /// <summary>Creates A CancellableTask that runs computation, and when
885-
// /// computation generates a result T, runs binder res.</summary>
886-
// ///
887-
// /// <remarks>A cancellation check is performed when the computation is executed.
888-
// ///
889-
// /// The existence of this method permits the use of let! in the
890-
// /// cancellableTask { ... } computation expression syntax.</remarks>
891-
// ///
892-
// /// <param name="getAwaiter">The computation to provide an unbound result.</param>
893-
// /// <param name="continuation">The function to bind the result of computation.</param>
894-
// ///
895-
// /// <returns>A CancellableTask that performs a monadic bind on the result
896-
// /// of computation.</returns>
897-
// [<NoEagerConstraintApplication>]
898-
// member inline _.Bind
899-
// (
900-
// [<InlineIfLambda>] getAwaiterTResult: CancellationToken -> 'Awaiter,
901-
// continuation:
902-
// ('TResult1
903-
// -> CancellableTaskResultBuilderBaseCode<'TOverall, 'TResult2, 'Error, 'Builder>)
904-
// ) : CancellableTaskResultBuilderBaseCode<'TOverall, 'TResult2, 'Error, 'Builder> =
905-
906-
// CancellableTaskResultBuilderBaseCode<'TOverall, 'TResult2, 'Error, 'Builder>(fun sm ->
907-
// if __useResumableCode then
908-
// //-- RESUMABLE CODE START
909-
// sm.Data.ThrowIfCancellationRequested()
910-
// // Get an awaiter from the Awaiter
911-
// let mutable awaiter = getAwaiterTResult sm.Data.CancellationToken
912-
913-
// let mutable __stack_fin = true
914-
915-
// if not (Awaiter.IsCompleted awaiter) then
916-
// // This will yield with __stack_yield_fin = false
917-
// // This will resume with __stack_yield_fin = true
918-
// let __stack_yield_fin = ResumableCode.Yield().Invoke(&sm)
919-
// __stack_fin <- __stack_yield_fin
920-
921-
// if __stack_fin then
922-
// let result = Awaiter.GetResult awaiter
923-
924-
// match result with
925-
// | Ok result -> (continuation result).Invoke(&sm)
926-
// | Error e ->
927-
// sm.Data.Result <- Error e
928-
// true
929-
// else
930-
// let mutable awaiter = awaiter :> ICriticalNotifyCompletion
931-
932-
// MethodBuilder.AwaitUnsafeOnCompleted(
933-
// &sm.Data.MethodBuilder,
934-
// &awaiter,
935-
// &sm
936-
// )
937-
938-
// false
939-
// else
940-
// CancellableTaskResultBuilderBase.BindDynamic(
941-
// &sm,
942-
// getAwaiterTResult,
943-
// continuation
944-
// )
945-
// //-- RESUMABLE CODE END
946-
// )
947-
948-
949837
/// <summary>Delegates to the input computation.</summary>
950838
///
951839
/// <remarks>The existence of this method permits the use of return! in the
@@ -963,16 +851,6 @@ module CancellableTaskResultBuilderBase =
963851
continuation = (fun v -> this.Return v)
964852
)
965853

966-
967-
// [<NoEagerConstraintApplication>]
968-
// member inline this.BindReturn
969-
// (
970-
// [<InlineIfLambda>] getAwaiterTResult: CancellationToken -> 'Awaiter,
971-
// mapper: 'TResult1 -> 'TResult2
972-
// ) : CancellableTaskResultBuilderBaseCode<_, _, _, _> =
973-
// this.Bind((fun ct -> getAwaiterTResult ct), (fun v -> this.Return(mapper v)))
974-
975-
976854
/// <summary>Allows the computation expression to turn other types into CancellationToken -> 'Awaiter</summary>
977855
///
978856
/// <remarks>This turns a CancellationToken -> 'Awaitable into a CancellationToken -> 'Awaiter.</remarks>
@@ -1145,18 +1023,6 @@ module CancellableTaskResultBuilderBase =
11451023
: CancellableTaskResultBuilderBaseCode<_, _, _, 'Builder> =
11461024
this.Bind(awaiterTResult = awaiterTResult, continuation = (fun v -> this.Return v))
11471025

1148-
// [<NoEagerConstraintApplication>]
1149-
// member inline this.BindReturn
1150-
// (
1151-
// awaiterTResult: 'Awaiter,
1152-
// [<InlineIfLambda>] mapper: 'a -> 'TResult2
1153-
// ) : CancellableTaskResultBuilderBaseCode<'TResult2, 'TResult2, 'Error, 'Builder> =
1154-
// this.Bind(
1155-
// awaiterTResult = awaiterTResult,
1156-
// continuation = (fun v -> this.Return(mapper v))
1157-
// )
1158-
1159-
11601026
/// <summary>Allows the computation expression to turn other types into CancellationToken -> 'Awaiter</summary>
11611027
///
11621028
/// <remarks>This is the identify function.</remarks>
@@ -1298,71 +1164,6 @@ module CancellableTaskResultBuilderBase =
12981164
: Async<_> =
12991165
Async.AwaitCancellableTaskResult t
13001166

1301-
1302-
// type AsyncEx with
1303-
1304-
// /// <summary>Return an asynchronous computation that will wait for the given task to complete and return
1305-
// /// its result.</summary>
1306-
// ///
1307-
// /// <remarks>
1308-
// /// This is based on <see href="https://github.com/fsharp/fslang-suggestions/issues/840">Async.Await overload (esp. AwaitTask without throwing AggregateException)</see>
1309-
// /// </remarks>
1310-
// static member inline AwaitCancellableTask
1311-
// ([<InlineIfLambda>] t: CancellationToken -> Task<'T>)
1312-
// =
1313-
// asyncEx {
1314-
// let! ct = Async.CancellationToken
1315-
// return! t ct
1316-
// }
1317-
1318-
// /// <summary>Return an asynchronous computation that will wait for the given task to complete and return
1319-
// /// its result.</summary>
1320-
// ///
1321-
// /// <remarks>
1322-
// /// This is based on <see href="https://github.com/fsharp/fslang-suggestions/issues/840">Async.Await overload (esp. AwaitTask without throwing AggregateException)</see>
1323-
// /// </remarks>
1324-
// static member inline AwaitCancellableTask
1325-
// ([<InlineIfLambda>] t: CancellationToken -> Task)
1326-
// =
1327-
// asyncEx {
1328-
// let! ct = Async.CancellationToken
1329-
// return! t ct
1330-
// }
1331-
1332-
// type Microsoft.FSharp.Control.Async with
1333-
1334-
// /// <summary>Return an asynchronous computation that will wait for the given task to complete and return
1335-
// /// its result.</summary>
1336-
// static member inline AwaitCancellableTask
1337-
// ([<InlineIfLambda>] t: CancellationToken -> Task<'T>)
1338-
// =
1339-
// async {
1340-
// let! ct = Async.CancellationToken
1341-
1342-
// return!
1343-
// t ct
1344-
// |> Async.AwaitTask
1345-
// }
1346-
1347-
// /// <summary>Return an asynchronous computation that will wait for the given task to complete and return
1348-
// /// its result.</summary>
1349-
// static member inline AwaitCancellableTask
1350-
// ([<InlineIfLambda>] t: CancellationToken -> Task)
1351-
// =
1352-
// async {
1353-
// let! ct = Async.CancellationToken
1354-
1355-
// return!
1356-
// t ct
1357-
// |> Async.AwaitTask
1358-
// }
1359-
1360-
// /// <summary>Runs an asynchronous computation, starting on the current operating system thread.</summary>
1361-
// static member inline AsCancellableTask
1362-
// (computation: Async<'T>)
1363-
// : CancellationToken -> Task<_> =
1364-
// fun ct -> Async.StartImmediateAsTask(computation, cancellationToken = ct)
1365-
13661167
// High priority extensions
13671168
type CancellableTaskResultBuilderBase with
13681169

0 commit comments

Comments
 (0)