Skip to content

Commit c660862

Browse files
authored
Merge pull request #104 from koculu/upgrade-to-net-90
Upgrade to the net 9.0.
2 parents 82774e0 + 807fe6a commit c660862

File tree

9 files changed

+64
-70
lines changed

9 files changed

+64
-70
lines changed

.github/workflows/dotnet.yml

+24-24
Original file line numberDiff line numberDiff line change
@@ -2,35 +2,35 @@ name: Build and Test
22

33
on:
44
push:
5-
branches: [ "main" ]
5+
branches: ['main']
66
paths-ignore:
7-
- '*.md'
7+
- '*.md'
88
pull_request:
9-
branches: [ "main" ]
9+
branches: ['main']
1010
paths-ignore:
11-
- '*.md'
11+
- '*.md'
1212

1313
jobs:
1414
build:
15-
1615
runs-on: ubuntu-latest
1716
steps:
18-
- uses: actions/checkout@v3
19-
- name: Setup .NET
20-
uses: actions/setup-dotnet@v3
21-
with:
22-
dotnet-version: |
23-
8.0.x
24-
7.0.x
25-
6.0.x
26-
- name: Display dotnet version
27-
run: dotnet --version
28-
- name: Restore dependencies
29-
working-directory: ./src
30-
run: dotnet restore
31-
- name: Build
32-
run: dotnet build --configuration Release --no-restore
33-
working-directory: ./src
34-
- name: Test
35-
run: dotnet test --no-build --configuration Release --verbosity normal
36-
working-directory: ./src
17+
- uses: actions/checkout@v3
18+
- name: Setup .NET
19+
uses: actions/setup-dotnet@v3
20+
with:
21+
dotnet-version: |
22+
9.0.x
23+
8.0.x
24+
7.0.x
25+
6.0.x
26+
- name: Display dotnet version
27+
run: dotnet --version
28+
- name: Restore dependencies
29+
working-directory: ./src
30+
run: dotnet restore
31+
- name: Build
32+
run: dotnet build --configuration Release --no-restore
33+
working-directory: ./src
34+
- name: Test
35+
run: dotnet test --no-build --configuration Release --verbosity normal
36+
working-directory: ./src

.github/workflows/publish-nuget.yml

