Skip to content

Commit 56304db

Browse files
committed
Removed Ply from netstandard21 build
1 parent 8f0ef74 commit 56304db

File tree

16 files changed

+70
-14
lines changed

16 files changed

+70
-14
lines changed

paket.dependencies

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@ condition: netstandard2_0
3434
group NetStandard2_1
3535
source https://api.nuget.org/v3/index.json
3636
nuget FSharp.Core 6.0.3
37-
nuget Ply
3837
nuget Hopac
3938
nuget FSharp.Control.AsyncSeq
4039
nuget Expecto

paket.lock

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1119,9 +1119,6 @@ NUGET
11191119
System.Runtime.Serialization.Primitives (>= 4.3) - restriction: || (&& (< net20) (>= netstandard1.0) (< netstandard1.3)) (&& (< net20) (>= netstandard1.3) (< netstandard2.0))
11201120
System.Xml.XmlDocument (>= 4.3) - restriction: && (< net20) (>= netstandard1.3) (< netstandard2.0)
11211121
NuGet.Frameworks (6.1) - restriction: || (&& (>= net45) (>= netcoreapp1.0) (< netstandard1.3)) (&& (>= net451) (>= netcoreapp1.0)) (&& (>= netcoreapp1.0) (< netstandard2.0)) (>= netcoreapp2.1)
1122-
Ply (0.3.1)
1123-
FSharp.Core (>= 4.6.2) - restriction: >= netstandard2.0
1124-
System.Threading.Tasks.Extensions (>= 4.5.4) - restriction: >= netstandard2.0
11251122
runtime.debian.8-x64.runtime.native.System.Security.Cryptography.OpenSsl (4.3.3) - restriction: || (&& (>= net46) (< netstandard1.4) (>= uap10.0)) (&& (< netstandard1.3) (>= uap10.0)) (&& (< netstandard1.4) (>= uap10.0) (< win8) (< wpa81)) (&& (>= netstandard1.5) (< netstandard1.6) (>= uap10.0) (< win8) (< wpa81)) (&& (< netstandard1.5) (>= uap10.0) (< uap10.1)) (&& (< netstandard1.5) (>= uap10.0) (< win8) (< wpa81)) (&& (>= netstandard1.6) (< netstandard2.0) (>= uap10.0) (< win8) (< wpa81))
11261123
runtime.debian.9-x64.runtime.native.System.Security.Cryptography.OpenSsl (4.3.3) - restriction: || (&& (>= net46) (< netstandard1.4) (>= uap10.0)) (&& (< netstandard1.3) (>= uap10.0)) (&& (< netstandard1.4) (>= uap10.0) (< win8) (< wpa81)) (&& (>= netstandard1.5) (< netstandard1.6) (>= uap10.0) (< win8) (< wpa81)) (&& (< netstandard1.5) (>= uap10.0) (< uap10.1)) (&& (< netstandard1.5) (>= uap10.0) (< win8) (< wpa81)) (&& (>= netstandard1.6) (< netstandard2.0) (>= uap10.0) (< win8) (< wpa81))
11271124
runtime.fedora.23-x64.runtime.native.System.Security.Cryptography.OpenSsl (4.3.3) - restriction: || (&& (>= net46) (< netstandard1.4) (>= uap10.0)) (&& (< netstandard1.3) (>= uap10.0)) (&& (< netstandard1.4) (>= uap10.0) (< win8) (< wpa81)) (&& (>= netstandard1.5) (< netstandard1.6) (>= uap10.0) (< win8) (< wpa81)) (&& (< netstandard1.5) (>= uap10.0) (< uap10.1)) (&& (< netstandard1.5) (>= uap10.0) (< win8) (< wpa81)) (&& (>= netstandard1.6) (< netstandard2.0) (>= uap10.0) (< win8) (< wpa81))
@@ -1271,7 +1268,7 @@ NUGET
12711268
System.Reflection.Primitives (4.3) - restriction: || (&& (< netstandard1.2) (>= uap10.0) (< win8)) (&& (< netstandard1.3) (>= uap10.0)) (&& (< netstandard1.4) (>= uap10.0) (< win8) (< wpa81)) (&& (>= netstandard1.5) (< netstandard1.6) (>= uap10.0) (< win8) (< wpa81)) (&& (< netstandard1.5) (>= uap10.0) (< uap10.1)) (&& (< netstandard1.5) (>= uap10.0) (< win8) (< wpa81)) (&& (>= netstandard1.6) (< netstandard2.0) (>= uap10.0) (< win8) (< wpa81)) (&& (< portable-net45+win8+wpa81) (>= uap10.0))
12721269
System.Resources.ResourceManager (4.3) - restriction: || (&& (< monoandroid) (>= netcoreapp1.0) (< netcoreapp2.1) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< netstandard1.2) (>= uap10.0) (< win8)) (&& (< netstandard1.3) (>= uap10.0)) (&& (< netstandard1.4) (>= uap10.0) (< win8) (< wpa81)) (&& (>= netstandard1.5) (< netstandard1.6) (>= uap10.0) (< win8) (< wpa81)) (&& (< netstandard1.5) (>= uap10.0) (< uap10.1)) (&& (< netstandard1.5) (>= uap10.0) (< win8) (< wpa81)) (&& (< netstandard2.0) (>= uap10.0)) (&& (< portable-net45+win8+wpa81) (>= uap10.0))
12731270
System.Runtime (4.3.1) - restriction: || (&& (< monoandroid) (>= netcoreapp1.0) (< netcoreapp2.1) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< netstandard1.2) (>= uap10.0) (< win8)) (&& (< netstandard1.3) (>= uap10.0)) (&& (< netstandard1.4) (>= uap10.0)) (&& (>= netstandard1.5) (< netstandard1.6) (>= uap10.0) (< win8) (< wpa81)) (&& (< netstandard1.5) (>= uap10.0) (< uap10.1)) (&& (< netstandard1.5) (>= uap10.0) (< win8) (< wpa81)) (&& (< netstandard2.0) (>= uap10.0)) (&& (< portable-net45+win8+wpa81) (>= uap10.0))
1274-
System.Runtime.CompilerServices.Unsafe (6.0) - restriction: || (&& (< monoandroid) (< netstandard1.0) (>= netstandard2.0) (< win8)) (&& (< net45) (>= netstandard2.0) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (>= net461) (>= netstandard2.0)) (>= netcoreapp2.1) (&& (< netstandard1.0) (>= netstandard2.0) (>= win8)) (&& (>= netstandard2.0) (>= wp8))
1271+
System.Runtime.CompilerServices.Unsafe (6.0) - restriction: || (&& (< monoandroid) (< netstandard1.0) (>= netstandard2.0) (< win8)) (&& (< net45) (>= netstandard2.0) (< netstandard2.1) (< xamarintvos) (< xamarinwatchos)) (&& (>= net461) (>= netstandard2.0)) (>= netcoreapp2.1) (&& (< netstandard1.0) (>= netstandard2.0) (>= win8)) (&& (>= netstandard2.0) (>= wp8))
12751272
System.Runtime.Extensions (4.3.1) - restriction: || (&& (< monoandroid) (>= netcoreapp1.0) (< netcoreapp2.1) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< netstandard1.2) (>= uap10.0) (< win8)) (&& (< netstandard1.3) (>= uap10.0)) (&& (< netstandard1.4) (>= uap10.0) (< win8) (< wpa81)) (&& (>= netstandard1.5) (< netstandard1.6) (>= uap10.0) (< win8) (< wpa81)) (&& (< netstandard1.5) (>= uap10.0) (< uap10.1)) (&& (< netstandard1.5) (>= uap10.0) (< win8) (< wpa81)) (&& (< netstandard2.0) (>= uap10.0)) (&& (< portable-net45+win8+wpa81) (>= uap10.0))
12761273
System.Runtime.Handles (4.3) - restriction: || (&& (< monoandroid) (>= netcoreapp1.0) (< netstandard1.4)) (&& (>= netcoreapp1.0) (< netcoreapp2.1) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< netstandard1.3) (>= uap10.0)) (&& (< netstandard1.4) (>= uap10.0) (< win8) (< wpa81)) (&& (>= netstandard1.5) (< netstandard1.6) (>= uap10.0) (< win8) (< wpa81)) (&& (< netstandard1.5) (>= uap10.0) (< uap10.1)) (&& (< netstandard1.5) (>= uap10.0) (< win8) (< wpa81)) (&& (>= netstandard1.6) (< netstandard2.0) (>= uap10.0) (< win8) (< wpa81))
12771274
Microsoft.NETCore.Platforms (>= 1.1) - restriction: && (< monoandroid) (< monotouch) (< net46) (>= netstandard1.3) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)
@@ -1330,7 +1327,7 @@ NUGET
13301327
System.Text.RegularExpressions (4.3.1) - restriction: || (&& (< netstandard1.2) (>= uap10.0) (< win8)) (&& (< netstandard1.3) (>= uap10.0)) (&& (< netstandard1.4) (>= uap10.0) (< win8) (< wpa81)) (&& (>= netstandard1.5) (< netstandard1.6) (>= uap10.0) (< win8) (< wpa81)) (&& (< netstandard1.5) (>= uap10.0) (< uap10.1)) (&& (< netstandard1.5) (>= uap10.0) (< win8) (< wpa81)) (&& (>= netstandard1.6) (< netstandard2.0) (>= uap10.0) (< win8) (< wpa81)) (&& (< portable-net45+win8+wpa81) (>= uap10.0))
13311328
System.Threading (4.3) - restriction: || (&& (< monoandroid) (>= netcoreapp1.0) (< netcoreapp2.1) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< netstandard1.2) (>= uap10.0) (< win8)) (&& (< netstandard1.3) (>= uap10.0)) (&& (< netstandard1.4) (>= uap10.0) (< win8) (< wpa81)) (&& (>= netstandard1.5) (< netstandard1.6) (>= uap10.0) (< win8) (< wpa81)) (&& (< netstandard1.5) (>= uap10.0) (< uap10.1)) (&& (< netstandard1.5) (>= uap10.0) (< win8) (< wpa81)) (&& (< netstandard2.0) (>= uap10.0)) (&& (< portable-net45+win8+wpa81) (>= uap10.0))
13321329
System.Threading.Tasks (4.3) - restriction: || (&& (>= netcoreapp1.0) (< netcoreapp2.1) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< netstandard1.2) (>= uap10.0) (< win8)) (&& (< netstandard1.3) (>= uap10.0)) (&& (< netstandard1.4) (>= uap10.0) (< win8) (< wpa81)) (&& (>= netstandard1.5) (< netstandard1.6) (>= uap10.0) (< win8) (< wpa81)) (&& (< netstandard1.5) (>= uap10.0) (< uap10.1)) (&& (< netstandard1.5) (>= uap10.0) (< win8) (< wpa81)) (&& (>= netstandard1.6) (< netstandard2.0) (>= uap10.0) (< win8) (< wpa81)) (&& (< portable-net45+win8+wpa81) (>= uap10.0))
1333-
System.Threading.Tasks.Extensions (4.5.4) - restriction: >= netstandard2.0
1330+
System.Threading.Tasks.Extensions (4.5.4) - restriction: || (&& (>= net461) (>= netstandard2.0)) (&& (>= netstandard2.0) (< netstandard2.1))
13341331
System.Runtime.CompilerServices.Unsafe (>= 4.5.3) - restriction: || (&& (< monoandroid) (< monotouch) (< net45) (>= netstandard1.0) (< netstandard2.0) (< win8) (< wpa81) (< xamarintvos) (< xamarinwatchos)) (&& (< monoandroid) (< netstandard1.0) (>= portable-net45+win8+wp8+wpa81) (< win8)) (&& (>= net45) (< netstandard2.0)) (&& (< net45) (< netcoreapp2.1) (>= netstandard2.0) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (>= net461) (&& (< netstandard1.0) (>= win8)) (&& (< netstandard2.0) (>= wpa81)) (>= wp8)
13351332
System.Threading.Thread (4.3) - restriction: && (>= netcoreapp1.0) (< netcoreapp2.1) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)
13361333
System.Runtime (>= 4.3) - restriction: && (< monoandroid) (< monotouch) (< net46) (>= netstandard1.3) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)

