Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Net 9 and Update Deps #2251

Open
wants to merge 12 commits into
base: main
Choose a base branch
from
18 changes: 18 additions & 0 deletions .github/workflows/build-linux-pupnet.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,15 @@ jobs:
with:
ref: ${{ inputs.Target || github.sha }}
submodules: "recursive"

- name: Setup .NET 9.x
uses: actions/setup-dotnet@v4
id: stepid
with:
dotnet-version: '9.x'

- name: Print debug info
run: dotnet --info

- name: Transform inputs
id: transformInputs
Expand Down Expand Up @@ -122,6 +131,15 @@ jobs:
with:
ref: ${{ inputs.Target || github.sha }}
submodules: "recursive"

- name: Setup .NET 9.x
uses: actions/setup-dotnet@v4
id: stepid
with:
dotnet-version: '9.x'

- name: Print debug info
run: dotnet --info

- name: Transform inputs
id: transformInputs
Expand Down
15 changes: 15 additions & 0 deletions .github/workflows/build-windows-pupnet.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,15 @@ jobs:
with:
ref: ${{ inputs.Target || github.sha }}
submodules: "recursive"

- name: Setup .NET 9.x
uses: actions/setup-dotnet@v4
id: stepid
with:
dotnet-version: '9.x'

- name: Print debug info
run: dotnet --info

- name: Transform inputs
id: transformInputs
Expand Down Expand Up @@ -163,6 +172,12 @@ jobs:
$projectName = [System.IO.Path]::GetFileNameWithoutExtension("$env:ProjectFile")
echo "projectDir=$projectDir" >> $env:GITHUB_OUTPUT
echo "projectName=$projectName" >> $env:GITHUB_OUTPUT
- name: Setup .NET 9.x
uses: actions/setup-dotnet@v4
id: stepid
with:
dotnet-version: '9.x'

- name: Print debug info
run: dotnet --info
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/clean_environment_tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:

build-and-test:
if: github.event_name == 'push' || github.event.pull_request.draft == false
uses: Nexus-Mods/NexusMods.App.Meta/.github/workflows/dotnet-build-and-test-with-osx.yaml@ae64a3be780a74e94b59ee463a413083013c8b0c
uses: Nexus-Mods/NexusMods.App.Meta/.github/workflows/dotnet-build-and-test-with-osx.yaml@main
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not using a pinned version of the workflows could cause issues.
Changes to the Meta repo that also require changes to the underlying repos would break CI during the mean time.
E.g. while the PR with the changes is being reviewed, Ci on all other PRs will break.

Just pointing it out, in case it others have opinions on this

with:
extra-test-args: "--blame-hang-timeout 20m"
test-filter: "RequiresNetworking!=True&FlakeyTest!=True"
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/networking_tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,11 @@ jobs:
submodules: "recursive"
lfs: true

- name: Setup .NET 8.x
- name: Setup .NET 9.x
uses: actions/setup-dotnet@v4
id: stepid
with:
dotnet-version: '8.x'
dotnet-version: '9.x'

- name: Print debug info
run: dotnet --info
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/publish-nuget-packages.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
publish:
needs: get-version
uses: Nexus-Mods/NexusMods.App.Meta/.github/workflows/publish-nuget-packages.yaml@7153945b739384233c7b3ba188b55201514a6fa8
uses: Nexus-Mods/NexusMods.App.Meta/.github/workflows/publish-nuget-packages.yaml@main
with:
version: ${{ needs.get-version.outputs.version }}
use-nuget: true
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/validate-nupkgs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,10 @@ jobs:
with:
submodules: "recursive"

- name: Setup .NET SDK
uses: actions/setup-dotnet@v3
- name: Setup .NET 9.x
uses: actions/setup-dotnet@v4
with:
dotnet-version: '8.x'
dotnet-version: '9.x'

- name: Pack
run: dotnet pack
Expand Down
2 changes: 1 addition & 1 deletion Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
</PropertyGroup>

