Skip to content

Commit

Permalink
Update and cleanup code
Browse files Browse the repository at this point in the history
  • Loading branch information
halgari committed Nov 13, 2024
1 parent 00ddc0c commit 40e9590
Show file tree
Hide file tree
Showing 10 changed files with 125 additions and 137 deletions.
41 changes: 41 additions & 0 deletions Directory.Packages.props
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
<Project>
<ItemGroup>
<PackageVersion Include="DynamicData" Version="9.0.4" />
<PackageVersion Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="8.0.1" />
<PackageVersion Include="Microsoft.Extensions.Logging.Abstractions" Version="8.0.1" />
<PackageVersion Include="Microsoft.Extensions.ObjectPool" Version="8.0.10" />
<PackageVersion Include="Reloaded.Memory" Version="9.4.2" />
<PackageVersion Include="RocksDB" Version="9.4.0.50294" />
<PackageVersion Include="System.Reactive" Version="6.0.1" />
<PackageVersion Include="TransparentValueObjects" Version="1.0.1" PrivateAssets="all" OutputItemType="Analyzer" ReferenceOutputAssembly="false" />
<PackageVersion Include="JetBrains.Annotations" Version="2024.3.0" />
<PackageVersion Include="NexusMods.Paths" Version="0.11.0" />
<PackageVersion Include="R3" Version="1.2.9" />
<PackageVersion Include="System.IO.Hashing" Version="8.0.0" />
<PackageVersion Include="Microsoft.SourceLink.GitHub" Version="1.1.1" PrivateAssets="all" />
<PackageVersion Include="Weave" Version="2.1.0" OutputItemType="Analyzer" ReferenceOutputAssembly="false">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageVersion>
<PackageVersion Include="Microsoft.CodeAnalysis.CSharp" Version="4.11.0" />
<PackageVersion Include="System.CodeDom" Version="8.0.0" />
<PackageVersion Include="Verify.SourceGenerators" Version="2.5.0" />
<PackageVersion Include="Verify.Xunit" Version="28.2.0" />
<PackageVersion Include="FluentAssertions" Version="6.12.2" />
<PackageVersion Include="FluentAssertions.Analyzers" Version="0.34.1" PrivateAssets="all" OutputItemType="Analyzer" ReferenceOutputAssembly="false">
<IncludeAssets>runtime; build; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageVersion>
<PackageVersion Include="xunit" Version="2.9.2" />
<PackageVersion Include="xunit.runner.visualstudio" Version="2.8.2" PrivateAssets="all" OutputItemType="Analyzer" ReferenceOutputAssembly="false">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageVersion>
<PackageVersion Include="Xunit.SkippableFact" Version="1.4.13" />
<PackageVersion Include="Microsoft.NET.Test.Sdk" Version="17.11.1" />
<PackageVersion Include="coverlet.collector" Version="6.0.2" PrivateAssets="all" OutputItemType="Analyzer" ReferenceOutputAssembly="false">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageVersion>
<PackageVersion Include="GitHubActionsTestLogger" Version="2.4.1" PrivateAssets="all" OutputItemType="Analyzer" ReferenceOutputAssembly="false">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageVersion>
</ItemGroup>
</Project>
6 changes: 2 additions & 4 deletions NuGet.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@
<PackageLicenseExpression>GPL-3.0-only</PackageLicenseExpression>
<PackageRequireLicenseAcceptance>true</PackageRequireLicenseAcceptance>

<ManagePackageVersionsCentrally>true</ManagePackageVersionsCentrally>