src/FsToolkit.ErrorHandling.TaskResult/FsToolkit.ErrorHandling.TaskResult.fsproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
<!-- <TargetFrameworks>netstandard2.1</TargetFrameworks> -->
77
<DebugType>portable</DebugType>
88
<LangVersion>preview</LangVersion>
9-
<NoWarn>FS3511;FS3513</NoWarn>
9+
<NoWarn>FS1204;FS3511;FS3513</NoWarn>
1010
</PropertyGroup>
1111

1212

src/FsToolkit.ErrorHandling.TaskResult/TaskResultOptionCE.fs

Lines changed: 41 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,15 @@
11
namespace FsToolkit.ErrorHandling
22

33
open System.Threading.Tasks
4+
#if NETSTANDARD2_0
45
open FSharp.Control.Tasks.Affine.Unsafe
56
open FSharp.Control.Tasks.Affine
67
open Ply
7-
8+
#endif
89
[<AutoOpen>]
910
module TaskResultOptionCE =
1011

12+
#if NETSTANDARD2_0
1113
type TaskResultOptionBuilder() =
1214
member inline _.Return(value: 'T) : Ply<Result<'T option, 'TError>> =
1315
uply.Return <| result.Return(Some value)
@@ -38,3 +40,41 @@ module TaskResultOptionCE =
3840
member inline _.Run([<InlineIfLambda>] f: unit -> Ply<'m>) = task.Run f
3941

4042
let taskResultOption = TaskResultOptionBuilder()
43+
44+
#else
45+
46+
type TaskResultOptionBuilder() =
47+
member inline _.Return(value: 'T) : TaskCode<_, _> =
48+
option.Return value
49+
|> result.Return
50+
|> task.Return
51+
52+
member inline _.ReturnFrom(taskResult: Task<Result<'T option, 'TError>>) : TaskCode<_, _> =
53+
54+
task.ReturnFrom taskResult
55+
56+
member inline _.Bind
57+
(
58+
taskResult: Task<Result<'T option, 'TError>>,
59+
[<InlineIfLambda>] binder: 'T -> TaskCode<_, _>
60+
) : TaskCode<_, _> =
61+
62+
task.Bind(
63+
taskResult,
64+
function
65+
| Ok (Some x) -> binder x
66+
| Ok None -> task.Return <| Ok None
67+
| Error x -> task.Return <| Error x
68+
)
69+
70+
member inline _.Combine(tro1, tro2) =
71+
72+
task.Combine(tro1, tro2)
73+
74+
member inline _.Delay(f) = task.Delay f
75+
76+
member inline _.Run([<InlineIfLambda>] f: TaskCode<_, _>) = task.Run f
77+
78+
let taskResultOption = TaskResultOptionBuilder()
79+
80+
#endif
Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
11
Microsoft.SourceLink.GitHub
22

33
group NetStandard2
4-
Ply
5-
group NetStandard2_1
64
Ply

tests/FsToolkit.ErrorHandling.AsyncSeq.Tests/paket.references

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ group NetStandard2
66
YoloDev.Expecto.TestSdk
77

88
group NetStandard2_1
9-
Ply
109
Expecto
1110
Fable.Mocha
1211
Microsoft.NET.Test.Sdk

tests/FsToolkit.ErrorHandling.TaskResult.Tests/FsToolkit.ErrorHandling.TaskResult.Tests.fsproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22
<PropertyGroup>
33
<TargetFrameworks>net5.0;net6.0</TargetFrameworks>
4-
<!-- <TargetFrameworks>net6.0</TargetFrameworks> -->
4+
<!-- <TargetFrameworks>net5.0</TargetFrameworks> -->
55
<LangVersion>preview</LangVersion>
66
</PropertyGroup>
77
<ItemGroup Condition=" '$(TargetFramework)' == 'net5.0'">

tests/FsToolkit.ErrorHandling.TaskResult.Tests/List.fs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,10 @@ open TestData
66
open TestHelpers
77
open System
88
open FsToolkit.ErrorHandling
9+
10+
#if NETSTANDARD2_0 || NET5_0
911
open FSharp.Control.Tasks
12+
#endif
1013

1114

1215
let userId1 = Guid.NewGuid()

tests/FsToolkit.ErrorHandling.TaskResult.Tests/Result.fs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
module Result
22

3+
#if NETSTANDARD2_0 || NET5_0
34
open FSharp.Control.Tasks
5+
#endif
46
open Expecto
57
open FsToolkit.ErrorHandling
68

tests/FsToolkit.ErrorHandling.TaskResult.Tests/TaskOption.fs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,10 @@ open Expecto
99

1010
open System
1111
open System.Threading.Tasks
12+
13+
#if NETSTANDARD2_0 || NET5_0
1214
open FSharp.Control.Tasks
15+
#endif
1316
open TestData
1417
open TestHelpers
1518
open SampleDomain

0 commit comments

Comments
 (0)