From 40e95907f2f8a3050fc08911baeb192164307f0f Mon Sep 17 00:00:00 2001 From: halgari Date: Wed, 13 Nov 2024 12:07:26 -0700 Subject: [PATCH 1/4] Update and cleanup code --- Directory.Packages.props | 41 ++++++++++++++++ NuGet.Build.props | 6 +-- .../NexusMods.MnemonicDB.Abstractions.csproj | 14 +++--- ...exusMods.MnemonicDB.SourceGenerator.csproj | 11 ++--- .../NexusMods.MnemonicDB.csproj | 20 ++++---- ...ds.MnemonicDB.SourceGenerator.Tests.csproj | 35 +++++--------- .../NexusMods.MnemonicDB.Storage.Tests.csproj | 42 ++++++----------- .../Helpers/ObjectTuple.cs | 4 +- .../NexusMods.MnemonicDB.TestModel.csproj | 47 +++++++------------ .../NexusMods.MnemonicDB.Tests.csproj | 42 ++++++----------- 10 files changed, 125 insertions(+), 137 deletions(-) create mode 100644 Directory.Packages.props diff --git a/Directory.Packages.props b/Directory.Packages.props new file mode 100644 index 00000000..bc88b9c3 --- /dev/null +++ b/Directory.Packages.props @@ -0,0 +1,41 @@ + + + + + + + + + + + + + + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + + + + + + runtime; build; contentfiles; analyzers; buildtransitive + + + + runtime; build; native; contentfiles; analyzers; buildtransitive + + + + + runtime; build; native; contentfiles; analyzers; buildtransitive + + + runtime; build; native; contentfiles; analyzers; buildtransitive + + + \ No newline at end of file diff --git a/NuGet.Build.props b/NuGet.Build.props index 87aeb6cc..90c86ebf 100644 --- a/NuGet.Build.props +++ b/NuGet.Build.props @@ -12,6 +12,8 @@ GPL-3.0-only true + true + https://github.com/Nexus-Mods/NexusMods.App true @@ -31,8 +33,4 @@ - - - - diff --git a/src/NexusMods.MnemonicDB.Abstractions/NexusMods.MnemonicDB.Abstractions.csproj b/src/NexusMods.MnemonicDB.Abstractions/NexusMods.MnemonicDB.Abstractions.csproj index 7f0d6969..d3b54610 100644 --- a/src/NexusMods.MnemonicDB.Abstractions/NexusMods.MnemonicDB.Abstractions.csproj +++ b/src/NexusMods.MnemonicDB.Abstractions/NexusMods.MnemonicDB.Abstractions.csproj @@ -5,13 +5,13 @@ - - - - - - - + + + + + + + diff --git a/src/NexusMods.MnemonicDB.SourceGenerator/NexusMods.MnemonicDB.SourceGenerator.csproj b/src/NexusMods.MnemonicDB.SourceGenerator/NexusMods.MnemonicDB.SourceGenerator.csproj index f3e475a4..68cc9936 100644 --- a/src/NexusMods.MnemonicDB.SourceGenerator/NexusMods.MnemonicDB.SourceGenerator.csproj +++ b/src/NexusMods.MnemonicDB.SourceGenerator/NexusMods.MnemonicDB.SourceGenerator.csproj @@ -8,13 +8,10 @@ NexusMods.MnemonicDB.SourceGenerator.Tests - - - - all - runtime; build; native; contentfiles; analyzers; buildtransitive - - + + + + diff --git a/src/NexusMods.MnemonicDB/NexusMods.MnemonicDB.csproj b/src/NexusMods.MnemonicDB/NexusMods.MnemonicDB.csproj index 912027e7..64be62bb 100644 --- a/src/NexusMods.MnemonicDB/NexusMods.MnemonicDB.csproj +++ b/src/NexusMods.MnemonicDB/NexusMods.MnemonicDB.csproj @@ -1,17 +1,20 @@ + NexusMods.MnemonicDB true - - - - - - - - + + + + + + + + + + @@ -22,5 +25,4 @@ DatomStore.cs - diff --git a/tests/NexusMods.MnemonicDB.SourceGenerator.Tests/NexusMods.MnemonicDB.SourceGenerator.Tests.csproj b/tests/NexusMods.MnemonicDB.SourceGenerator.Tests/NexusMods.MnemonicDB.SourceGenerator.Tests.csproj index dbf3a6a9..a1c6d987 100644 --- a/tests/NexusMods.MnemonicDB.SourceGenerator.Tests/NexusMods.MnemonicDB.SourceGenerator.Tests.csproj +++ b/tests/NexusMods.MnemonicDB.SourceGenerator.Tests/NexusMods.MnemonicDB.SourceGenerator.Tests.csproj @@ -4,32 +4,19 @@ - - - + + - - - - all - runtime; build; contentfiles; analyzers; buildtransitive - - - - all - runtime; build; native; contentfiles; analyzers; buildtransitive - - - - - all - runtime; build; native; contentfiles; analyzers; buildtransitive - - - all - runtime; build; native; contentfiles; analyzers; buildtransitive - + + + + + + + + + diff --git a/tests/NexusMods.MnemonicDB.Storage.Tests/NexusMods.MnemonicDB.Storage.Tests.csproj b/tests/NexusMods.MnemonicDB.Storage.Tests/NexusMods.MnemonicDB.Storage.Tests.csproj index 0237ea48..44a17296 100644 --- a/tests/NexusMods.MnemonicDB.Storage.Tests/NexusMods.MnemonicDB.Storage.Tests.csproj +++ b/tests/NexusMods.MnemonicDB.Storage.Tests/NexusMods.MnemonicDB.Storage.Tests.csproj @@ -27,33 +27,21 @@ - - - - - all - runtime; build; contentfiles; analyzers; buildtransitive - - - - all - runtime; build; native; contentfiles; analyzers; buildtransitive - - - - - - - - - - all - runtime; build; native; contentfiles; analyzers; buildtransitive - - - all - runtime; build; native; contentfiles; analyzers; buildtransitive - + + + + + + + + + + + + + + + diff --git a/tests/NexusMods.MnemonicDB.TestModel/Helpers/ObjectTuple.cs b/tests/NexusMods.MnemonicDB.TestModel/Helpers/ObjectTuple.cs index efca6c23..f130302e 100644 --- a/tests/NexusMods.MnemonicDB.TestModel/Helpers/ObjectTuple.cs +++ b/tests/NexusMods.MnemonicDB.TestModel/Helpers/ObjectTuple.cs @@ -15,13 +15,13 @@ public class ObjectTuple public class ObjectTupleWriter : JsonConverter { - public override void WriteJson(JsonWriter writer, ObjectTuple value, JsonSerializer serializer) + public override void WriteJson(JsonWriter writer, ObjectTuple? value, JsonSerializer serializer) { var oldFormatting = writer.Formatting; writer.WriteStartArray(); writer.Formatting = Formatting.None; - writer.WriteValue(value.E.Value.ToString("x")); + writer.WriteValue(value!.E.Value.ToString("x")); writer.WriteValue(" " + value.A); diff --git a/tests/NexusMods.MnemonicDB.TestModel/NexusMods.MnemonicDB.TestModel.csproj b/tests/NexusMods.MnemonicDB.TestModel/NexusMods.MnemonicDB.TestModel.csproj index 428fbd0c..62f22cfd 100644 --- a/tests/NexusMods.MnemonicDB.TestModel/NexusMods.MnemonicDB.TestModel.csproj +++ b/tests/NexusMods.MnemonicDB.TestModel/NexusMods.MnemonicDB.TestModel.csproj @@ -12,36 +12,23 @@ - - - - all - runtime; build; contentfiles; analyzers; buildtransitive - - - - all - runtime; build; native; contentfiles; analyzers; buildtransitive - - - - - - - - - - - all - runtime; build; native; contentfiles; analyzers; buildtransitive - - - all - runtime; build; native; contentfiles; analyzers; buildtransitive - - - - + + + + + + + + + + + + + + + + + diff --git a/tests/NexusMods.MnemonicDB.Tests/NexusMods.MnemonicDB.Tests.csproj b/tests/NexusMods.MnemonicDB.Tests/NexusMods.MnemonicDB.Tests.csproj index 2b1005cb..57b6beb5 100644 --- a/tests/NexusMods.MnemonicDB.Tests/NexusMods.MnemonicDB.Tests.csproj +++ b/tests/NexusMods.MnemonicDB.Tests/NexusMods.MnemonicDB.Tests.csproj @@ -21,33 +21,21 @@ - - - - all - runtime; build; contentfiles; analyzers; buildtransitive - - - - all - runtime; build; native; contentfiles; analyzers; buildtransitive - - - - - - - - - - - all - runtime; build; native; contentfiles; analyzers; buildtransitive - - - all - runtime; build; native; contentfiles; analyzers; buildtransitive - + + + + + + + + + + + + + + + From 8831515b86912be4e1302212f2c70cc1d1cd89ba Mon Sep 17 00:00:00 2001 From: halgari Date: Wed, 13 Nov 2024 12:28:20 -0700 Subject: [PATCH 2/4] Update, cleanup, switch to .NET 9 --- CVE.Ignore.props | 9 +++++ Directory.Build.props | 6 +-- Directory.Packages.props | 12 ++++++ .../NexusMods.MnemonicDB.Benchmarks.csproj | 13 +++++-- .../OneBillionDatomsTest.csproj | 3 +- .../NexusMods.MnemonicDB.Abstractions.csproj | 1 + tests/Directory.Build.props | 39 +++++++------------ ...ds.MnemonicDB.SourceGenerator.Tests.csproj | 3 ++ .../NexusMods.MnemonicDB.Storage.Tests.csproj | 12 +----- .../NexusMods.MnemonicDB.TestModel.csproj | 7 ---- 10 files changed, 52 insertions(+), 53 deletions(-) create mode 100644 CVE.Ignore.props diff --git a/CVE.Ignore.props b/CVE.Ignore.props new file mode 100644 index 00000000..bed49fb1 --- /dev/null +++ b/CVE.Ignore.props @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/Directory.Build.props b/Directory.Build.props index c49d899b..02802bac 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -1,6 +1,6 @@ - net8.0 + net9.0 false @@ -19,8 +19,4 @@ $(NoWarn);SYSLIB1006 - - - - diff --git a/Directory.Packages.props b/Directory.Packages.props index bc88b9c3..e7a01b8f 100644 --- a/Directory.Packages.props +++ b/Directory.Packages.props @@ -1,5 +1,7 @@ + + @@ -9,6 +11,10 @@ + + + + @@ -19,6 +25,7 @@ + @@ -30,6 +37,10 @@ runtime; build; native; contentfiles; analyzers; buildtransitive + + + + runtime; build; native; contentfiles; analyzers; buildtransitive @@ -37,5 +48,6 @@ runtime; build; native; contentfiles; analyzers; buildtransitive + \ No newline at end of file diff --git a/benchmarks/NexusMods.MnemonicDB.Benchmarks/NexusMods.MnemonicDB.Benchmarks.csproj b/benchmarks/NexusMods.MnemonicDB.Benchmarks/NexusMods.MnemonicDB.Benchmarks.csproj index 9812dd54..7b498a6a 100644 --- a/benchmarks/NexusMods.MnemonicDB.Benchmarks/NexusMods.MnemonicDB.Benchmarks.csproj +++ b/benchmarks/NexusMods.MnemonicDB.Benchmarks/NexusMods.MnemonicDB.Benchmarks.csproj @@ -1,16 +1,19 @@  + + Exe - net8.0 + net9.0 enable enable + true - - - + + + @@ -18,5 +21,7 @@ + + diff --git a/benchmarks/OneBillionDatomsTest/OneBillionDatomsTest.csproj b/benchmarks/OneBillionDatomsTest/OneBillionDatomsTest.csproj index 8bca1457..715f5eb4 100644 --- a/benchmarks/OneBillionDatomsTest/OneBillionDatomsTest.csproj +++ b/benchmarks/OneBillionDatomsTest/OneBillionDatomsTest.csproj @@ -1,8 +1,9 @@  + Exe - net8.0 + net9.0 enable enable diff --git a/src/NexusMods.MnemonicDB.Abstractions/NexusMods.MnemonicDB.Abstractions.csproj b/src/NexusMods.MnemonicDB.Abstractions/NexusMods.MnemonicDB.Abstractions.csproj index d3b54610..e4d11465 100644 --- a/src/NexusMods.MnemonicDB.Abstractions/NexusMods.MnemonicDB.Abstractions.csproj +++ b/src/NexusMods.MnemonicDB.Abstractions/NexusMods.MnemonicDB.Abstractions.csproj @@ -6,6 +6,7 @@ + diff --git a/tests/Directory.Build.props b/tests/Directory.Build.props index 9e6d0bca..b6bab504 100644 --- a/tests/Directory.Build.props +++ b/tests/Directory.Build.props @@ -1,41 +1,30 @@ - + false true + true - - - - all - runtime; build; contentfiles; analyzers; buildtransitive - + + + - - - all - runtime; build; native; contentfiles; analyzers; buildtransitive - - - - - + + + + + + - - - all - runtime; build; native; contentfiles; analyzers; buildtransitive - - - all - runtime; build; native; contentfiles; analyzers; buildtransitive - + + + diff --git a/tests/NexusMods.MnemonicDB.SourceGenerator.Tests/NexusMods.MnemonicDB.SourceGenerator.Tests.csproj b/tests/NexusMods.MnemonicDB.SourceGenerator.Tests/NexusMods.MnemonicDB.SourceGenerator.Tests.csproj index a1c6d987..f4833066 100644 --- a/tests/NexusMods.MnemonicDB.SourceGenerator.Tests/NexusMods.MnemonicDB.SourceGenerator.Tests.csproj +++ b/tests/NexusMods.MnemonicDB.SourceGenerator.Tests/NexusMods.MnemonicDB.SourceGenerator.Tests.csproj @@ -1,9 +1,12 @@ + + + diff --git a/tests/NexusMods.MnemonicDB.Storage.Tests/NexusMods.MnemonicDB.Storage.Tests.csproj b/tests/NexusMods.MnemonicDB.Storage.Tests/NexusMods.MnemonicDB.Storage.Tests.csproj index 44a17296..3beb7f24 100644 --- a/tests/NexusMods.MnemonicDB.Storage.Tests/NexusMods.MnemonicDB.Storage.Tests.csproj +++ b/tests/NexusMods.MnemonicDB.Storage.Tests/NexusMods.MnemonicDB.Storage.Tests.csproj @@ -6,17 +6,7 @@ NexusMods.MnemonicDB.Storage.Tests true - - - - net8.0 - enable - enable - - false - true - - + diff --git a/tests/NexusMods.MnemonicDB.TestModel/NexusMods.MnemonicDB.TestModel.csproj b/tests/NexusMods.MnemonicDB.TestModel/NexusMods.MnemonicDB.TestModel.csproj index 62f22cfd..859d0b58 100644 --- a/tests/NexusMods.MnemonicDB.TestModel/NexusMods.MnemonicDB.TestModel.csproj +++ b/tests/NexusMods.MnemonicDB.TestModel/NexusMods.MnemonicDB.TestModel.csproj @@ -1,11 +1,4 @@  - - - net8.0 - enable - enable - - From 5da93da3aaeee423dbe8afd54a87e0b279b3387b Mon Sep 17 00:00:00 2001 From: halgari Date: Wed, 13 Nov 2024 12:32:04 -0700 Subject: [PATCH 3/4] Fix a few warnings --- Directory.Packages.props | 35 +++++++++---------- .../Storage/RocksDbBackend/Backend.cs | 3 ++ .../NexusMods.MnemonicDB.TestModel.csproj | 4 +++ 3 files changed, 23 insertions(+), 19 deletions(-) diff --git a/Directory.Packages.props b/Directory.Packages.props index e7a01b8f..b795dded 100644 --- a/Directory.Packages.props +++ b/Directory.Packages.props @@ -1,33 +1,30 @@ - - - - - + + + - + - - - - + + + - + all runtime; build; native; contentfiles; analyzers; buildtransitive - - + + - + runtime; build; contentfiles; analyzers; buildtransitive @@ -37,10 +34,10 @@ runtime; build; native; contentfiles; analyzers; buildtransitive - - - - + + + + runtime; build; native; contentfiles; analyzers; buildtransitive @@ -48,6 +45,6 @@ runtime; build; native; contentfiles; analyzers; buildtransitive - + \ No newline at end of file diff --git a/src/NexusMods.MnemonicDB/Storage/RocksDbBackend/Backend.cs b/src/NexusMods.MnemonicDB/Storage/RocksDbBackend/Backend.cs index 83184f74..431cc749 100644 --- a/src/NexusMods.MnemonicDB/Storage/RocksDbBackend/Backend.cs +++ b/src/NexusMods.MnemonicDB/Storage/RocksDbBackend/Backend.cs @@ -7,6 +7,9 @@ namespace NexusMods.MnemonicDB.Storage.RocksDbBackend; +/// +/// Backend for the RocksDB storage engine. +/// public class Backend : IStoreBackend { internal RocksDb? Db = null!; diff --git a/tests/NexusMods.MnemonicDB.TestModel/NexusMods.MnemonicDB.TestModel.csproj b/tests/NexusMods.MnemonicDB.TestModel/NexusMods.MnemonicDB.TestModel.csproj index 859d0b58..3d94a2f0 100644 --- a/tests/NexusMods.MnemonicDB.TestModel/NexusMods.MnemonicDB.TestModel.csproj +++ b/tests/NexusMods.MnemonicDB.TestModel/NexusMods.MnemonicDB.TestModel.csproj @@ -1,4 +1,8 @@  + + false + + From 7f080c06d3421ec80bde028bd4e5cdbc596cce8c Mon Sep 17 00:00:00 2001 From: halgari Date: Wed, 13 Nov 2024 13:16:15 -0700 Subject: [PATCH 4/4] Use the main revision of actions --- .github/workflows/dotnet-build-and-test.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/dotnet-build-and-test.yaml b/.github/workflows/dotnet-build-and-test.yaml index 70f23418..2732cb57 100644 --- a/.github/workflows/dotnet-build-and-test.yaml +++ b/.github/workflows/dotnet-build-and-test.yaml @@ -16,4 +16,4 @@ on: jobs: build-and-test: - uses: Nexus-Mods/NexusMods.App.Meta/.github/workflows/dotnet-build-and-test-with-osx.yaml@9c4844439c53f8b8b9f64fb707c91b469238b15e + uses: Nexus-Mods/NexusMods.App.Meta/.github/workflows/dotnet-build-and-test-with-osx.yaml@main