Skip to content

Commit

Permalink
Update to net9-preview.6 (#675)
Browse files Browse the repository at this point in the history
* Ignore security warnings for build-only dependency
* Address net9 warnings
* Update dependencies
* Fix timing issue
  • Loading branch information
viceroypenguin authored Jul 16, 2024
1 parent 807dd88 commit 4d7b91a
Show file tree
Hide file tree
Showing 7 changed files with 24 additions and 11 deletions.
1 change: 1 addition & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 1 addition & 1 deletion Directory.Build.props
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<Project>
<PropertyGroup>
<LangVersion>latest</LangVersion>
<LangVersion>preview</LangVersion>

<Nullable>enable</Nullable>
<WarningsAsErrors>$(WarningsAsErrors);nullable;</WarningsAsErrors>
Expand Down
6 changes: 3 additions & 3 deletions Directory.Packages.props
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<PackageVersion Include="CommunityToolkit.Diagnostics" Version="8.2.2" />
<PackageVersion Include="coverlet.collector" Version="6.0.2" />
<PackageVersion Include="coverlet.msbuild" Version="6.0.2" />
<PackageVersion Include="DocFx.App" Version="2.76.0" />
<PackageVersion Include="DocFx.App" Version="2.77.0" />
<PackageVersion Include="GitHubActionsTestLogger" Version="2.4.1" />
<PackageVersion Include="Microsoft.CodeAnalysis.Analyzers" Version="3.3.4" />
<PackageVersion Include="Microsoft.CodeAnalysis.CSharp" Version="4.10.0" />
Expand All @@ -18,11 +18,11 @@
<PackageVersion Include="Scriban" Version="5.10.0" />
<PackageVersion Include="System.Linq.Async" Version="6.0.1" />
<PackageVersion Include="ThisAssembly.Resources" Version="1.4.3" />
<PackageVersion Include="xunit" Version="2.8.1" />
<PackageVersion Include="xunit" Version="2.9.0" />
</ItemGroup>

<ItemGroup Condition=" '$(TargetFramework)' != 'netcoreapp3.1' ">
<PackageVersion Include="xunit.runner.visualstudio" Version="2.8.0" PrivateAssets="All" />
<PackageVersion Include="xunit.runner.visualstudio" Version="2.8.2" PrivateAssets="All" />
</ItemGroup>

<ItemGroup Condition=" '$(TargetFramework)' == 'netcoreapp3.1' ">
Expand Down
4 changes: 2 additions & 2 deletions Docs/SuperLinq.Docs/SuperLinq.Docs.csproj
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFrameworks>net8.0</TargetFrameworks>
<NoWarn>$(NoWarn);CA1852;NU1701</NoWarn>
<NoWarn>$(NoWarn);CA1852;NU1701;NU1902;NU1903</NoWarn>
<IsPackable>false</IsPackable>
</PropertyGroup>

Expand Down
5 changes: 5 additions & 0 deletions Tests/SuperLinq.Async.Test/TestingSequence.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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<T> GetAsyncEnumerator(CancellationToken cancellationToken = default)
{
AssertTestingSequence(_enumerationCount == _disposedCount, SimultaneousEnumerations);
Expand Down
12 changes: 7 additions & 5 deletions Tests/SuperLinq.Async.Test/TimeoutTest.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace Test.Async;
namespace Test.Async;

public sealed class TimeoutTest
{
Expand Down Expand Up @@ -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);
}
}

Expand All @@ -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);
}
}
}
5 changes: 5 additions & 0 deletions Tests/SuperLinq.Test/TestingSequence.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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<T> GetEnumerator()
{
AssertTestingSequence(_enumerationCount == _disposedCount, SimultaneousEnumerations);
Expand Down

0 comments on commit 4d7b91a

Please sign in to comment.