Skip to content

Commit

Permalink
Remove .net6 and .net7 (#582)
Browse files Browse the repository at this point in the history
  • Loading branch information
TedHartMS authored Aug 15, 2024
1 parent d7a16b0 commit 0e5e560
Show file tree
Hide file tree
Showing 23 changed files with 21 additions and 186 deletions.
8 changes: 0 additions & 8 deletions .azure/pipelines/azure-pipelines-compliance.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,6 @@ jobs:
clean: False
submodules: recursive
persistCredentials: True
- task: UseDotNet@2
displayName: 'Use .NET Core sdk 6.0.x'
inputs:
version: 6.0.x
- task: UseDotNet@2
displayName: 'Use .NET Core sdk 7.0.x'
inputs:
version: 7.0.x
- task: UseDotNet@2
displayName: 'Use .NET Core sdk 8.0.x'
inputs:
Expand Down
8 changes: 0 additions & 8 deletions .azure/pipelines/azure-pipelines-external-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,6 @@ jobs:
clean: False
submodules: recursive
persistCredentials: True
- task: UseDotNet@2
displayName: Use .NET Core sdk 6.0.x
inputs:
version: 6.0.x
- task: UseDotNet@2
displayName: Use .NET Core sdk 7.0.x
inputs:
version: 7.0.x
- task: UseDotNet@2
displayName: Use .NET Core sdk 8.0.x
inputs:
Expand Down
8 changes: 0 additions & 8 deletions .azure/pipelines/azure-pipelines-internal-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,6 @@ jobs:
clean: False
submodules: recursive
persistCredentials: True
- task: UseDotNet@2
displayName: Use .NET Core sdk 6.0.x
inputs:
version: 6.0.x
- task: UseDotNet@2
displayName: Use .NET Core sdk 7.0.x
inputs:
version: 7.0.x
- task: UseDotNet@2
displayName: Use .NET Core sdk 8.0.x
inputs:
Expand Down
22 changes: 0 additions & 22 deletions .azure/pipelines/azure-pipelines-performance.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,18 +28,6 @@ jobs:
timeoutInMinutes: 75

steps:
- task: UseDotNet@2
displayName: Use .NET 6.0
inputs:
packageType: 'sdk'
version: '6.0.x'

- task: UseDotNet@2
displayName: Use .NET 7.0
inputs:
packageType: 'sdk'
version: '7.0.x'

- task: UseDotNet@2
displayName: Use .NET 8.0
inputs:
Expand Down Expand Up @@ -199,16 +187,6 @@ jobs:
submodules: recursive
persistCredentials: True

- task: UseDotNet@2
displayName: 'Use .NET Core sdk 6.0.x'
inputs:
version: 6.0.x

- task: UseDotNet@2
displayName: 'Use .NET Core sdk 7.0.x'
inputs:
version: 7.0.x

- task: UseDotNet@2
displayName: 'Use .NET Core sdk 8.0.x'
inputs:
Expand Down
24 changes: 0 additions & 24 deletions .azure/pipelines/azure-pipelines-tsavorite-codecoverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,18 +17,6 @@ jobs:
timeoutInMinutes: 125

steps:
- task: UseDotNet@2
displayName: Use .NET 6.0
inputs:
packageType: 'sdk'
version: '6.0.x'

- task: UseDotNet@2
displayName: Use .NET 7.0
inputs:
packageType: 'sdk'
version: '7.0.x'

- task: UseDotNet@2
displayName: Use .NET 8.0
inputs:
Expand Down Expand Up @@ -120,18 +108,6 @@ jobs:
timeoutInMinutes: 125

steps:
- task: UseDotNet@2
displayName: Use .NET 6.0
inputs:
packageType: 'sdk'
version: '6.0.x'

- task: UseDotNet@2
displayName: Use .NET 7.0
inputs:
packageType: 'sdk'
version: '7.0.x'

- task: UseDotNet@2
displayName: Use .NET 8.0
inputs:
Expand Down
24 changes: 0 additions & 24 deletions .azure/pipelines/azure-pipelines-tsavorite.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,18 +25,6 @@ jobs:
buildConfiguration: 'Release'

steps:
- task: UseDotNet@2
displayName: Use .NET 6.0
inputs:
packageType: 'sdk'
version: '6.0.x'

- task: UseDotNet@2
displayName: Use .NET 7.0
inputs:
packageType: 'sdk'
version: '7.0.x'

- task: UseDotNet@2
displayName: Use .NET 8.0
inputs:
Expand Down Expand Up @@ -132,18 +120,6 @@ jobs:
buildConfiguration: 'Release'

steps:
- task: UseDotNet@2
displayName: Use .NET 6.0
inputs:
packageType: 'sdk'
version: '6.0.x'

- task: UseDotNet@2
displayName: Use .NET 7.0
inputs:
packageType: 'sdk'
version: '7.0.x'

- task: UseDotNet@2
displayName: Use .NET 8.0
inputs:
Expand Down
24 changes: 0 additions & 24 deletions .azure/pipelines/azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,18 +25,6 @@ jobs:
buildConfiguration: 'Release'

steps:
- task: UseDotNet@2
displayName: Use .NET 6.0
inputs:
packageType: 'sdk'
version: '6.0.x'

- task: UseDotNet@2
displayName: Use .NET 7.0
inputs:
packageType: 'sdk'
version: '7.0.x'

- task: UseDotNet@2
displayName: Use .NET 8.0
inputs:
Expand Down Expand Up @@ -125,18 +113,6 @@ jobs:
buildConfiguration: 'Release'

steps:
- task: UseDotNet@2
displayName: Use .NET 6.0
inputs:
packageType: 'sdk'
version: '6.0.x'

- task: UseDotNet@2
displayName: Use .NET 7.0
inputs:
packageType: 'sdk'
version: '7.0.x'

- task: UseDotNet@2
displayName: Use .NET 8.0
inputs:
Expand Down
2 changes: 1 addition & 1 deletion Directory.Build.props
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project>

<PropertyGroup Label="Targets">
<TargetFrameworks>net6.0;net8.0</TargetFrameworks>
<TargetFrameworks>net8.0</TargetFrameworks>
</PropertyGroup>

<PropertyGroup Label="Configuration">
Expand Down
24 changes: 0 additions & 24 deletions Garnet.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -31,30 +31,6 @@
</metadata>
<files>
<file src="README.md" target="README.md" />
<file src="libs\server\bin\Release\net6.0\Garnet.server.dll" target="lib\net6.0" />
<file src="libs\server\bin\Release\net6.0\Garnet.server.pdb" target="lib\net6.0" />
<file src="libs\server\bin\Release\net6.0\Garnet.server.xml" target="lib\net6.0" />
<file src="libs\common\bin\Release\net6.0\Garnet.common.dll" target="lib\net6.0" />
<file src="libs\common\bin\Release\net6.0\Garnet.common.pdb" target="lib\net6.0" />
<file src="libs\common\bin\Release\net6.0\Garnet.common.xml" target="lib\net6.0" />
<file src="libs\client\bin\Release\net6.0\Garnet.client.dll" target="lib\net6.0" />
<file src="libs\client\bin\Release\net6.0\Garnet.client.pdb" target="lib\net6.0" />
<file src="libs\client\bin\Release\net6.0\Garnet.client.xml" target="lib\net6.0" />
<file src="libs\cluster\bin\Release\net6.0\Garnet.cluster.dll" target="lib\net6.0" />
<file src="libs\cluster\bin\Release\net6.0\Garnet.cluster.pdb" target="lib\net6.0" />
<file src="libs\cluster\bin\Release\net6.0\Garnet.cluster.xml" target="lib\net6.0" />
<file src="libs\host\bin\Release\net6.0\Garnet.host.dll" target="lib\net6.0" />
<file src="libs\host\bin\Release\net6.0\Garnet.host.pdb" target="lib\net6.0" />
<file src="libs\host\bin\Release\net6.0\Garnet.host.xml" target="lib\net6.0" />
<file src="metrics\HdrHistogram\bin\Release\net6.0\HdrHistogram.dll" target="lib\net6.0" />
<file src="metrics\HdrHistogram\bin\Release\net6.0\HdrHistogram.pdb" target="lib\net6.0" />
<file src="metrics\HdrHistogram\bin\Release\net6.0\HdrHistogram.xml" target="lib\net6.0" />
<file src="libs\storage\Tsavorite\cs\src\core\bin\Release\net6.0\Tsavorite.core.dll" target="lib\net6.0" />
<file src="libs\storage\Tsavorite\cs\src\core\bin\Release\net6.0\Tsavorite.core.pdb" target="lib\net6.0" />
<file src="libs\storage\Tsavorite\cs\src\core\bin\Release\net6.0\Tsavorite.core.xml" target="lib\net6.0" />
<file src="libs\storage\Tsavorite\cs\src\devices\AzureStorageDevice\bin\Release\net6.0\Tsavorite.devices.AzureStorageDevice.dll" target="lib\net6.0" />
<file src="libs\storage\Tsavorite\cs\src\devices\AzureStorageDevice\bin\Release\net6.0\Tsavorite.devices.AzureStorageDevice.pdb" target="lib\net6.0" />
<file src="libs\storage\Tsavorite\cs\src\devices\AzureStorageDevice\bin\Release\net6.0\Tsavorite.devices.AzureStorageDevice.xml" target="lib\net6.0" />

<file src="libs\server\bin\Release\net8.0\Garnet.server.dll" target="lib\net8.0" />
<file src="libs\server\bin\Release\net8.0\Garnet.server.pdb" target="lib\net8.0" />
Expand Down
3 changes: 0 additions & 3 deletions benchmark/BDN.benchmark/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@

public class BaseConfig : ManualConfig
{
public Job Net6BaseJob { get; }
public Job Net8BaseJob { get; }

public BaseConfig()
Expand All @@ -29,12 +28,10 @@ public BaseConfig()

var baseJob = Job.Default.WithGcServer(true);

Net6BaseJob = baseJob.WithRuntime(CoreRuntime.Core60);
Net8BaseJob = baseJob.WithRuntime(CoreRuntime.Core80)
.WithEnvironmentVariables(new EnvironmentVariable("DOTNET_TieredPGO", "0"));

AddJob(
Net6BaseJob.WithId(".NET 6"),
Net8BaseJob.WithId(".NET 8")
);
}
Expand Down
2 changes: 0 additions & 2 deletions benchmark/Resp.benchmark/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,6 @@ namespace Resp.benchmark
/// "--op GEOADDREM --dbsize 2048 -b 256 -t 1,2"
/// </summary>

// Disabling for keeping compatibility with net6.0 and net7.0
#pragma warning disable IDE0028
class Program
{
public static IConnectionMultiplexer redis;
Expand Down
12 changes: 6 additions & 6 deletions libs/cluster/Session/RespClusterSlotManagementCommands.cs
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ private bool NetworkClusterAddSlots(int count, out bool invalidParameters)
readHead = (int)(ptr - recvBufferPtr);

// The slot parsing may give errorMessage even if the methods TryParseSlots true.
if (slotsParsed && errorMessage != default)
if (slotsParsed && !errorMessage.IsEmpty)
{
while (!RespWriteUtils.WriteError(errorMessage, ref dcurr, dend))
SendAndReset();
Expand Down Expand Up @@ -81,7 +81,7 @@ private bool NetworkClusterAddSlotsRange(int count, out bool invalidParameters)
readHead = (int)(ptr - recvBufferPtr);

//The slot parsing may give errorMessage even if the TryParseSlots returns true.
if (slotsParsed && errorMessage != default)
if (slotsParsed && !errorMessage.IsEmpty)
{
while (!RespWriteUtils.WriteError(errorMessage, ref dcurr, dend))
SendAndReset();
Expand Down Expand Up @@ -210,7 +210,7 @@ private bool NetworkClusterDelSlots(int count, out bool invalidParameters)
readHead = (int)(ptr - recvBufferPtr);

//The slot parsing may give errorMessage even if the TryParseSlots returns true.
if (slotsParsed && errorMessage != default)
if (slotsParsed && !errorMessage.IsEmpty)
{
while (!RespWriteUtils.WriteError(errorMessage, ref dcurr, dend))
SendAndReset();
Expand Down Expand Up @@ -256,7 +256,7 @@ private bool NetworkClusterDelSlotsRange(int count, out bool invalidParameters)
readHead = (int)(ptr - recvBufferPtr);

//The slot parsing may give errorMessage even if the TryParseSlots returns true.
if (slotsParsed && errorMessage != default)
if (slotsParsed && !errorMessage.IsEmpty)
{
while (!RespWriteUtils.WriteError(errorMessage, ref dcurr, dend))
SendAndReset();
Expand Down Expand Up @@ -335,7 +335,7 @@ private bool NetworkClusterDelKeysInSlotRange(int count, out bool invalidParamet
readHead = (int)(ptr - recvBufferPtr);

//The slot parsing may give errorMessage even if the TryParseSlots returns true.
if (slotsParsed && errorMessage != default)
if (slotsParsed && !errorMessage.IsEmpty)
{
while (!RespWriteUtils.WriteError(errorMessage, ref dcurr, dend))
SendAndReset();
Expand Down Expand Up @@ -560,7 +560,7 @@ private bool NetworkClusterSetSlotsRange(int count, out bool invalidParameters)

// Try to parse slot ranges. The parsing may give errorMessage even if the TryParseSlots returns true.
var slotsParsed = TryParseSlots(_count, ref ptr, out var slots, out var errorMessage, range: true);
if (slotsParsed && errorMessage != default)
if (slotsParsed && !errorMessage.IsEmpty)
{
while (!RespWriteUtils.WriteError(errorMessage, ref dcurr, dend))
SendAndReset();
Expand Down
6 changes: 0 additions & 6 deletions libs/common/AsciiUtils.cs
Original file line number Diff line number Diff line change
Expand Up @@ -48,13 +48,7 @@ public static byte ToUpper(byte c)
/// </summary>
public static void ToUpperInPlace(Span<byte> command)
{
#if NET8_0_OR_GREATER
Ascii.ToUpperInPlace(command, out _);
#else
foreach (ref var c in command)
if (c > 96 && c < 123)
c -= 32;
#endif
}

/// <inheritdoc cref="EqualsUpperCaseSpanIgnoringCase(ReadOnlySpan{byte}, ReadOnlySpan{byte})"/>
Expand Down
8 changes: 0 additions & 8 deletions libs/common/HashSlotUtils.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,7 @@ public static unsafe class HashSlotUtils
/// This table is based on the CRC-16-CCITT polynomial (0x1021)
/// </summary>
#pragma warning disable IDE0300 // Simplify collection initialization. Ignored to avoid dotnet-format bug, see https://github.com/dotnet/sdk/issues/39898
#if NET7_0_OR_GREATER
private static ReadOnlySpan<ushort> Crc16Table => new ushort[256]
#else
private static readonly ushort[] Crc16Table = new ushort[256]
#endif
{
0x0000, 0x1021, 0x2042, 0x3063, 0x4084, 0x50A5, 0x60C6, 0x70E7,
0x8108, 0x9129, 0xA14A, 0xB16B, 0xC18C, 0xD1AD, 0xE1CE, 0xF1EF,
Expand Down Expand Up @@ -65,11 +61,7 @@ internal static unsafe ushort Hash(byte* data, int len)
{
ushort result = 0;

#if NET7_0_OR_GREATER
ref var crc16Base = ref MemoryMarshal.GetReference(Crc16Table);
#else
ref var crc16Base = ref MemoryMarshal.GetArrayDataReference(Crc16Table);
#endif
var end = data + len;
while (data < end)
{
Expand Down
2 changes: 1 addition & 1 deletion libs/server/Objects/SortedSet/SortedSetObjectImpl.cs
Original file line number Diff line number Diff line change
Expand Up @@ -900,7 +900,7 @@ private void GetRank(ref ObjectInput input, ref SpanByteAndMemory output, bool a
if (inRange < 0 || (inRange == 0 && minValueExclusive))
continue;

var outRange = maxValueChars == default ? -1 : new ReadOnlySpan<byte>(item.Item2).SequenceCompareTo(maxValueChars);
var outRange = maxValueChars.IsEmpty ? -1 : new ReadOnlySpan<byte>(item.Item2).SequenceCompareTo(maxValueChars);
if (outRange > 0 || (outRange == 0 && maxValueExclusive))
break;

Expand Down
Loading

0 comments on commit 0e5e560

Please sign in to comment.