+27-27
Original file line numberDiff line numberDiff line change
@@ -4,34 +4,34 @@ on:
44
workflow_dispatch:
55
inputs:
66
name:
7-
description: "When you press run workflow, the nuget package will be published."
8-
default: "I understand."
7+
description: 'When you press run workflow, the nuget package will be published.'
8+
default: 'I understand.'
99
jobs:
1010
build:
11-
1211
runs-on: ubuntu-latest
1312
steps:
14-
- uses: actions/checkout@v3
15-
- name: Setup .NET
16-
uses: actions/setup-dotnet@v3
17-
with:
18-
dotnet-version: |
19-
8.0.x
20-
7.0.x
21-
6.0.x
22-
- name: Display dotnet version
23-
run: dotnet --version
24-
- name: Restore dependencies
25-
working-directory: ./src
26-
run: dotnet restore
27-
- name: Build
28-
run: dotnet build --configuration Release --no-restore
29-
working-directory: ./src
30-
- name: Test
31-
run: dotnet test --no-build --configuration Release --verbosity normal
32-
working-directory: ./src
33-
- name: Publish the package to nuget.org
34-
run: dotnet nuget push ZoneTree/bin/Release/*.nupkg -k $NUGET_AUTH_TOKEN -s https://api.nuget.org/v3/index.json
35-
env:
36-
NUGET_AUTH_TOKEN: ${{ secrets.NUGET_TOKEN }}
37-
working-directory: ./src
13+
- uses: actions/checkout@v3
14+
- name: Setup .NET
15+
uses: actions/setup-dotnet@v3
16+
with:
17+
dotnet-version: |
18+
9.0.x
19+
8.0.x
20+
7.0.x
21+
6.0.x
22+
- name: Display dotnet version
23+
run: dotnet --version
24+
- name: Restore dependencies
25+
working-directory: ./src
26+
run: dotnet restore
27+
- name: Build
28+
run: dotnet build --configuration Release --no-restore
29+
working-directory: ./src
30+
- name: Test
31+
run: dotnet test --no-build --configuration Release --verbosity normal
32+
working-directory: ./src
33+
- name: Publish the package to nuget.org
34+
run: dotnet nuget push ZoneTree/bin/Release/*.nupkg -k $NUGET_AUTH_TOKEN -s https://api.nuget.org/v3/index.json
35+
env:
36+
NUGET_AUTH_TOKEN: ${{ secrets.NUGET_TOKEN }}
37+
working-directory: ./src

src/Playground/Playground.csproj

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
<PropertyGroup>
44
<OutputType>Exe</OutputType>
5-
<TargetFrameworks>net8.0</TargetFrameworks>
5+
<TargetFrameworks>net9.0</TargetFrameworks>
66
<ImplicitUsings>enable</ImplicitUsings>
77
<Nullable>disable</Nullable>
88
<Configurations>Debug;Release;ReleaseWithDoc</Configurations>

src/ZoneTree.UnitTests/SafeBplusTreeTests.cs

+4-8
Original file line numberDiff line numberDiff line change
@@ -148,15 +148,13 @@ public void BTreeIteratorParallelInserts(BTreeLockMode lockMode)
148148
{
149149
var key = random.Next();
150150
tree.AddOrUpdate(key,
151-
AddOrUpdateResult (ref int value) =>
151+
void (ref int value) =>
152152
{
153153
value = key + key;
154-
return AddOrUpdateResult.ADDED;
155154
},
156-
AddOrUpdateResult (ref int value) =>
155+
void (ref int value) =>
157156
{
158157
value = key + key;
159-
return AddOrUpdateResult.UPDATED;
160158
}, out _);
161159
});
162160
});
@@ -203,15 +201,13 @@ public void BTreeReverseIteratorParallelInserts(BTreeLockMode lockMode)
203201
{
204202
var key = random.Next();
205203
tree.AddOrUpdate(key,
206-
AddOrUpdateResult (ref int x) =>
204+
void (ref int x) =>
207205
{
208206
x = key + key;
209-
return AddOrUpdateResult.ADDED;
210207
},
211-
AddOrUpdateResult (ref int y) =>
208+
void (ref int y) =>
212209
{
213210
y = key + key;
214-
return AddOrUpdateResult.UPDATED;
215211
}, out _);
216212
});
217213
});

src/ZoneTree.UnitTests/ZoneTree.UnitTests.csproj

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<TargetFrameworks>net8.0</TargetFrameworks>
4+
<TargetFrameworks>net9.0</TargetFrameworks>
55
<ImplicitUsings>enable</ImplicitUsings>
66
<Nullable>disable</Nullable>
77

src/ZoneTree/Collections/BTree/BTree.Write.cs

+2-2
Original file line numberDiff line numberDiff line change
@@ -95,9 +95,9 @@ public bool TryInsert(in TKey key, in TValue value, out long opIndex)
9595
}
9696
}
9797

98-
public delegate AddOrUpdateResult AddDelegate(ref TValue value);
98+
public delegate void AddDelegate(ref TValue value);
9999

100-
public delegate AddOrUpdateResult UpdateDelegate(ref TValue value);
100+
public delegate void UpdateDelegate(ref TValue value);
101101

102102
public AddOrUpdateResult AddOrUpdate(
103103
in TKey key,

src/ZoneTree/Directory.Build.props

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
<Authors>Ahmed Yasin Koculu</Authors>
66
<PackageId>ZoneTree</PackageId>
77
<Title>ZoneTree</Title>
8-
<ProductVersion>1.8.3.0</ProductVersion>
9-
<Version>1.8.3.0</Version>
8+
<ProductVersion>1.8.4.0</ProductVersion>
9+
<Version>1.8.4.0</Version>
1010
<Authors>Ahmed Yasin Koculu</Authors>
1111
<AssemblyTitle>ZoneTree</AssemblyTitle>
1212
<Description>ZoneTree is a persistent, high-performance, transactional, ACID-compliant ordered key-value database for NET. It can operate in memory or on local/cloud storage.</Description>

src/ZoneTree/Segments/InMemory/MutableSegment.cs

+2-4
Original file line numberDiff line numberDiff line change
@@ -224,17 +224,15 @@ public AddOrUpdateResult Delete(in TKey key, out long opIndex)
224224

225225
var status = BTree
226226
.AddOrUpdate(key,
227-
AddOrUpdateResult (ref TValue x) =>
227+
void (ref TValue x) =>
228228
{
229229
MarkValueDeleted(ref x);
230230
insertedValue = x;
231-
return AddOrUpdateResult.ADDED;
232231
},
233-
AddOrUpdateResult (ref TValue x) =>
232+
void (ref TValue x) =>
234233
{
235234
MarkValueDeleted(ref x);
236235
insertedValue = x;
237-
return AddOrUpdateResult.UPDATED;
238236
}, out opIndex);
239237
WriteAheadLog.Append(in key, in insertedValue, opIndex);
240238
return status;

src/ZoneTree/ZoneTree.csproj

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<Deterministic>true</Deterministic>
55
<ContinuousIntegrationBuild>true</ContinuousIntegrationBuild>
66
<NeutralLanguage>en-US</NeutralLanguage>
7-
<TargetFrameworks>net8.0;net7.0;net6.0</TargetFrameworks>
7+
<TargetFrameworks>net9.0;net8.0;net7.0;net6.0</TargetFrameworks>
88
<RepositoryUrl>https://github.com/koculu/ZoneTree</RepositoryUrl>
99
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
1010
<ImplicitUsings>enable</ImplicitUsings>

0 commit comments

Comments
 (0)