<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<TargetFramework>net9.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
Expand Down
98 changes: 49 additions & 49 deletions Directory.Packages.props
Original file line number Diff line number Diff line change
Expand Up @@ -4,53 +4,53 @@
<PackageVersion Include="Avalonia.Labs.Panels" Version="11.2.0" />
<PackageVersion Include="Avalonia.Skia" Version="11.2.0" />
<PackageVersion Include="AvaloniaEdit.TextMate" Version="11.1.0" />
<PackageVersion Include="K4os.Compression.LZ4" Version="1.3.8" />
<PackageVersion Include="Bannerlord.ModuleManager" Version="6.0.242" />
<PackageVersion Include="K4os.Compression.LZ4" Version="1.3.7-beta" />
<PackageVersion Include="BsDiff" Version="1.1.0" />
<PackageVersion Include="LinqGen" Version="0.3.1" />
<PackageVersion Include="Microsoft.Extensions.Http.Resilience" Version="8.9.1" />
<PackageVersion Include="Microsoft.Extensions.Options" Version="8.0.2" />
<PackageVersion Include="Microsoft.Extensions.Http.Resilience" Version="9.0.0" />
<PackageVersion Include="Microsoft.Extensions.Options" Version="9.0.0" />
<PackageVersion Include="Nerdbank.FullDuplexStream" Version="1.1.12" />
<PackageVersion Include="Nerdbank.Streams" Version="2.11.74" />
<PackageVersion Include="NexusMods.MnemonicDB" Version="0.9.95" />
<PackageVersion Include="NexusMods.MnemonicDB.Abstractions" Version="0.9.95" />
<PackageVersion Include="NexusMods.Hashing.xxHash3.Paths" Version="3.0.2" />
<PackageVersion Include="NexusMods.Hashing.xxHash3" Version="3.0.2" />
<PackageVersion Include="NexusMods.Paths" Version="0.11.0" />
<PackageVersion Include="NexusMods.Paths.Extensions.Nx" Version="0.10.0" />
<PackageVersion Include="NexusMods.Paths.TestingHelpers" Version="0.10.0" />
<PackageVersion Include="Nerdbank.Streams" Version="2.11.79" />
<PackageVersion Include="NexusMods.MnemonicDB" Version="0.9.97" />
<PackageVersion Include="NexusMods.MnemonicDB.Abstractions" Version="0.9.97" />
<PackageVersion Include="NexusMods.Hashing.xxHash3.Paths" Version="3.0.3" />
<PackageVersion Include="NexusMods.Hashing.xxHash3" Version="3.0.3" />
<PackageVersion Include="NexusMods.Paths" Version="0.15.0" />
<PackageVersion Include="NexusMods.Paths.Extensions.Nx" Version="0.15.0" />
<PackageVersion Include="NexusMods.Paths.TestingHelpers" Version="0.15.0" />
<PackageVersion Include="NexusMods.Archives.Nx" Version="0.6.1" />
<PackageVersion Include="NexusMods.Telemetry.OpenTelemetry" Version="1.0.0" />
<PackageVersion Include="FomodInstaller.Interface" Version="1.2.0" />
<PackageVersion Include="FomodInstaller.Scripting.XmlScript" Version="1.0.0" />
<PackageVersion Include="Bannerlord.LauncherManager" Version="1.0.138" />
<PackageVersion Include="FetchBannerlordVersion" Version="1.0.6.46" />
<PackageVersion Include="NLog" Version="5.2.8" />
<PackageVersion Include="Noggog.CSharpExt" Version="2.64.0" />
<PackageVersion Include="Noggog.CSharpExt" Version="2.67.3" />
<PackageVersion Include="ObservableCollections" Version="2.2.0" />
<PackageVersion Include="ObservableCollections.R3" Version="3.1.0" />
<PackageVersion Include="ObservableCollections.R3" Version="3.3.2" />
<PackageVersion Include="QoiSharp" Version="1.0.0" />
<PackageVersion Include="R3" Version="1.2.9" />
<PackageVersion Include="R3Extensions.Avalonia" Version="1.2.9" />
<PackageVersion Include="ReactiveUI" Version="20.1.63" />
<PackageVersion Include="Spectre.Console.Testing" Version="0.49.1" />
<PackageVersion Include="StrawberryShake.Server" Version="13.9.12" />
<PackageVersion Include="StrawberryShake.Server" Version="14.1.0" />
<PackageVersion Include="System.Linq" Version="4.3.0" />
<PackageVersion Include="System.Text.Json" Version="8.0.5" />
<PackageVersion Include="TextMateSharp.Grammars" Version="1.0.63" />
<PackageVersion Include="OpenTelemetry" Version="1.8.1" />
<PackageVersion Include="OpenTelemetry.Exporter.OpenTelemetryProtocol" Version="1.8.1" />
<PackageVersion Include="OpenTelemetry.Extensions.Hosting" Version="1.8.1" />
<PackageVersion Include="Polly.Core" Version="8.4.2" />
<PackageVersion Include="Polly" Version="8.4.2" />
<PackageVersion Include="Verify" Version="26.6.0" />
<PackageVersion Include="ZstdSharp.Port" Version="0.8.1" />
<PackageVersion Include="System.Text.Json" Version="9.0.0" VersionOverride="9.0.0" />
<PackageVersion Include="TextMateSharp.Grammars" Version="1.0.64" />
<PackageVersion Include="OpenTelemetry" Version="1.10.0" />
<PackageVersion Include="OpenTelemetry.Exporter.OpenTelemetryProtocol" Version="1.10.0" />
<PackageVersion Include="OpenTelemetry.Extensions.Hosting" Version="1.10.0" />
<PackageVersion Include="Polly.Core" Version="8.5.0" />
<PackageVersion Include="Polly" Version="8.5.0" />
<PackageVersion Include="Verify" Version="28.2.1" />
<PackageVersion Include="ZstdSharp.Port" Version="0.8.2" />
</ItemGroup>
<ItemGroup>
<PackageVersion Include="MemoryPack.Streaming" Version="1.21.1" />
<PackageVersion Include="MemoryPack" Version="1.21.1" />
<PackageVersion Include="MemoryPack.Streaming" Version="1.21.3" />
<PackageVersion Include="MemoryPack" Version="1.21.3" />
<PackageVersion Include="Spectre.Console" Version="0.49.1" />
<PackageVersion Include="JetBrains.Annotations" Version="2023.3.0" PrivateAssets="all" />
<PackageVersion Include="JetBrains.Annotations" Version="2024.3.0" PrivateAssets="all" />
<PackageVersion Include="Microsoft.SourceLink.GitHub" Version="8.0.0">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
Expand All @@ -64,24 +64,24 @@
<PackageVersion Include="Avalonia.Headless" Version="11.2.0" />
<PackageVersion Include="Avalonia.ReactiveUI" Version="11.2.0" />
<PackageVersion Include="Avalonia.Themes.Fluent" Version="11.2.0" />
<PackageVersion Include="Projektanker.Icons.Avalonia.MaterialDesign" Version="9.4.0" />
<PackageVersion Include="Projektanker.Icons.Avalonia.MaterialDesign" Version="9.4.1" />
<PackageVersion Include="Avalonia.Svg.Skia" Version="11.2.0" />
<PackageVersion Include="LiveChartsCore.SkiaSharpView.Avalonia" Version="2.0.0-rc2" />
<!-- keep this version in sync with Avalonia (https://github.com/whistyun/Markdown.Avalonia?tab=readme-ov-file#nuget) -->
<PackageVersion Include="Markdown.Avalonia.Tight" Version="11.0.3-a1" />
<PackageVersion Include="System.CommandLine" Version="2.0.0-beta4.22272.1" />
<PackageVersion Include="System.CommandLine.NamingConventionBinder" Version="2.0.0-beta4.22272.1" />
<PackageVersion Include="System.IdentityModel.Tokens.Jwt" Version="7.2.0" />
<PackageVersion Include="System.IO.Hashing" Version="8.0.0" />
<PackageVersion Include="System.IO.Hashing" Version="9.0.0" />
<PackageVersion Include="System.Linq.Async" Version="6.0.1" />
<PackageVersion Include="System.Reactive" Version="6.0.1" />
<PackageVersion Include="Microsoft.AspNetCore.WebUtilities" Version="8.0.8" />
<PackageVersion Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="8.0.1" />
<PackageVersion Include="Microsoft.Extensions.Hosting" Version="8.0.0" />
<PackageVersion Include="Microsoft.Extensions.Hosting.Abstractions" Version="8.0.0" />
<PackageVersion Include="Microsoft.Extensions.Logging" Version="8.0.0" />
<PackageVersion Include="Microsoft.Extensions.Logging.Abstractions" Version="8.0.1" />
<PackageVersion Include="Microsoft.Extensions.ObjectPool" Version="8.0.8" />
<PackageVersion Include="Microsoft.AspNetCore.WebUtilities" Version="9.0.0" />
<PackageVersion Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="9.0.0" />
<PackageVersion Include="Microsoft.Extensions.Hosting" Version="9.0.0" />
<PackageVersion Include="Microsoft.Extensions.Hosting.Abstractions" Version="9.0.0" />
<PackageVersion Include="Microsoft.Extensions.Logging" Version="9.0.0" />
<PackageVersion Include="Microsoft.Extensions.Logging.Abstractions" Version="9.0.0" />
<PackageVersion Include="Microsoft.Extensions.ObjectPool" Version="9.0.0" />
<PackageVersion Include="Microsoft.IO.RecyclableMemoryStream" Version="3.0.0" />
<PackageVersion Include="Microsoft.CodeAnalysis.Analyzers" Version="3.3.4" />
<PackageVersion Include="Microsoft.CodeAnalysis.CSharp" Version="4.8.0" />
Expand All @@ -93,27 +93,27 @@
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageVersion>
<PackageVersion Include="FluentAssertions" Version="6.12.0" />
<PackageVersion Include="FluentAssertions" Version="6.12.2" />
<PackageVersion Include="FluentAssertions.OneOf" Version="0.0.5" />
<PackageVersion Include="FluentAssertions.Analyzers" Version="0.31.0">
<PackageVersion Include="FluentAssertions.Analyzers" Version="0.34.1">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageVersion>
<PackageVersion Include="GitHubActionsTestLogger" Version="2.3.3">
<PackageVersion Include="GitHubActionsTestLogger" Version="2.4.1">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageVersion>
<PackageVersion Include="Microsoft.NET.Test.Sdk" Version="17.11.1" />
<PackageVersion Include="NSubstitute" Version="5.1.0" />
<PackageVersion Include="NSubstitute" Version="5.3.0" />
<PackageVersion Include="NSubstitute.Analyzers.CSharp" Version="1.0.17">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageVersion>
<PackageVersion Include="Verify.Xunit" Version="26.6.0" />
<PackageVersion Include="Verify.ImageMagick" Version="3.4.2" />
<PackageVersion Include="Verify.SourceGenerators" Version="2.2.0" />
<PackageVersion Include="Verify.Xunit" Version="28.2.1" />
<PackageVersion Include="Verify.ImageMagick" Version="3.6.0" />
<PackageVersion Include="Verify.SourceGenerators" Version="2.5.0" />
<PackageVersion Include="xunit" Version="2.9.2" />
<PackageVersion Include="Xunit.DependencyInjection" Version="9.4.0" />
<PackageVersion Include="Xunit.DependencyInjection" Version="9.6.0" />
<PackageVersion Include="Xunit.DependencyInjection.Logging" Version="9.0.0" />
<PackageVersion Include="Xunit.DependencyInjection.SkippableFact" Version="9.0.0" />
<PackageVersion Include="xunit.extensibility.core" Version="2.6.3" />
Expand All @@ -122,20 +122,20 @@
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageVersion>
<PackageVersion Include="Xunit.SkippableFact" Version="1.4.13" />
<PackageVersion Include="BenchmarkDotNet" Version="0.13.12" />
<PackageVersion Include="BitFaster.Caching" Version="2.5.0" />
<PackageVersion Include="CliWrap" Version="3.6.6" />
<PackageVersion Include="BenchmarkDotNet" Version="0.14.0" />
<PackageVersion Include="BitFaster.Caching" Version="2.5.2" />
<PackageVersion Include="CliWrap" Version="3.6.7" />
<PackageVersion Include="DynamicData" Version="9.0.4" />
<PackageVersion Include="GameFinder" Version="4.3.3" />
<PackageVersion Include="Humanizer" Version="2.14.1" />
<PackageVersion Include="ini-parser-netstandard" Version="2.5.2" />
<PackageVersion Include="Mutagen.Bethesda.Skyrim" Version="0.44.0" />
<PackageVersion Include="NexusMods.MnemonicDB.SourceGenerator" Version="0.9.95" />
<PackageVersion Include="NLog.Extensions.Logging" Version="5.3.11" />
<PackageVersion Include="NexusMods.MnemonicDB.SourceGenerator" Version="0.9.97" />
<PackageVersion Include="NLog.Extensions.Logging" Version="5.3.14" />
<PackageVersion Include="OneOf" Version="3.0.271" />
<PackageVersion Include="ReactiveUI.Fody" Version="19.5.41" />
<PackageVersion Include="Sewer56.BitStream" Version="1.3.0" />
<PackageVersion Include="Splat.Microsoft.Extensions.Logging" Version="15.2.22" />
<PackageVersion Include="TransparentValueObjects" Version="1.0.1" />
<PackageVersion Include="TransparentValueObjects" Version="1.0.2" />
</ItemGroup>
</Project>
2 changes: 1 addition & 1 deletion extern/SMAPI
Submodule SMAPI updated 719 files
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using NexusMods.Abstractions.MnemonicDB.Attributes;
using NexusMods.MnemonicDB.Abstractions.Attributes;
using NexusMods.MnemonicDB.Abstractions.Models;
namespace NexusMods.Abstractions.FileStore.Nx.Models;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
using JetBrains.Annotations;
using NexusMods.Abstractions.MnemonicDB.Attributes;
using NexusMods.MnemonicDB.Abstractions.Attributes;
using NexusMods.MnemonicDB.Abstractions.Models;

namespace NexusMods.Abstractions.Library.Models;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
using JetBrains.Annotations;
using NexusMods.Abstractions.MnemonicDB.Attributes;
using NexusMods.MnemonicDB.Abstractions.Attributes;
using NexusMods.MnemonicDB.Abstractions.Models;

namespace NexusMods.Abstractions.Library.Models;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -638,7 +638,7 @@ private async Task ActionIngestFromDisk(SyncActionGroupings<SyncTreeNode> groupi
{
// If we are swapping loadouts, then we need to synchronize the previous loadout first to ingest
// any changes, then we can apply the new loadout.
if (GameInstallMetadata.LastSyncedLoadout.TryGet(loadout.Installation, out var lastAppliedId) && lastAppliedId != loadout.Id)
if (GameInstallMetadata.LastSyncedLoadout.TryGetValue(loadout.Installation, out var lastAppliedId) && lastAppliedId != loadout.Id)
{
var prevLoadout = Loadout.Load(loadout.Db, lastAppliedId);
if (prevLoadout.IsValid())
Expand Down Expand Up @@ -1084,7 +1084,7 @@ public async Task DeactivateCurrentLoadout(GameInstallation installation)
public Optional<LoadoutId> GetCurrentlyActiveLoadout(GameInstallation installation)
{
var metadata = installation.GetMetadata(Connection);
if (!GameInstallMetadata.LastSyncedLoadout.TryGet(metadata, out var lastAppliedLoadout))
if (!GameInstallMetadata.LastSyncedLoadout.TryGetValue(metadata, out var lastAppliedLoadout))
return Optional<LoadoutId>.None;
return LoadoutId.From(lastAppliedLoadout);
}
Expand Down Expand Up @@ -1246,7 +1246,7 @@ public async Task DeleteLoadout(LoadoutId loadoutId, GarbageCollectorRunMode gcR
{
var loadout = Loadout.Load(Connection.Db, loadoutId);
var metadata = GameInstallMetadata.Load(Connection.Db, loadout.InstallationInstance.GameMetadataId);
if (GameInstallMetadata.LastSyncedLoadout.TryGet(metadata, out var lastAppliedLoadout) && lastAppliedLoadout == loadoutId.Value)
if (GameInstallMetadata.LastSyncedLoadout.TryGetValue(metadata, out var lastAppliedLoadout) && lastAppliedLoadout == loadoutId.Value)
{
await DeactivateCurrentLoadout(loadout.InstallationInstance);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ public static class DiskStateExtensions
/// </summary>
public static Optional<LoadoutId> LastSynchronizedLoadout(this GameInstallMetadata.ReadOnly metadata)
{
if (GameInstallMetadata.LastSyncedLoadout.TryGet(metadata, out var lastApplied))
if (GameInstallMetadata.LastSyncedLoadout.TryGetValue(metadata, out var lastApplied))
return LoadoutId.From(lastApplied);
return Optional<LoadoutId>.None;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ public static class LoadoutItemExtensions
yield return item;

// TODO: Fix this once we fix Attr.TryGet on value types
if (item.Contains(LoadoutItem.Parent) && LoadoutItem.Parent.TryGet(item, out var parent))
if (item.Contains(LoadoutItem.Parent) && LoadoutItem.Parent.TryGetValue(item, out var parent))
{
item = LoadoutItem.Load(item.Db, parent);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
using NexusMods.MnemonicDB.Abstractions.BuiltInEntities;
using NexusMods.MnemonicDB.Abstractions.Models;
using NexusMods.MnemonicDB.Abstractions.TxFunctions;
using EntityExtensions = NexusMods.Abstractions.MnemonicDB.Attributes.Extensions.EntityExtensions;
using ULongAttribute = NexusMods.Abstractions.MnemonicDB.Attributes.ULongAttribute;

namespace NexusMods.Abstractions.Loadouts;
Expand Down
Loading
Loading