<!-- This is the URL to the main project, not the individual package. -->
<PackageProjectUrl>https://github.com/Nexus-Mods/NexusMods.App</PackageProjectUrl>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
Expand All @@ -31,8 +33,4 @@
<None Include="$(MSBuildThisFileDirectory)icon.png" Pack="true" PackagePath="assets" />
<None Include="$(MSBuildThisFileDirectory)README.md" Pack="true" PackagePath="docs" />
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.*" PrivateAssets="all" />
</ItemGroup>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="DynamicData" Version="9.0.4" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="8.0.2" />
<PackageReference Include="NexusMods.Paths" Version="0.11.0" />
<PackageReference Include="R3" Version="1.2.9" />
<PackageReference Include="System.IO.Hashing" Version="8.0.0" />
<PackageReference Include="TransparentValueObjects" Version="1.0.1" PrivateAssets="all" OutputItemType="Analyzer" ReferenceOutputAssembly="false"/>
<PackageReference Update="JetBrains.Annotations" Version="2024.3.0" />
<PackageReference Include="DynamicData"/>
<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions"/>
<PackageReference Include="NexusMods.Paths"/>
<PackageReference Include="R3"/>
<PackageReference Include="System.IO.Hashing"/>
<PackageReference Include="TransparentValueObjects"/>
<PackageReference Update="JetBrains.Annotations"/>
<ProjectReference Include="..\..\src\NexusMods.MnemonicDB.SourceGenerator\NexusMods.MnemonicDB.SourceGenerator.csproj" OutputItemType="Analyzer" ReferenceOutputAssembly="false" />
</ItemGroup>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,10 @@
<InternalsVisibleTo>NexusMods.MnemonicDB.SourceGenerator.Tests</InternalsVisibleTo>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.CodeAnalysis.CSharp" Version="4.11.0" />
<PackageReference Include="System.CodeDom" Version="8.0.0" />
<PackageReference Include="Weave" Version="2.1.0" OutputItemType="Analyzer" ReferenceOutputAssembly="false" >
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Update="JetBrains.Annotations" Version="2024.3.0" />
<PackageReference Include="Microsoft.CodeAnalysis.CSharp"/>
<PackageReference Include="System.CodeDom"/>
<PackageReference Include="Weave"/>
<PackageReference Include="JetBrains.Annotations"/>
</ItemGroup>

<ItemGroup>
Expand Down
20 changes: 11 additions & 9 deletions src/NexusMods.MnemonicDB/NexusMods.MnemonicDB.csproj
Original file line number Diff line number Diff line change
@@ -1,17 +1,20 @@
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="$([MSBuild]::GetPathOfFileAbove('NuGet.Build.props', '$(MSBuildThisFileDirectory)../'))"/>
<PropertyGroup>
<RootNamespace>NexusMods.MnemonicDB</RootNamespace>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="DynamicData" Version="9.0.4" />
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="8.0.2" />
<PackageReference Include="Microsoft.Extensions.ObjectPool" Version="8.0.10" />
<PackageReference Include="Reloaded.Memory" Version="9.4.2" />
<PackageReference Include="RocksDB" Version="9.4.0.50294" />
<PackageReference Include="System.Reactive" Version="6.0.1" />
<PackageReference Include="TransparentValueObjects" Version="1.0.1" PrivateAssets="all" OutputItemType="Analyzer" ReferenceOutputAssembly="false"/>
<PackageReference Update="JetBrains.Annotations" Version="2024.3.0" />
<PackageReference Include="DynamicData"/>
<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" />
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions"/>
<PackageReference Include="Microsoft.Extensions.ObjectPool"/>
<PackageReference Include="Reloaded.Memory"/>
<PackageReference Include="RocksDB"/>
<PackageReference Include="System.Reactive"/>
<PackageReference Include="TransparentValueObjects"/>
<PackageReference Include="JetBrains.Annotations"/>
<PackageReference Include="NexusMods.Paths"/>
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\NexusMods.MnemonicDB.Abstractions\NexusMods.MnemonicDB.Abstractions.csproj"/>
Expand All @@ -22,5 +25,4 @@
<DependentUpon>DatomStore.cs</DependentUpon>
</Compile>
</ItemGroup>
<Import Project="$([MSBuild]::GetPathOfFileAbove('NuGet.Build.props', '$(MSBuildThisFileDirectory)../'))"/>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -4,32 +4,19 @@
<ProjectReference Include="..\..\src\NexusMods.MnemonicDB.SourceGenerator\NexusMods.MnemonicDB.SourceGenerator.csproj" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Verify.SourceGenerators" Version="2.5.0" />
<PackageReference Include="Verify.Xunit" Version="28.2.0" />

