From d39ee56fe7797bfb51dd9a5c8a84bdf3b6a7cced Mon Sep 17 00:00:00 2001 From: Ruben Bartelink Date: Sun, 24 Dec 2023 11:35:08 +0000 Subject: [PATCH 1/3] Fail CI on state machine warning --- Directory.Build.props | 4 ++++ src/FSharp.Control.TaskSeq/FSharp.Control.TaskSeq.fsproj | 2 -- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/Directory.Build.props b/Directory.Build.props index dd5c7f4c..f1bc8a07 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -1,3 +1,7 @@ + + + FS3511 + \ No newline at end of file diff --git a/src/FSharp.Control.TaskSeq/FSharp.Control.TaskSeq.fsproj b/src/FSharp.Control.TaskSeq/FSharp.Control.TaskSeq.fsproj index 33f0ce77..78f26089 100644 --- a/src/FSharp.Control.TaskSeq/FSharp.Control.TaskSeq.fsproj +++ b/src/FSharp.Control.TaskSeq/FSharp.Control.TaskSeq.fsproj @@ -27,11 +27,9 @@ Generates optimized IL code through resumable state machines, and comes with a c - - True From f2ec71f2f5235c4b4415e6f11ab354e0cbaffda6 Mon Sep 17 00:00:00 2001 From: Ruben Bartelink Date: Sun, 24 Dec 2023 11:36:01 +0000 Subject: [PATCH 2/3] Address warning --- .../TaskSeq.MaxMin.Tests.fs | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/FSharp.Control.TaskSeq.Test/TaskSeq.MaxMin.Tests.fs b/src/FSharp.Control.TaskSeq.Test/TaskSeq.MaxMin.Tests.fs index 1cb47865..8f122b52 100644 --- a/src/FSharp.Control.TaskSeq.Test/TaskSeq.MaxMin.Tests.fs +++ b/src/FSharp.Control.TaskSeq.Test/TaskSeq.MaxMin.Tests.fs @@ -296,7 +296,7 @@ module SideSeffects = } [)>] - let ``TaskSeq-minBy, maxBy with sequence that changes length`` (minMax: MinMax) = task { + let ``TaskSeq-minBy, maxBy with sequence that changes length`` (minMax: MinMax) = let mutable i = 0 let ts = taskSeq { @@ -311,7 +311,8 @@ module SideSeffects = else minMaxFn id ts |> Task.map (should equal v) - do! test (MinMax.getByFunction minMax) 10 - do! test (MinMax.getByFunction minMax) 20 - do! test (MinMax.getByFunction minMax) 30 - } + task { + do! test (MinMax.getByFunction minMax) 10 + do! test (MinMax.getByFunction minMax) 20 + do! test (MinMax.getByFunction minMax) 30 + } From 6a743a776c4bc5d347fff7e74e6cb3cbd019278d Mon Sep 17 00:00:00 2001 From: Abel Braaksma Date: Sun, 24 Dec 2023 15:42:46 +0100 Subject: [PATCH 3/3] Turn on `TreatWarningsAsErrors` for all warnings across the board --- Directory.Build.props | 4 ---- .../FSharp.Control.TaskSeq.SmokeTests.fsproj | 1 + .../FSharp.Control.TaskSeq.Test.fsproj | 3 ++- src/FSharp.Control.TaskSeq/FSharp.Control.TaskSeq.fsproj | 1 + 4 files changed, 4 insertions(+), 5 deletions(-) diff --git a/Directory.Build.props b/Directory.Build.props index f1bc8a07..dd5c7f4c 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -1,7 +1,3 @@ - - - FS3511 - \ No newline at end of file diff --git a/src/FSharp.Control.TaskSeq.SmokeTests/FSharp.Control.TaskSeq.SmokeTests.fsproj b/src/FSharp.Control.TaskSeq.SmokeTests/FSharp.Control.TaskSeq.SmokeTests.fsproj index ce465298..5442f1b6 100644 --- a/src/FSharp.Control.TaskSeq.SmokeTests/FSharp.Control.TaskSeq.SmokeTests.fsproj +++ b/src/FSharp.Control.TaskSeq.SmokeTests/FSharp.Control.TaskSeq.SmokeTests.fsproj @@ -2,6 +2,7 @@ net6.0 + True diff --git a/src/FSharp.Control.TaskSeq.Test/FSharp.Control.TaskSeq.Test.fsproj b/src/FSharp.Control.TaskSeq.Test/FSharp.Control.TaskSeq.Test.fsproj index ffe3bbec..ceb5ab14 100644 --- a/src/FSharp.Control.TaskSeq.Test/FSharp.Control.TaskSeq.Test.fsproj +++ b/src/FSharp.Control.TaskSeq.Test/FSharp.Control.TaskSeq.Test.fsproj @@ -1,7 +1,8 @@ - + net6.0 + True diff --git a/src/FSharp.Control.TaskSeq/FSharp.Control.TaskSeq.fsproj b/src/FSharp.Control.TaskSeq/FSharp.Control.TaskSeq.fsproj index 78f26089..297af81f 100644 --- a/src/FSharp.Control.TaskSeq/FSharp.Control.TaskSeq.fsproj +++ b/src/FSharp.Control.TaskSeq/FSharp.Control.TaskSeq.fsproj @@ -2,6 +2,7 @@ netstandard2.1 + True true True Computation expression 'taskSeq' for processing IAsyncEnumerable sequences and module functions