From 79d9b09e76791c4fa2bd488556e9815b7e5bbcc6 Mon Sep 17 00:00:00 2001 From: Gregorius Soedharmo Date: Tue, 14 Jan 2025 03:41:31 +0700 Subject: [PATCH 1/2] Bump MS.EXT, BCL, and Json to 8.0.X --- Directory.Build.props | 4 ++-- src/Akka.Cluster.Hosting.Tests/ClusterOptionsSpec.cs | 2 +- src/Akka.Cluster.Hosting.Tests/XUnitLogger.cs | 2 +- .../Akka.Hosting.TestKit.Tests.csproj | 2 +- src/Akka.Hosting.TestKit/Akka.Hosting.TestKit.csproj | 2 +- src/Akka.Hosting.TestKit/Internals/XUnitLogger.cs | 2 +- src/Akka.Hosting.Tests/Akka.Hosting.Tests.csproj | 4 ++-- src/Akka.Hosting.Tests/Logging/TestLogger.cs | 2 +- src/Akka.Hosting.Tests/XUnitLogger.cs | 2 +- src/Akka.Remote.Hosting.Tests/RemoteConfigurationSpecs.cs | 2 +- 10 files changed, 12 insertions(+), 12 deletions(-) diff --git a/Directory.Build.props b/Directory.Build.props index 34de6adb..4d24a155 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -26,8 +26,8 @@ 6.0.2 2.8.1 1.5.34 - [6.0.0,) - [6.0.10,) + [8.0.0,) + [8.0.*,) diff --git a/src/Akka.Cluster.Hosting.Tests/ClusterOptionsSpec.cs b/src/Akka.Cluster.Hosting.Tests/ClusterOptionsSpec.cs index 3a0926eb..8ab0f8b6 100644 --- a/src/Akka.Cluster.Hosting.Tests/ClusterOptionsSpec.cs +++ b/src/Akka.Cluster.Hosting.Tests/ClusterOptionsSpec.cs @@ -146,7 +146,7 @@ public void ClusterOptionsConfigurationTest() var jsonConfig = new ConfigurationBuilder().AddJsonStream(stream).Build(); var clusterOptions = jsonConfig.GetSection("Akka:ClusterOptions").Get(); - clusterOptions.SplitBrainResolver = jsonConfig.GetSection("Akka:KeepMajorityOption").Get(); + clusterOptions!.SplitBrainResolver = jsonConfig.GetSection("Akka:KeepMajorityOption").Get(); var builder = new AkkaConfigurationBuilder(new ServiceCollection(), "") .AddHocon(ConfigurationFactory.FromResource("Akka.Cluster.Configuration.Cluster.conf", typeof(Cluster).Assembly), HoconAddMode.Append) diff --git a/src/Akka.Cluster.Hosting.Tests/XUnitLogger.cs b/src/Akka.Cluster.Hosting.Tests/XUnitLogger.cs index b2cb0f1d..abb1da88 100644 --- a/src/Akka.Cluster.Hosting.Tests/XUnitLogger.cs +++ b/src/Akka.Cluster.Hosting.Tests/XUnitLogger.cs @@ -58,7 +58,7 @@ public bool IsEnabled(LogLevel logLevel) }; } - public IDisposable BeginScope(TState state) + public IDisposable BeginScope(TState state) where TState : notnull { throw new NotImplementedException(); } diff --git a/src/Akka.Hosting.TestKit.Tests/Akka.Hosting.TestKit.Tests.csproj b/src/Akka.Hosting.TestKit.Tests/Akka.Hosting.TestKit.Tests.csproj index a22c86ae..9fdee3f1 100644 --- a/src/Akka.Hosting.TestKit.Tests/Akka.Hosting.TestKit.Tests.csproj +++ b/src/Akka.Hosting.TestKit.Tests/Akka.Hosting.TestKit.Tests.csproj @@ -9,7 +9,7 @@ - + diff --git a/src/Akka.Hosting.TestKit/Akka.Hosting.TestKit.csproj b/src/Akka.Hosting.TestKit/Akka.Hosting.TestKit.csproj index 6abd5830..559b3ee9 100644 --- a/src/Akka.Hosting.TestKit/Akka.Hosting.TestKit.csproj +++ b/src/Akka.Hosting.TestKit/Akka.Hosting.TestKit.csproj @@ -10,7 +10,7 @@ - + diff --git a/src/Akka.Hosting.TestKit/Internals/XUnitLogger.cs b/src/Akka.Hosting.TestKit/Internals/XUnitLogger.cs index f5ce1496..ecd605bd 100644 --- a/src/Akka.Hosting.TestKit/Internals/XUnitLogger.cs +++ b/src/Akka.Hosting.TestKit/Internals/XUnitLogger.cs @@ -68,7 +68,7 @@ public bool IsEnabled(LogLevel logLevel) }; } - public IDisposable BeginScope(TState state) + public IDisposable BeginScope(TState state) where TState : notnull { throw new NotImplementedException(); } diff --git a/src/Akka.Hosting.Tests/Akka.Hosting.Tests.csproj b/src/Akka.Hosting.Tests/Akka.Hosting.Tests.csproj index bdd3853a..1850163d 100644 --- a/src/Akka.Hosting.Tests/Akka.Hosting.Tests.csproj +++ b/src/Akka.Hosting.Tests/Akka.Hosting.Tests.csproj @@ -7,8 +7,8 @@ - - + + diff --git a/src/Akka.Hosting.Tests/Logging/TestLogger.cs b/src/Akka.Hosting.Tests/Logging/TestLogger.cs index dcf3b53d..663134a7 100644 --- a/src/Akka.Hosting.Tests/Logging/TestLogger.cs +++ b/src/Akka.Hosting.Tests/Logging/TestLogger.cs @@ -76,7 +76,7 @@ public bool IsEnabled(LogLevel logLevel) return true; } - public IDisposable BeginScope(TState state) + public IDisposable BeginScope(TState state) where TState : notnull { return EmptyDisposable.Instance; } diff --git a/src/Akka.Hosting.Tests/XUnitLogger.cs b/src/Akka.Hosting.Tests/XUnitLogger.cs index f7283aed..ccd12266 100644 --- a/src/Akka.Hosting.Tests/XUnitLogger.cs +++ b/src/Akka.Hosting.Tests/XUnitLogger.cs @@ -58,7 +58,7 @@ public bool IsEnabled(LogLevel logLevel) }; } - public IDisposable BeginScope(TState state) + public IDisposable BeginScope(TState state) where TState : notnull { throw new NotImplementedException(); } diff --git a/src/Akka.Remote.Hosting.Tests/RemoteConfigurationSpecs.cs b/src/Akka.Remote.Hosting.Tests/RemoteConfigurationSpecs.cs index 20e2744e..124e05c4 100644 --- a/src/Akka.Remote.Hosting.Tests/RemoteConfigurationSpecs.cs +++ b/src/Akka.Remote.Hosting.Tests/RemoteConfigurationSpecs.cs @@ -498,7 +498,7 @@ public async Task ClusterOptionsConfigurationTest() { services.AddAkka("RemoteSys", (builder, provider) => { - builder.WithRemoting(remoteOptions); + builder.WithRemoting(remoteOptions!); }); }).Build(); From c55be2b506cd75c65682249aa738cc5c507f075b Mon Sep 17 00:00:00 2001 From: Gregorius Soedharmo Date: Tue, 14 Jan 2025 03:47:50 +0700 Subject: [PATCH 2/2] Update API approval list --- .../verify/CoreApiSpec.ApproveTestKit.verified.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Akka.Hosting.API.Tests/verify/CoreApiSpec.ApproveTestKit.verified.txt b/src/Akka.Hosting.API.Tests/verify/CoreApiSpec.ApproveTestKit.verified.txt index 98065745..6904b52c 100644 --- a/src/Akka.Hosting.API.Tests/verify/CoreApiSpec.ApproveTestKit.verified.txt +++ b/src/Akka.Hosting.API.Tests/verify/CoreApiSpec.ApproveTestKit.verified.txt @@ -9,7 +9,8 @@ namespace Akka.Hosting.TestKit.Internals public class XUnitLogger : Microsoft.Extensions.Logging.ILogger { public XUnitLogger(string category, Xunit.Abstractions.ITestOutputHelper helper, Microsoft.Extensions.Logging.LogLevel logLevel) { } - public System.IDisposable BeginScope(TState state) { } + public System.IDisposable BeginScope(TState state) + where TState : notnull { } public bool IsEnabled(Microsoft.Extensions.Logging.LogLevel logLevel) { } public void Log(Microsoft.Extensions.Logging.LogLevel logLevel, Microsoft.Extensions.Logging.EventId eventId, TState state, System.Exception? exception, System.Func formatter) { } }