From 5b75779c76a2ec7127f678a1ac7b401e6a785c9c Mon Sep 17 00:00:00 2001
From: Ilya <36445+13xforever@users.noreply.github.com>
Date: Wed, 21 Feb 2024 00:54:50 +0500
Subject: [PATCH] Maintenance (#949)
* update windows builds
* upgrade dependencies
replace crc32 hashing with standard package
* comment
---
Clients/CirrusCiClient/CirrusCiClient.csproj | 2 +-
.../CompatApiClient/CompatApiClient.csproj | 4 +-
Clients/GithubClient/GithubClient.csproj | 2 +-
.../IrdLibraryClient/IrdFormat/IrdParser.cs | 5 ++-
.../IrdLibraryClient/IrdLibraryClient.csproj | 6 +--
Clients/PsnClient/PsnClient.csproj | 2 +-
CompatBot/CompatBot.csproj | 38 +++++++++----------
.../LogParserResultFormatter.cs | 3 +-
Tests/Tests.csproj | 4 +-
9 files changed, 34 insertions(+), 32 deletions(-)
diff --git a/Clients/CirrusCiClient/CirrusCiClient.csproj b/Clients/CirrusCiClient/CirrusCiClient.csproj
index 35b18f21..fe42b3e0 100644
--- a/Clients/CirrusCiClient/CirrusCiClient.csproj
+++ b/Clients/CirrusCiClient/CirrusCiClient.csproj
@@ -11,6 +11,6 @@
-
+
\ No newline at end of file
diff --git a/Clients/CompatApiClient/CompatApiClient.csproj b/Clients/CompatApiClient/CompatApiClient.csproj
index 8dcd4401..d7eab5a6 100644
--- a/Clients/CompatApiClient/CompatApiClient.csproj
+++ b/Clients/CompatApiClient/CompatApiClient.csproj
@@ -16,8 +16,8 @@
-
-
+
+
diff --git a/Clients/GithubClient/GithubClient.csproj b/Clients/GithubClient/GithubClient.csproj
index 6a75bf67..14e0dae2 100644
--- a/Clients/GithubClient/GithubClient.csproj
+++ b/Clients/GithubClient/GithubClient.csproj
@@ -6,7 +6,7 @@
-
+
diff --git a/Clients/IrdLibraryClient/IrdFormat/IrdParser.cs b/Clients/IrdLibraryClient/IrdFormat/IrdParser.cs
index e78e7e34..cf2d4e92 100644
--- a/Clients/IrdLibraryClient/IrdFormat/IrdParser.cs
+++ b/Clients/IrdLibraryClient/IrdFormat/IrdParser.cs
@@ -2,9 +2,9 @@
using System.Collections.Generic;
using System.IO;
using System.IO.Compression;
+using System.IO.Hashing;
using System.Text;
using CompatApiClient;
-using Force.Crc32;
namespace IrdLibraryClient.IrdFormat;
@@ -70,7 +70,8 @@ public static class IrdParser
result.Uid = reader.ReadInt32();
var dataLength = reader.BaseStream.Position;
result.Crc32 = reader.ReadUInt32();
- var crc32 = Crc32Algorithm.Compute(content, 0, (int)dataLength);
+ var crc32Bytes = Crc32.Hash(content.AsSpan(0, (int)dataLength));
+ var crc32 = BitConverter.ToUInt32(crc32Bytes);
if (result.Crc32 != crc32)
throw new InvalidDataException($"Corrupted IRD data, expected {result.Crc32:x8}, but was {crc32:x8}");
return result;
diff --git a/Clients/IrdLibraryClient/IrdLibraryClient.csproj b/Clients/IrdLibraryClient/IrdLibraryClient.csproj
index 301f731a..fb910fc5 100644
--- a/Clients/IrdLibraryClient/IrdLibraryClient.csproj
+++ b/Clients/IrdLibraryClient/IrdLibraryClient.csproj
@@ -5,10 +5,10 @@
enable
-
-
-
+
+
+
diff --git a/Clients/PsnClient/PsnClient.csproj b/Clients/PsnClient/PsnClient.csproj
index 2cb1ee58..4cef8077 100644
--- a/Clients/PsnClient/PsnClient.csproj
+++ b/Clients/PsnClient/PsnClient.csproj
@@ -12,7 +12,7 @@
-
+
diff --git a/CompatBot/CompatBot.csproj b/CompatBot/CompatBot.csproj
index 03d9ac18..695463c2 100644
--- a/CompatBot/CompatBot.csproj
+++ b/CompatBot/CompatBot.csproj
@@ -39,36 +39,36 @@
-
-
-
-
-
+
+
+
+
+
-
-
-
+
+
+
-
-
+
+
all
runtime; build; native; contentfiles; analyzers; buildtransitive
-
-
+
+
-
+
-
+
-
-
+
+
-
-
-
+
+
+
diff --git a/CompatBot/Utils/ResultFormatters/LogParserResultFormatter.cs b/CompatBot/Utils/ResultFormatters/LogParserResultFormatter.cs
index 41476c0b..26f7f72b 100644
--- a/CompatBot/Utils/ResultFormatters/LogParserResultFormatter.cs
+++ b/CompatBot/Utils/ResultFormatters/LogParserResultFormatter.cs
@@ -965,7 +965,8 @@ internal static partial class LogParserResult
< 23000 => "11 Beta Build " + windowsVersion.Build, // 22k series
< 24000 => "11 Dev Build " + windowsVersion.Build, // 23k series
< 25000 => "11 ??? Build " + windowsVersion.Build,
- < 26000 => "11 Canary Build " + windowsVersion.Build, // 25k series
+ < 26052 => "11 Canary Build " + windowsVersion.Build, // 25k series
+ < 27000 => "11 Dev/Canary Build " + windowsVersion.Build, // dev/canary merge branch before 24H2
_ => "11 ??? Build " + windowsVersion.Build,
},
_ => null,
diff --git a/Tests/Tests.csproj b/Tests/Tests.csproj
index ec718351..7a065a2c 100644
--- a/Tests/Tests.csproj
+++ b/Tests/Tests.csproj
@@ -7,12 +7,12 @@
-
+
all
runtime; build; native; contentfiles; analyzers; buildtransitive
-
+
all
runtime; build; native; contentfiles; analyzers; buildtransitive