From eeb31f2f398f5e4d8fdff76a4f30b0452084fdef Mon Sep 17 00:00:00 2001 From: Stuart Turner Date: Tue, 16 Jul 2024 08:54:13 -0500 Subject: [PATCH 1/4] Ignore security warnings for build-only dependency --- Docs/SuperLinq.Docs/SuperLinq.Docs.csproj | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Docs/SuperLinq.Docs/SuperLinq.Docs.csproj b/Docs/SuperLinq.Docs/SuperLinq.Docs.csproj index b76be4d9..0636082c 100644 --- a/Docs/SuperLinq.Docs/SuperLinq.Docs.csproj +++ b/Docs/SuperLinq.Docs/SuperLinq.Docs.csproj @@ -1,9 +1,9 @@ - + Exe net8.0 - $(NoWarn);CA1852;NU1701 + $(NoWarn);CA1852;NU1701;NU1902;NU1903 false From fce89c966782fe1ab1da9ffa5f2c420e6ba383aa Mon Sep 17 00:00:00 2001 From: Stuart Turner Date: Tue, 16 Jul 2024 08:54:35 -0500 Subject: [PATCH 2/4] Address net9 warnings --- .editorconfig | 1 + Directory.Build.props | 2 +- Tests/SuperLinq.Async.Test/TestingSequence.cs | 5 +++++ Tests/SuperLinq.Test/TestingSequence.cs | 5 +++++ 4 files changed, 12 insertions(+), 1 deletion(-) diff --git a/.editorconfig b/.editorconfig index e1ca09b8..3835861e 100644 --- a/.editorconfig +++ b/.editorconfig @@ -385,3 +385,4 @@ dotnet_diagnostic.MA0147.severity = error dotnet_diagnostic.MA0148.severity = none dotnet_diagnostic.MA0149.severity = none dotnet_diagnostic.MA0154.severity = warning +dotnet_diagnostic.MA0158.severity = none diff --git a/Directory.Build.props b/Directory.Build.props index 679b126e..e377b504 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -1,6 +1,6 @@ - latest + preview enable $(WarningsAsErrors);nullable; diff --git a/Tests/SuperLinq.Async.Test/TestingSequence.cs b/Tests/SuperLinq.Async.Test/TestingSequence.cs index 847ee309..f4c241f7 100644 --- a/Tests/SuperLinq.Async.Test/TestingSequence.cs +++ b/Tests/SuperLinq.Async.Test/TestingSequence.cs @@ -94,6 +94,11 @@ ValueTask IAsyncDisposable.DisposeAsync() return default; } + [SuppressMessage( + "Style", + "IDE0100", + Justification = "Expanded code is used for better error reporting on test failures" + )] public IAsyncEnumerator GetAsyncEnumerator(CancellationToken cancellationToken = default) { AssertTestingSequence(_enumerationCount == _disposedCount, SimultaneousEnumerations); diff --git a/Tests/SuperLinq.Test/TestingSequence.cs b/Tests/SuperLinq.Test/TestingSequence.cs index 2d305cde..7a8cf6b1 100644 --- a/Tests/SuperLinq.Test/TestingSequence.cs +++ b/Tests/SuperLinq.Test/TestingSequence.cs @@ -74,6 +74,11 @@ void IDisposable.Dispose() AssertTestingSequence(_disposedCount == _enumerationCount, ExpectedDisposal); } + [SuppressMessage( + "Style", + "IDE0100", + Justification = "Expanded code is used for better error reporting on test failures" + )] public IEnumerator GetEnumerator() { AssertTestingSequence(_enumerationCount == _disposedCount, SimultaneousEnumerations); From 8afede2acfda5a3f86e865ce8625210dd154b7a7 Mon Sep 17 00:00:00 2001 From: Stuart Turner Date: Tue, 16 Jul 2024 08:54:43 -0500 Subject: [PATCH 3/4] Update dependencies --- Directory.Packages.props | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Directory.Packages.props b/Directory.Packages.props index 1fe7a4be..6a98636f 100644 --- a/Directory.Packages.props +++ b/Directory.Packages.props @@ -7,7 +7,7 @@ - + @@ -18,11 +18,11 @@ - + - + From dd09595767ae0efe0ef8bbcfd037773a14867e82 Mon Sep 17 00:00:00 2001 From: Stuart Turner Date: Tue, 16 Jul 2024 09:08:12 -0500 Subject: [PATCH 4/4] Fix timing issue --- Tests/SuperLinq.Async.Test/TimeoutTest.cs | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/Tests/SuperLinq.Async.Test/TimeoutTest.cs b/Tests/SuperLinq.Async.Test/TimeoutTest.cs index 656af07c..24a48864 100644 --- a/Tests/SuperLinq.Async.Test/TimeoutTest.cs +++ b/Tests/SuperLinq.Async.Test/TimeoutTest.cs @@ -1,4 +1,4 @@ -namespace Test.Async; +namespace Test.Async; public sealed class TimeoutTest { @@ -95,9 +95,10 @@ private sealed class SequenceWithoutThrowIfCancellationRequested : IAsyncEnumera return AsyncEnumerable.Range(1, 5) .SelectAwait(async x => { - await Task.Delay(TimeSpan.FromMilliseconds(1), CancellationToken.None); + await Task.Delay(TimeSpan.FromMilliseconds(10), CancellationToken.None); return x; - }).GetAsyncEnumerator(CancellationToken.None); + }) + .GetAsyncEnumerator(CancellationToken.None); } } @@ -110,9 +111,10 @@ private sealed class SequenceWithThrowIfCancellationRequested : IAsyncEnumerable return AsyncEnumerable.Range(1, 5) .SelectAwait(async x => { - await Task.Delay(TimeSpan.FromMilliseconds(1), cancellationToken); + await Task.Delay(TimeSpan.FromMilliseconds(10), cancellationToken); return x; - }).GetAsyncEnumerator(cancellationToken); + }) + .GetAsyncEnumerator(cancellationToken); } } }