<PackageReference Include="Verify.SourceGenerators"/>
<PackageReference Include="Verify.Xunit"/>
<PackageReference Remove="Xunit.DependencyInjection"/>
<PackageReference Remove="Xunit.DependencyInjection.Logging"/>
<PackageReference Remove="Xunit.DependencyInjection.SkippableFact"/>
<PackageReference Update="JetBrains.Annotations" Version="2024.3.0" />
<PackageReference Update="FluentAssertions" Version="6.12.2" />
<PackageReference Update="FluentAssertions.Analyzers" Version="0.34.1">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Update="xunit" Version="2.9.2" />
<PackageReference Update="xunit.runner.visualstudio" Version="2.8.2">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Update="Xunit.SkippableFact" Version="1.4.13" />
<PackageReference Update="Microsoft.NET.Test.Sdk" Version="17.11.1" />
<PackageReference Update="coverlet.collector" Version="6.0.2">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Update="GitHubActionsTestLogger" Version="2.4.1">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Update="JetBrains.Annotations"/>
<PackageReference Update="FluentAssertions"/>
<PackageReference Update="FluentAssertions.Analyzers"/>
<PackageReference Update="xunit"/>
<PackageReference Update="xunit.runner.visualstudio"/>
<PackageReference Update="Xunit.SkippableFact"/>
<PackageReference Update="Microsoft.NET.Test.Sdk"/>
<PackageReference Update="coverlet.collector"/>
<PackageReference Update="GitHubActionsTestLogger" />
</ItemGroup>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -27,33 +27,21 @@
</ItemGroup>

<ItemGroup>
<PackageReference Update="Verify" Version="25.2.0" />
<PackageReference Update="JetBrains.Annotations" Version="2024.3.0" />
<PackageReference Update="FluentAssertions" Version="6.12.2" />
<PackageReference Update="FluentAssertions.Analyzers" Version="0.34.1">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Update="xunit" Version="2.9.2" />
<PackageReference Update="xunit.runner.visualstudio" Version="2.8.2">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Update="Xunit.SkippableFact" Version="1.4.13" />
<PackageReference Update="Xunit.DependencyInjection" Version="9.6.0" />
<PackageReference Update="Xunit.DependencyInjection.Logging" Version="9.0.0" />
<PackageReference Update="Xunit.DependencyInjection.SkippableFact" Version="9.0.0" />
<PackageReference Update="NexusMods.Hashing.xxHash64" Version="2.0.2" />
<PackageReference Update="Verify.Xunit" Version="25.2.0" />
<PackageReference Update="Microsoft.NET.Test.Sdk" Version="17.11.1" />
<PackageReference Update="coverlet.collector" Version="6.0.2">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Update="GitHubActionsTestLogger" Version="2.4.1">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Update="Verify" />
<PackageReference Update="JetBrains.Annotations" />
<PackageReference Update="FluentAssertions" />
<PackageReference Update="FluentAssertions.Analyzers"/>
<PackageReference Update="xunit" />
<PackageReference Update="xunit.runner.visualstudio"/>
<PackageReference Update="Xunit.SkippableFact"/>
<PackageReference Update="Xunit.DependencyInjection"/>
<PackageReference Update="Xunit.DependencyInjection.Logging"/>
<PackageReference Update="Xunit.DependencyInjection.SkippableFact"/>
<PackageReference Update="NexusMods.Hashing.xxHash64" />
<PackageReference Update="Verify.Xunit"/>
<PackageReference Update="Microsoft.NET.Test.Sdk"/>
<PackageReference Update="coverlet.collector"/>
<PackageReference Update="GitHubActionsTestLogger"/>
</ItemGroup>

</Project>
4 changes: 2 additions & 2 deletions tests/NexusMods.MnemonicDB.TestModel/Helpers/ObjectTuple.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,13 @@ public class ObjectTuple

public class ObjectTupleWriter : JsonConverter<ObjectTuple>
{
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);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,36 +12,23 @@
</ItemGroup>

