From 35a94b33560eeb2c671f02744c4db0dddd4b212b Mon Sep 17 00:00:00 2001 From: Roger Johansson Date: Sun, 25 Sep 2022 19:45:28 +0200 Subject: [PATCH] Fixing warnings (#1771) --- .../AutoClusterBenchmark/AutoClusterBenchmark.csproj | 1 + benchmarks/ClusterBenchmark/ClusterBenchmark.csproj | 1 + benchmarks/GossipBenchmark/Messages/Messages.csproj | 1 + benchmarks/RemoteBenchmark/Messages/Messages.csproj | 1 + src/Proto.Actor/Proto.Actor.csproj | 1 + src/Proto.Cluster.CodeGen/Proto.Cluster.CodeGen.csproj | 2 +- src/Proto.Cluster/Proto.Cluster.csproj | 1 + src/Proto.Cluster/PubSub/PubSubDeliveryException.cs | 2 ++ src/Proto.Remote/Proto.Remote.csproj | 1 + tests/Proto.Actor.Tests/PropsTests.cs | 4 ++-- tests/Proto.Actor.Tests/Proto.Actor.Tests.csproj | 1 + .../Proto.Cluster.PartitionIdentity.Tests.csproj | 6 ++---- tests/Proto.Cluster.Tests/Proto.Cluster.Tests.csproj | 1 + .../Proto.OpenTelemetry.Tests.csproj | 8 ++------ .../Proto.Remote.Tests.Messages.csproj | 1 + 15 files changed, 19 insertions(+), 13 deletions(-) diff --git a/benchmarks/AutoClusterBenchmark/AutoClusterBenchmark.csproj b/benchmarks/AutoClusterBenchmark/AutoClusterBenchmark.csproj index a2c5ecf302..c4351e0133 100644 --- a/benchmarks/AutoClusterBenchmark/AutoClusterBenchmark.csproj +++ b/benchmarks/AutoClusterBenchmark/AutoClusterBenchmark.csproj @@ -1,6 +1,7 @@ + 8981 net6.0;net7.0 Exe 10 diff --git a/benchmarks/ClusterBenchmark/ClusterBenchmark.csproj b/benchmarks/ClusterBenchmark/ClusterBenchmark.csproj index cde3af1897..b9748f4d8c 100644 --- a/benchmarks/ClusterBenchmark/ClusterBenchmark.csproj +++ b/benchmarks/ClusterBenchmark/ClusterBenchmark.csproj @@ -1,6 +1,7 @@ + 8981 net6.0;net7.0 Exe 10 diff --git a/benchmarks/GossipBenchmark/Messages/Messages.csproj b/benchmarks/GossipBenchmark/Messages/Messages.csproj index 871079e6a6..34fcdc8d2d 100644 --- a/benchmarks/GossipBenchmark/Messages/Messages.csproj +++ b/benchmarks/GossipBenchmark/Messages/Messages.csproj @@ -1,6 +1,7 @@  + 8981 net6.0;net7.0 diff --git a/benchmarks/RemoteBenchmark/Messages/Messages.csproj b/benchmarks/RemoteBenchmark/Messages/Messages.csproj index ca8ba2da3f..fa1ad6b5bc 100644 --- a/benchmarks/RemoteBenchmark/Messages/Messages.csproj +++ b/benchmarks/RemoteBenchmark/Messages/Messages.csproj @@ -1,5 +1,6 @@  + 8981 net6.0;net7.0 diff --git a/src/Proto.Actor/Proto.Actor.csproj b/src/Proto.Actor/Proto.Actor.csproj index ee4a8aa15e..e9f7c12826 100644 --- a/src/Proto.Actor/Proto.Actor.csproj +++ b/src/Proto.Actor/Proto.Actor.csproj @@ -1,5 +1,6 @@  + 8981 Proto enable true diff --git a/src/Proto.Cluster.CodeGen/Proto.Cluster.CodeGen.csproj b/src/Proto.Cluster.CodeGen/Proto.Cluster.CodeGen.csproj index 3d194e84e0..4dcaf6cb5a 100644 --- a/src/Proto.Cluster.CodeGen/Proto.Cluster.CodeGen.csproj +++ b/src/Proto.Cluster.CodeGen/Proto.Cluster.CodeGen.csproj @@ -27,7 +27,7 @@ - + diff --git a/src/Proto.Cluster/Proto.Cluster.csproj b/src/Proto.Cluster/Proto.Cluster.csproj index 814f758ca2..c113ad5b5a 100644 --- a/src/Proto.Cluster/Proto.Cluster.csproj +++ b/src/Proto.Cluster/Proto.Cluster.csproj @@ -1,5 +1,6 @@  + 8981 true enable 10 diff --git a/src/Proto.Cluster/PubSub/PubSubDeliveryException.cs b/src/Proto.Cluster/PubSub/PubSubDeliveryException.cs index eb495ba38b..55c69c7eaf 100644 --- a/src/Proto.Cluster/PubSub/PubSubDeliveryException.cs +++ b/src/Proto.Cluster/PubSub/PubSubDeliveryException.cs @@ -8,7 +8,9 @@ namespace Proto.Cluster.PubSub; +#pragma warning disable RCS1194 public class PubSubDeliveryException : Exception +#pragma warning restore RCS1194 { public PubSubDeliveryException(string? message) : base(message) { diff --git a/src/Proto.Remote/Proto.Remote.csproj b/src/Proto.Remote/Proto.Remote.csproj index a3d3cd2f20..bd2a39f25f 100644 --- a/src/Proto.Remote/Proto.Remote.csproj +++ b/src/Proto.Remote/Proto.Remote.csproj @@ -1,5 +1,6 @@  + 8981 true enable 10 diff --git a/tests/Proto.Actor.Tests/PropsTests.cs b/tests/Proto.Actor.Tests/PropsTests.cs index 885c6217ca..0935d9bdfc 100644 --- a/tests/Proto.Actor.Tests/PropsTests.cs +++ b/tests/Proto.Actor.Tests/PropsTests.cs @@ -107,10 +107,10 @@ public void Given_Props_When_WithSpawner_Then_mutate_Spawner() PID Spawner(ActorSystem s, string id, Props p, PID? parent, Action callback) => new PID(); var props = new Props(); - var props2 = props.WithSpawner(Spawner); + var props2 = props.WithSpawner(Spawner!); Assert.NotEqual(props, props2); - Assert.Equal(Spawner, props2.Spawner); + Assert.Equal(Spawner!, props2.Spawner); Assert.Equal(props.Dispatcher, props2.Dispatcher); Assert.Equal(props.MailboxProducer, props2.MailboxProducer); diff --git a/tests/Proto.Actor.Tests/Proto.Actor.Tests.csproj b/tests/Proto.Actor.Tests/Proto.Actor.Tests.csproj index 6176f3d470..46f4369740 100644 --- a/tests/Proto.Actor.Tests/Proto.Actor.Tests.csproj +++ b/tests/Proto.Actor.Tests/Proto.Actor.Tests.csproj @@ -1,5 +1,6 @@  + 8981 Proto.Tests 10 Library diff --git a/tests/Proto.Cluster.PartitionIdentity.Tests/Proto.Cluster.PartitionIdentity.Tests.csproj b/tests/Proto.Cluster.PartitionIdentity.Tests/Proto.Cluster.PartitionIdentity.Tests.csproj index 2707c8c889..85f1a6a47e 100644 --- a/tests/Proto.Cluster.PartitionIdentity.Tests/Proto.Cluster.PartitionIdentity.Tests.csproj +++ b/tests/Proto.Cluster.PartitionIdentity.Tests/Proto.Cluster.PartitionIdentity.Tests.csproj @@ -1,6 +1,7 @@ + 8981 netcoreapp3.1;net6.0;net7.0 enable false @@ -12,10 +13,7 @@ all runtime; build; native; contentfiles; analyzers; buildtransitive - - runtime; build; native; contentfiles; analyzers; buildtransitive - all - + runtime; build; native; contentfiles; analyzers; buildtransitive all diff --git a/tests/Proto.Cluster.Tests/Proto.Cluster.Tests.csproj b/tests/Proto.Cluster.Tests/Proto.Cluster.Tests.csproj index 7cd2546741..43e6e7c8d0 100644 --- a/tests/Proto.Cluster.Tests/Proto.Cluster.Tests.csproj +++ b/tests/Proto.Cluster.Tests/Proto.Cluster.Tests.csproj @@ -1,5 +1,6 @@ + 8981 10 netcoreapp3.1;net6.0;net7.0 diff --git a/tests/Proto.OpenTelemetry.Tests/Proto.OpenTelemetry.Tests.csproj b/tests/Proto.OpenTelemetry.Tests/Proto.OpenTelemetry.Tests.csproj index 80fcd6469b..cd73dacd7c 100644 --- a/tests/Proto.OpenTelemetry.Tests/Proto.OpenTelemetry.Tests.csproj +++ b/tests/Proto.OpenTelemetry.Tests/Proto.OpenTelemetry.Tests.csproj @@ -1,6 +1,7 @@ + 8981 enable 10 false @@ -16,13 +17,8 @@ all runtime; build; native; contentfiles; analyzers; buildtransitive - - - - runtime; build; native; contentfiles; analyzers; buildtransitive - all - + runtime; build; native; contentfiles; analyzers; buildtransitive all diff --git a/tests/Proto.Remote.Tests.Messages/Proto.Remote.Tests.Messages.csproj b/tests/Proto.Remote.Tests.Messages/Proto.Remote.Tests.Messages.csproj index b0752d8b1e..a8cc94f0c2 100644 --- a/tests/Proto.Remote.Tests.Messages/Proto.Remote.Tests.Messages.csproj +++ b/tests/Proto.Remote.Tests.Messages/Proto.Remote.Tests.Messages.csproj @@ -1,5 +1,6 @@  + 8981 false 10 netcoreapp3.1;net6.0;net7.0