Skip to content

Commit

Permalink
Remove NetFrameworkLibVersion support
Browse files Browse the repository at this point in the history
  • Loading branch information
huysentruitw committed Sep 4, 2020
1 parent ea979ad commit 4120a3a
Show file tree
Hide file tree
Showing 115 changed files with 385 additions and 1,755 deletions.
158 changes: 79 additions & 79 deletions build.fsx

Large diffs are not rendered by default.

1 change: 0 additions & 1 deletion src/common.props
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
<NetCoreTestVersion>netcoreapp3.1</NetCoreTestVersion>
<NetFrameworkTestVersion>net461</NetFrameworkTestVersion>
<NetStandardLibVersion>netstandard2.0</NetStandardLibVersion>
<NetFrameworkLibVersion>net452</NetFrameworkLibVersion>
<FluentAssertionsVersion>4.14.0</FluentAssertionsVersion>
<FsCheckVersion>2.14.3</FsCheckVersion>
<HoconVersion>2.0.3</HoconVersion>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,14 @@
<PropertyGroup>
<AssemblyTitle>Akka.Cluster.Metrics</AssemblyTitle>
<Description>
The member nodes of the cluster can collect system health metrics and publish that to other cluster nodes
The member nodes of the cluster can collect system health metrics and publish that to other cluster nodes
and to the registered subscribers on the system event bus with the help of Cluster Metrics Extension.
</Description>
<TargetFramework>$(NetStandardLibVersion)</TargetFramework>
<PackageTags>$(AkkaPackageTags);network;cluster;sharding</PackageTags>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
</PropertyGroup>

<ItemGroup Condition=" '$(TargetFramework)' == '$(NetFrameworkLibVersion)' ">
<Reference Include="System.Core" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\..\..\core\Akka.Cluster\Akka.Cluster.csproj" />
</ItemGroup>
Expand All @@ -34,4 +28,4 @@
<DefineConstants>$(DefineConstants);RELEASE</DefineConstants>
</PropertyGroup>

</Project>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,9 @@
using System.Linq;
using System.Threading.Tasks;
using Akka.Actor;
using System.Runtime.Serialization;
using Akka.Event;
using Akka.Persistence.Journal;
using Akka.Persistence;
using System.Threading;
using Akka.Util.Internal;
using Akka.Actor.Internal;

namespace Akka.Cluster.Sharding.Tests
Expand All @@ -42,18 +39,6 @@ public AsyncReplayTimeoutException(string message)
: base(message)
{
}

#if SERIALIZATION
/// <summary>
/// Initializes a new instance of the <see cref="AsyncReplayTimeoutException"/> class.
/// </summary>
/// <param name="info">The <see cref="SerializationInfo"/> that holds the serialized object data about the exception being thrown.</param>
/// <param name="context">The <see cref="StreamingContext"/> that contains contextual information about the source or destination.</param>
protected AsyncReplayTimeoutException(SerializationInfo info, StreamingContext context)
: base(info, context)
{
}
#endif
}

/// <summary>
Expand Down Expand Up @@ -148,8 +133,6 @@ protected override bool AroundReceive(Receive receive, object message)
return true;
}



/// <summary>
/// TBD
/// </summary>
Expand Down Expand Up @@ -396,6 +379,7 @@ public static async Task<T> AskEx<T>(this ICanTell self, Func<IActorRef, object>

return (T)await AskEx(self, messageFactory, provider, timeout, cancellationToken);
}