<ItemGroup>
<PackageReference Update="JetBrains.Annotations" Version="2024.3.0" />
<PackageReference Update="FluentAssertions" Version="6.12.2" />
<PackageReference Update="FluentAssertions.Analyzers" Version="0.34.1">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Update="xunit" Version="2.9.2" />
<PackageReference Update="xunit.runner.visualstudio" Version="2.8.2">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Update="Xunit.SkippableFact" Version="1.4.13" />
<PackageReference Update="Xunit.DependencyInjection" Version="9.6.0" />
<PackageReference Update="Xunit.DependencyInjection.Logging" Version="9.0.0" />
<PackageReference Update="Xunit.DependencyInjection.SkippableFact" Version="9.0.0" />
<PackageReference Update="NexusMods.Hashing.xxHash64" Version="2.0.2" />
<PackageReference Update="Verify" Version="25.2.0" />
<PackageReference Update="Verify.Xunit" Version="25.2.0" />
<PackageReference Update="Microsoft.NET.Test.Sdk" Version="17.11.1" />
<PackageReference Update="coverlet.collector" Version="6.0.2">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Update="GitHubActionsTestLogger" Version="2.4.1">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Argon" Version="0.24.2" />
<PackageReference Include="NexusMods.Hashing.xxHash3" Version="3.0.2" />
<PackageReference Include="Verify.Xunit" Version="28.2.0" />
<PackageReference Update="JetBrains.Annotations" />
<PackageReference Update="FluentAssertions" />
<PackageReference Update="FluentAssertions.Analyzers"/>
<PackageReference Update="xunit" />
<PackageReference Update="xunit.runner.visualstudio"/>
<PackageReference Update="Xunit.SkippableFact" />
<PackageReference Update="Xunit.DependencyInjection" />
<PackageReference Update="Xunit.DependencyInjection.Logging" />
<PackageReference Update="Xunit.DependencyInjection.SkippableFact" />
<PackageReference Update="Verify" />
<PackageReference Update="Verify.Xunit" />
<PackageReference Update="Microsoft.NET.Test.Sdk" />
<PackageReference Update="coverlet.collector"/>
<PackageReference Update="GitHubActionsTestLogger"/>
<PackageReference Include="Argon"/>
<PackageReference Include="NexusMods.Hashing.xxHash3"/>
<PackageReference Include="Verify.Xunit"/>
</ItemGroup>

</Project>
42 changes: 15 additions & 27 deletions tests/NexusMods.MnemonicDB.Tests/NexusMods.MnemonicDB.Tests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -21,33 +21,21 @@
</ItemGroup>

<ItemGroup>
<PackageReference Update="JetBrains.Annotations" Version="2024.3.0" />
<PackageReference Update="FluentAssertions" Version="6.12.2" />
<PackageReference Update="FluentAssertions.Analyzers" Version="0.34.1">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Update="xunit" Version="2.9.2" />
<PackageReference Update="xunit.runner.visualstudio" Version="2.8.2">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Update="Xunit.SkippableFact" Version="1.4.13" />
<PackageReference Update="Xunit.DependencyInjection" Version="9.6.0" />
<PackageReference Update="Xunit.DependencyInjection.Logging" Version="9.0.0" />
<PackageReference Update="Xunit.DependencyInjection.SkippableFact" Version="9.0.0" />
<PackageReference Update="NexusMods.Hashing.xxHash64" Version="2.0.2" />
<PackageReference Update="Verify" Version="25.2.0" />
<PackageReference Update="Verify.Xunit" Version="25.2.0" />
<PackageReference Update="Microsoft.NET.Test.Sdk" Version="17.11.1" />
<PackageReference Update="coverlet.collector" Version="6.0.2">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Update="GitHubActionsTestLogger" Version="2.4.1">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Update="JetBrains.Annotations"/>
<PackageReference Update="FluentAssertions"/>
<PackageReference Update="FluentAssertions.Analyzers"/>
<PackageReference Update="xunit"/>
<PackageReference Update="xunit.runner.visualstudio"/>
<PackageReference Update="Xunit.SkippableFact"/>
<PackageReference Update="Xunit.DependencyInjection"/>
<PackageReference Update="Xunit.DependencyInjection.Logging"/>
<PackageReference Update="Xunit.DependencyInjection.SkippableFact"/>
<PackageReference Update="NexusMods.Hashing.xxHash64" />
<PackageReference Update="Verify"/>
<PackageReference Update="Verify.Xunit"/>
<PackageReference Update="Microsoft.NET.Test.Sdk"/>
<PackageReference Update="coverlet.collector"/>
<PackageReference Update="GitHubActionsTestLogger"/>
</ItemGroup>

</Project>

0 comments on commit 40e9590

Please sign in to comment.