Skip to content

Commit 382f2f9

Browse files
authored
Add explicit support for SDK net10 (#460)
* - add explicit net10 target to lib and tests - remove net7 target, long since deprecated (remaining are LTS) - enable C# 14 and fix minor xunit overload nuance - use net10 for build and add to CI * include net10 in test matrix * dotnet format
1 parent 2c6e324 commit 382f2f9

7 files changed

Lines changed: 13 additions & 9 deletions

File tree

‎.github/actions/run-tests/action.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ runs:
2929
uses: actions/setup-dotnet@v4
3030
with:
3131
dotnet-version: |
32-
9.0.x
32+
10.0.x
3333
${{inputs.dotnet-version}}
3434
dotnet-quality: 'ga'
3535

‎.github/workflows/integration.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ jobs:
2727
fail-fast: false
2828
matrix:
2929
redis-version: [ '8.6', '8.4', '8.2', '7.4', '7.2', '6.2']
30-
dotnet-version: ['8.0', '9.0']
30+
dotnet-version: ['8.0', '9.0', '10.0']
3131
env:
3232
ACTIONS_ALLOW_UNSECURE_COMMANDS: true
3333
name: Redis ${{ matrix.redis-version }}; .NET ${{ matrix.dotnet-version }};

‎Directory.Build.props‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<PropertyGroup>
33
<Copyright>2022- Redis, inc.</Copyright>
44
<Nullable>enable</Nullable>
5-
<LangVersion>13</LangVersion>
5+
<LangVersion>14</LangVersion>
66
<ImplicitUsings>enable</ImplicitUsings>
77
<Authors>Redis Open Source</Authors>
88
<Owners>Redis OSS</Owners>

‎NRedisStack.sln‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Build", "Build", "{84D6210F
1616
global.json = global.json
1717
version.json = version.json
1818
tests\dockers\docker-compose.yml = tests\dockers\docker-compose.yml
19+
.github\actions\run-tests\action.yml = .github\actions\run-tests\action.yml
20+
.github\workflows\integration.yml = .github\workflows\integration.yml
1921
EndProjectSection
2022
EndProject
2123
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "docs", "docs\docs.csproj", "{4A35FC3C-69BC-4BDB-A4B2-6BFD0DF215AD}"

‎src/NRedisStack/NRedisStack.csproj‎

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

33
<PropertyGroup>
4-
<TargetFrameworks>net6.0;net7.0;net8.0;netstandard2.0;net481</TargetFrameworks>
4+
<TargetFrameworks>net6.0;net8.0;net10.0;netstandard2.0;net481</TargetFrameworks>
55
<GenerateDocumentationFile>true</GenerateDocumentationFile>
66
<PackageReadmeFile>README.md</PackageReadmeFile>
77
<PackageIcon>Redis.png</PackageIcon>

‎tests/NRedisStack.Tests/NRedisStack.Tests.csproj‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22
<PropertyGroup>
3-
<TargetFrameworks>net6.0;net7.0;net8.0;net9.0;net481</TargetFrameworks>
3+
<TargetFrameworks>net6.0;net8.0;net9.0;net10.0;net481</TargetFrameworks>
44
<IsPackable>false</IsPackable>
55
<PreserveCompilationContext>true</PreserveCompilationContext>
66
</PropertyGroup>

‎tests/NRedisStack.Tests/TopK/TopKTests.cs‎

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,11 @@ public void CreateTopKFilter(string endpointId)
2525

2626
var res = topk.Add(key, "bb", "cc");
2727
Assert.True(res![0].IsNull && res[1].IsNull);
28+
// ReSharper disable once UseCollectionExpression - need to avoid span overload due to TFMs
2829
Assert.Equal(topk.Query(key, "bb", "gg", "cc"), new[] { true, false, true });
2930
Assert.False(topk.Query(key, "notExists"));
30-
31-
Assert.Equal(topk.Count(key, "bb", "gg", "cc"), [1, 0, 1]);
31+
// ReSharper disable once UseCollectionExpression - need to avoid span overload due to TFMs
32+
Assert.Equal(topk.Count(key, "bb", "gg", "cc"), new[] { 1L, 0L, 1L });
3233

3334
var res2 = topk.List(key);
3435
Assert.Equal("bb", res2[0].ToString());
@@ -62,10 +63,11 @@ public async Task CreateTopKFilterAsync(string endpointId)
6263
var res = await topk.AddAsync(key, "bb", "cc");
6364
Assert.True(res![0].IsNull && res[1].IsNull);
6465

66+
// ReSharper disable once UseCollectionExpression - need to avoid span overload due to TFMs
6567
Assert.Equal(await topk.QueryAsync(key, "bb", "gg", "cc"), new[] { true, false, true });
6668
Assert.False(await topk.QueryAsync(key, "notExists"));
67-
68-
Assert.Equal(await topk.CountAsync(key, "bb", "gg", "cc"), [1, 0, 1]);
69+
// ReSharper disable once UseCollectionExpression - need to avoid span overload due to TFMs
70+
Assert.Equal(await topk.CountAsync(key, "bb", "gg", "cc"), new[] { 1L, 0L, 1L });
6971

7072
var res2 = await topk.ListAsync(key);
7173
Assert.Equal("bb", res2[0].ToString());

0 commit comments

Comments
 (0)