internal static IActorRefProvider ResolveProvider(ICanTell self)
{
if (InternalCurrentActorCellKeeper.Current != null)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,7 @@
//-----------------------------------------------------------------------

using System;
using System.Globalization;
using System.Linq;
using System.Runtime.Serialization;
using System.Threading;
using System.Threading.Tasks;
using Akka.Actor;
using Akka.Cluster.Tools.Singleton;
Expand All @@ -18,7 +15,6 @@
using Akka.TestKit;
using Akka.TestKit.TestActors;
using Akka.Util;
using FluentAssertions;
using Xunit;
using Xunit.Abstractions;
using static Akka.Cluster.Sharding.ShardRegion;
Expand All @@ -27,7 +23,6 @@ namespace Akka.Cluster.Sharding.Tests
{
public class ClusterShardingLeaseSpec : AkkaSpec
{

public static Config GetConfig()
{
return ConfigurationFactory.ParseString(@"
Expand Down Expand Up @@ -122,7 +117,6 @@ protected ClusterShardingLeaseSpec(Config config, bool rememberEntities, ITestOu
region = ClusterSharding.Get(Sys).ShardRegion(typeName);
}


private TestLease LeaseForShard(int shardId)
{
TestLease lease = null;
Expand Down Expand Up @@ -224,4 +218,4 @@ public DDataClusterShardingLeaseSpec(ITestOutputHelper helper)
{
}
}
}
}
7 changes: 0 additions & 7 deletions src/contrib/cluster/Akka.Cluster.Sharding.Tests/ShardSpec.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
//-----------------------------------------------------------------------

using System;
using System.Linq;
using System.Runtime.Serialization;
using System.Threading.Tasks;
using Akka.Actor;
Expand All @@ -17,9 +16,7 @@
using Akka.Event;
using Akka.TestKit;
using Akka.Util;
using Akka.Util.Extensions;
using Akka.Util.Internal;
using FluentAssertions;
using Xunit;
using Xunit.Abstractions;

Expand All @@ -41,8 +38,6 @@ protected override bool Receive(object message)
}
}



static ShardSpec()
{
SpecConfig = ConfigurationFactory.ParseString(@"
Expand Down Expand Up @@ -157,7 +152,6 @@ public ShardSpec(ITestOutputHelper helper) : base(SpecConfig, helper)

private string NextShardId() => $"{shardIds.GetAndIncrement()}";


[Fact]
public void Cluster_Shard_should_not_initialize_the_shard_until_the_lease_is_acquired()
{
Expand Down Expand Up @@ -187,7 +181,6 @@ public void Cluster_Shard_should_retry_if_the_lease_acquire_fails()
setup.Parent.ExpectMsg(new ShardInitialized(setup.ShardId));
}


[Fact]
public void Cluster_Shard_should_shutdown_if_lease_is_lost()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,22 +18,8 @@
<ProjectReference Include="..\Akka.DistributedData\Akka.DistributedData.csproj" />
</ItemGroup>

<ItemGroup Condition=" '$(TargetFramework)' == '$(NetFrameworkLibVersion)' ">
<Reference Include="System.Core" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
</ItemGroup>

<PropertyGroup Condition=" '$(TargetFramework)' == '$(NetFrameworkLibVersion)' ">
<DefineConstants>$(DefineConstants);SERIALIZATION</DefineConstants>
</PropertyGroup>

<PropertyGroup Condition=" '$(TargetFramework)' == '$(NetStandardLibVersion)' ">
<DefineConstants>$(DefineConstants);CORECLR</DefineConstants>
</PropertyGroup>

<PropertyGroup Condition=" '$(Configuration)' == 'Release' ">
<DefineConstants>$(DefineConstants);RELEASE</DefineConstants>
</PropertyGroup>

</Project>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@
using System;
using System.Collections.Generic;
using System.Collections.Immutable;
using System.IO;
using System.IO.Compression;
using System.Linq;
using System.Runtime.Serialization;
using Akka.Actor;
Expand Down Expand Up @@ -436,7 +434,7 @@ private static ShardRegionStats ShardRegionStatsFromBinary(byte[] b)
var p = Proto.Msg.ShardRegionStats.Parser.ParseFrom(b);
return new ShardRegionStats(p.Stats.ToImmutableDictionary());
}

// GetClusterShardingStats
private static Proto.Msg.GetClusterShardingStats GetClusterShardingStatsToProto(GetClusterShardingStats stats)
{
Expand All @@ -450,7 +448,7 @@ private static GetClusterShardingStats GetClusterShardingStatsFromBinary(byte[]
var p = Proto.Msg.GetClusterShardingStats.Parser.ParseFrom(b);
return new GetClusterShardingStats(p.Timeout.ToTimeSpan());
}

// ClusterShardingStats
private static Proto.Msg.ClusterShardingStats ClusterShardingStatsToProto(ClusterShardingStats stats)
{
Expand All @@ -473,7 +471,7 @@ private static ClusterShardingStats ClusterShardingStatsFromBinary(byte[] b)
}
return new ClusterShardingStats(dict.ToImmutableDictionary());
}

private static AddressData AddressToProto(Address address)
{
var message = new AddressData();
Expand All @@ -483,7 +481,7 @@ private static AddressData AddressToProto(Address address)
message.Protocol = address.Protocol;
return message;
}

private static Address AddressFrom(AddressData addressProto)
{
return new Address(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,22 +6,14 @@
//-----------------------------------------------------------------------

using System;
using System.Collections.Generic;
using System.Collections.Immutable;
using System.Diagnostics;
using System.Linq;
using System.Runtime.Serialization;
using System.Threading.Tasks;
using Akka.Actor;
using Akka.Cluster.Tools.Singleton;
using Akka.Configuration;
using Akka.Event;
using Akka.TestKit;
using Akka.TestKit.TestActors;
using Akka.Util.Internal;
using DotNetty.Common.Concurrency;
using FluentAssertions;
using Microsoft.Extensions.Logging;
using Xunit;

namespace Akka.Cluster.Tools.Tests.Singleton
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,8 @@
<ProjectReference Include="..\..\..\core\Akka.Coordination\Akka.Coordination.csproj" />
</ItemGroup>

<PropertyGroup Condition=" '$(TargetFramework)' == '$(NetFrameworkLibVersion)' ">
<DefineConstants>$(DefineConstants);SERIALIZATION</DefineConstants>
</PropertyGroup>

<PropertyGroup Condition=" '$(TargetFramework)' == '$(NetStandardLibVersion)' ">
<DefineConstants>$(DefineConstants);CORECLR</DefineConstants>
</PropertyGroup>

<PropertyGroup Condition=" '$(Configuration)' == 'Release' ">
<DefineConstants>$(DefineConstants);RELEASE</DefineConstants>
</PropertyGroup>

</Project>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
using Akka.Cluster.Tools.PublishSubscribe.Internal;
using Akka.Remote.Serialization;
using Akka.Serialization;
using Akka.Util;
using Google.Protobuf;
using AddressData = Akka.Remote.Serialization.Proto.Msg.AddressData;
using Status = Akka.Cluster.Tools.PublishSubscribe.Internal.Status;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,11 @@
using System.Collections.Generic;
using System.Collections.Immutable;
using System.Linq;
using System.Runtime.Serialization;
using System.Threading.Tasks;
using Akka.Actor;
using Akka.Configuration;
using Akka.Coordination;
using Akka.Event;
using Akka.Pattern;
using Akka.Remote;
using Akka.Util.Internal;
using static Akka.Cluster.ClusterEvent;
Expand Down Expand Up @@ -523,17 +521,6 @@ public sealed class ClusterSingletonManagerIsStuckException : AkkaException
/// </summary>
/// <param name="message">The message that describes the error.</param>
public ClusterSingletonManagerIsStuckException(string message) : base(message) { }

#if SERIALIZATION
/// <summary>
/// Initializes a new instance of the <see cref="ClusterSingletonManagerIsStuckException"/> class.
/// </summary>
/// <param name="info">The <see cref="SerializationInfo" /> that holds the serialized object data about the exception being thrown.</param>
/// <param name="context">The <see cref="StreamingContext" /> that contains contextual information about the source or destination.</param>
public ClusterSingletonManagerIsStuckException(SerializationInfo info, StreamingContext context) : base(info, context)
{
}
#endif
}

/// <summary>
Expand Down Expand Up @@ -741,7 +728,7 @@ private void AddRemoved(UniqueAddress node)
if(_removed.TryGetValue(node, out _))
{
_removed = _removed.SetItem(node, Deadline.Now + TimeSpan.FromMinutes(15.0));
}
}
else
{
_removed = _removed.Add(node, Deadline.Now + TimeSpan.FromMinutes(15.0));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
<TargetFrameworks>$(NetStandardLibVersion)</TargetFrameworks>
<PackageTags>$(AkkaPackageTags);network;cluster;crdt;replication;lightningdb;lmdb</PackageTags>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<NetStandardImplicitPackageVersion Condition=" '$(TargetFramework)' == 'netstandard1.6' ">1.6.1</NetStandardImplicitPackageVersion>
</PropertyGroup>

<ItemGroup>
Expand All @@ -23,4 +22,4 @@
<DefineConstants>$(DefineConstants);RELEASE</DefineConstants>
</PropertyGroup>

</Project>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,8 @@
<ProjectReference Include="..\..\..\core\Akka.Cluster\Akka.Cluster.csproj" />
</ItemGroup>

<PropertyGroup Condition=" '$(TargetFramework)' == '$(NetFrameworkLibVersion)' ">
<DefineConstants>$(DefineConstants);SERIALIZATION;CLONABLE</DefineConstants>
</PropertyGroup>

<PropertyGroup Condition=" '$(TargetFramework)' == '$(NetStandardLibVersion)' ">
<DefineConstants>$(DefineConstants);CORECLR</DefineConstants>
</PropertyGroup>

<PropertyGroup Condition=" '$(Configuration)' == 'Release' ">
<DefineConstants>$(DefineConstants);RELEASE</DefineConstants>
</PropertyGroup>

</Project>
</Project>
11 changes: 2 additions & 9 deletions src/contrib/cluster/Akka.DistributedData/Durable/Messages.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@

using System;
using System.Collections.Immutable;
using System.Runtime.Serialization;
using Akka.Actor;
using Akka.DistributedData.Internal;

Expand Down Expand Up @@ -48,10 +47,10 @@ public StoreReply(object successMessage, object failureMessage, IActorRef replyT

/// <summary>
/// Request to load all entries.
///
///
/// It must reply with 0 or more `LoadData` messages
/// followed by one `LoadAllCompleted` message to the `sender` (the `Replicator`).
///
///
/// If the `LoadAll` fails it can throw `LoadFailedException` and the `Replicator` supervisor
/// will stop itself and the durable store.
/// </summary>
Expand Down Expand Up @@ -90,12 +89,6 @@ public LoadFailedException(string message) : base(message)
public LoadFailedException(string message, Exception cause) : base(message, cause)
{
}

#if SERIALIZATION
public LoadFailedException(SerializationInfo info, StreamingContext context) : base(info, context)
{
}
#endif
}

public sealed class DurableDataEnvelope : IReplicatorMessage, IEquatable<DurableDataEnvelope>
Expand Down
Loading

0 comments on commit 4120a3a

Please sign in to comment.