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

Remove restrictions required by netstandard 1.x but available in 2.0 #3790

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
a43207d
Enable features that are now in the netstandard2.0 library set (but w…
transmax-open-source May 16, 2019
98680a2
Correct version numbers for Clean target #3668
transmax-open-source May 16, 2019
0e52d7a
Merge branch 'dev' into remove-1x-netcore-restriction
heatonmatthew May 17, 2019
5d6c75b
Merge branch 'dev' into remove-1x-netcore-restriction
Aaronontheweb May 21, 2019
587a396
Merge branch 'dev' into remove-1x-netcore-restriction
Aaronontheweb May 23, 2019
48929a5
Merge branch 'dev' into remove-1x-netcore-restriction
Aaronontheweb Jun 4, 2019
b25daa0
Merge branch 'dev' into remove-1x-netcore-restriction
heatonmatthew Jun 9, 2019
bf43ec0
Merge branch 'dev' into remove-1x-netcore-restriction
Aaronontheweb Jul 16, 2019
8a2abe8
Merge branch 'dev' into remove-1x-netcore-restriction
Arkatufus Apr 1, 2021
23a583e
Post-merge cleanup
Arkatufus Apr 1, 2021
bd0bd38
Merge branch 'dev' into remove-1x-netcore-restriction
Arkatufus Apr 15, 2021
47a8530
csproj and code cleanup
Arkatufus Apr 16, 2021
71e1b68
Fix Akka.Persistence.TCK outdated journal spec, original assumption w…
Arkatufus Apr 16, 2021
72d6823
Avoid hardwiring names, spec name isn't hardwired anymore.
Arkatufus Apr 16, 2021
d0008b1
Merge branch 'dev' into remove-1x-netcore-restriction
Arkatufus Apr 16, 2021
b7c7611
Merge branch 'dev' into remove-1x-netcore-restriction
Aaronontheweb Apr 16, 2021
0740894
Add serialization support to exceptions (at least for those in the Ak…
Arkatufus Apr 16, 2021
f6a5df8
Add support to wrap exceptions in custom fields for ExceptionSupport
Arkatufus Apr 16, 2021
c8c4d0b
Add spec for ExceptionSupport
Arkatufus Apr 16, 2021
5b584c1
Merge branch 'remove-1x-netcore-restriction' of github.com:heatonmatt…
Arkatufus Apr 16, 2021
3dfd0c0
Update APIApproval list
Arkatufus Apr 16, 2021
6422da1
Merge branch 'dev' into remove-1x-netcore-restriction
Arkatufus Apr 19, 2021
c34b2a6
Fix flaky spec
Arkatufus Apr 20, 2021
d0b5302
Merge branch 'dev' into remove-1x-netcore-restriction
Arkatufus Apr 22, 2021
5bb8450
Merge branch 'dev' into remove-1x-netcore-restriction
Arkatufus Apr 30, 2021
e53cc2c
Merge branch 'dev' into remove-1x-netcore-restriction
Aaronontheweb May 3, 2021
6e33872
Merge branch 'dev' into remove-1x-netcore-restriction
Arkatufus May 4, 2021
bd7e10c
Merge branch 'dev' into remove-1x-netcore-restriction
Arkatufus May 5, 2021
68cc15b
Revert "Fix flaky spec"
Arkatufus May 5, 2021
0956e76
Fix flaky tests
Arkatufus May 5, 2021
0a196e0
Merge branch 'dev' into remove-1x-netcore-restriction
Aaronontheweb May 6, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,6 @@
<Service Include="{82a7f48d-3b50-4b1e-b82e-3ada8210c358}" />
</ItemGroup>

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

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

<PropertyGroup Condition=" '$(Configuration)' == 'Release' ">
<DefineConstants>$(DefineConstants);RELEASE</DefineConstants>
</PropertyGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ public AsyncReplayTimeoutException(string message)
{
}

#if SERIALIZATION
Copy link
Member

Choose a reason for hiding this comment

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

I can't tell you how thrilled I am to get rid of this crap @heatonmatthew - so far, according to the CI system, the compiler and the test runtimes seem pretty happy with these changes so I don't have much to add on each individual change here.

/// <summary>
/// Initializes a new instance of the <see cref="AsyncReplayTimeoutException"/> class.
/// </summary>
Expand All @@ -53,7 +52,6 @@ protected AsyncReplayTimeoutException(SerializationInfo info, StreamingContext c
: base(info, context)
{
}
#endif
}

/// <summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,6 @@
<Reference Include="System.Xml.Linq" />
</ItemGroup>

<PropertyGroup Condition=" '$(TargetFramework)' == '$(NetFrameworkTestVersion)' ">
<DefineConstants>$(DefineConstants);SERIALIZABLE</DefineConstants>
</PropertyGroup>

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

<PropertyGroup Condition=" '$(Configuration)' == 'Release' ">
<DefineConstants>$(DefineConstants);RELEASE</DefineConstants>
</PropertyGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,6 @@
<ProjectReference Include="..\Akka.DistributedData\Akka.DistributedData.csproj" />
</ItemGroup>

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

<PropertyGroup Condition=" '$(Configuration)' == 'Release' ">
<DefineConstants>$(DefineConstants);RELEASE</DefineConstants>
</PropertyGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,6 @@
<PackageReference Include="FluentAssertions" Version="$(FluentAssertionsVersion)" />
</ItemGroup>

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

<PropertyGroup Condition=" '$(Configuration)' == 'Release' ">
<DefineConstants>$(DefineConstants);RELEASE</DefineConstants>
</PropertyGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,6 @@
<PackageReference Include="FluentAssertions" Version="$(FluentAssertionsVersion)" />
</ItemGroup>

<PropertyGroup Condition=" '$(TargetFramework)' == '$(NetFrameworkTestVersion)' ">
<DefineConstants>$(DefineConstants);SERIALIZABLE</DefineConstants>
</PropertyGroup>

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

<PropertyGroup Condition=" '$(Configuration)' == 'Release' ">
<DefineConstants>$(DefineConstants);RELEASE</DefineConstants>
</PropertyGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ protected TestException(SerializationInfo info, StreamingContext context)

private ClusterSingletonManagerSettings NextSettings() => ClusterSingletonManagerSettings.Create(Sys).WithSingletonName(NextName());

private string LeaseNameFor(ClusterSingletonManagerSettings settings) => $"AkkaSpec-singleton-akka://AkkaSpec/user/{settings.SingletonName}";
private string LeaseNameFor(ClusterSingletonManagerSettings settings) => $"{Sys.Name}-singleton-akka://{Sys.Name}/user/{settings.SingletonName}";

[Fact]
public void ClusterSingleton_with_lease_should_not_start_until_lease_is_available()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,6 @@
<ProjectReference Include="..\..\..\core\Akka.Coordination\Akka.Coordination.csproj" />
</ItemGroup>

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

<PropertyGroup Condition=" '$(Configuration)' == 'Release' ">
<DefineConstants>$(DefineConstants);RELEASE</DefineConstants>
</PropertyGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -525,7 +525,6 @@ public sealed class ClusterSingletonManagerIsStuckException : AkkaException
/// <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>
Expand All @@ -534,7 +533,6 @@ public sealed class ClusterSingletonManagerIsStuckException : AkkaException
public ClusterSingletonManagerIsStuckException(SerializationInfo info, StreamingContext context) : base(info, context)
{
}
#endif
}

/// <summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,6 @@
<Service Include="{82a7f48d-3b50-4b1e-b82e-3ada8210c358}" />
</ItemGroup>

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

<PropertyGroup Condition=" '$(Configuration)' == 'Release' ">
<DefineConstants>$(DefineConstants);RELEASE</DefineConstants>
</PropertyGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,6 @@
<PackageReference Include="FluentAssertions" Version="$(FluentAssertionsVersion)" />
</ItemGroup>

<PropertyGroup Condition=" '$(TargetFramework)' == '$(NetFrameworkTestVersion)' ">
<DefineConstants>$(DefineConstants);SERIALIZABLE</DefineConstants>
</PropertyGroup>

<PropertyGroup Condition=" '$(Configuration)' == 'Release' ">
<DefineConstants>$(DefineConstants);RELEASE</DefineConstants>
</PropertyGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@
<ProjectReference Include="..\..\..\core\Akka.Cluster\Akka.Cluster.csproj" />
</ItemGroup>

<PropertyGroup Condition=" '$(TargetFramework)' == '$(NetStandardLibVersion)' ">
<DefineConstants>$(DefineConstants);CORECLR</DefineConstants>
</PropertyGroup>
<ItemGroup>
Arkatufus marked this conversation as resolved.
Show resolved Hide resolved
<PackageReference Include="Hyperion" Version="$(HyperionVersion)" />
</ItemGroup>

<PropertyGroup Condition=" '$(Configuration)' == 'Release' ">
<DefineConstants>$(DefineConstants);RELEASE</DefineConstants>
Expand Down
2 changes: 0 additions & 2 deletions src/contrib/cluster/Akka.DistributedData/Durable/Messages.cs
Original file line number Diff line number Diff line change
Expand Up @@ -91,11 +91,9 @@ public LoadFailedException(string message, Exception cause) : base(message, caus
{
}

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

public sealed class DurableDataEnvelope : IReplicatorMessage, IEquatable<DurableDataEnvelope>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -997,6 +997,7 @@ public override bool Equals(object obj)
/// <summary>
/// TBD
/// </summary>
[Serializable]
public class DataDeletedException : Exception
{
/// <summary>
Expand All @@ -1006,6 +1007,13 @@ public class DataDeletedException : Exception
public DataDeletedException(string message) : base(message)
{
}

/// <summary>
/// Initializes a new instance of the <see cref="DataDeletedException"/> 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 DataDeletedException(SerializationInfo info, StreamingContext context) : base(info, context) { }
}

public interface IReplicatorMessage { }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,11 @@
<ProjectReference Include="..\..\..\core\Akka\Akka.csproj" />
</ItemGroup>

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

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

<ItemGroup Condition=" '$(TargetFramework)' == '$(NetStandardLibVersion)' ">
<ItemGroup>
<PackageReference Include="Microsoft.Extensions.DependencyModel" Version="5.0.0" />
</ItemGroup>

Expand Down
24 changes: 0 additions & 24 deletions src/contrib/dependencyinjection/Akka.DI.Core/Extensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,6 @@
using System.Reflection;
using Akka.Actor;

#if CORECLR
using Microsoft.Extensions.DependencyModel;
#endif
namespace Akka.DI.Core
{
/// <summary>
Expand Down Expand Up @@ -78,28 +75,7 @@ public static Type GetTypeValue(this string typeName)
/// <returns>The list of loaded assemblies</returns>
private static IEnumerable<Assembly> GetLoadedAssemblies()
{
#if APPDOMAIN
return AppDomain.CurrentDomain.GetAssemblies();
#elif CORECLR
var assemblies = new List<Assembly>();
var dependencies = DependencyContext.Default.RuntimeLibraries;
foreach (var library in dependencies)
{
try
{
var assembly = Assembly.Load(new AssemblyName(library.Name));
assemblies.Add(assembly);
}
catch
{
//do nothing can't if can't load assembly
}
}
return assemblies;
#else
#warning Method not implemented
throw new NotImplementedException();
#endif
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,6 @@
<ProjectReference Include="..\..\testkits\Akka.TestKit.Xunit2\Akka.TestKit.Xunit2.csproj" />
</ItemGroup>

<PropertyGroup Condition=" '$(TargetFramework)' == 'net452' ">
<DefineConstants>$(DefineConstants);APPDOMAIN</DefineConstants>
</PropertyGroup>

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

<PropertyGroup Condition=" '$(Configuration)' == 'Release' ">
<DefineConstants>$(DefineConstants);RELEASE</DefineConstants>
</PropertyGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,6 @@
<ProjectReference Include="..\Akka.Persistence.Sql.Common\Akka.Persistence.Sql.Common.csproj" />
</ItemGroup>

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

<PropertyGroup Condition=" '$(Configuration)' == 'Release' ">
<DefineConstants>$(DefineConstants);RELEASE</DefineConstants>
</PropertyGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,10 @@
<ProjectReference Include="..\..\..\core\Akka.Persistence\Akka.Persistence.csproj" />
</ItemGroup>

<ItemGroup Condition=" '$(TargetFramework)' == '$(NetStandardLibVersion)' ">
<ItemGroup>
<PackageReference Include="System.Data.Common" Version="4.3.0" />
</ItemGroup>

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

<PropertyGroup Condition=" '$(Configuration)' == 'Release' ">
<DefineConstants>$(DefineConstants);RELEASE</DefineConstants>
</PropertyGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
using System.Diagnostics;
using System.Linq;
using System.Runtime.CompilerServices;
using System.Runtime.Serialization;
using System.Text;
using System.Threading.Tasks;
using Akka.Actor;
Expand Down Expand Up @@ -257,14 +258,12 @@ protected BatchingSqlJournalSetup(Config config, QueryConfiguration namingConven
throw ConfigurationException.NullOrEmptyConfig<BatchingSqlJournalSetup>();

var connectionString = config.GetString("connection-string", null);
#if CONFIGURATION
if (string.IsNullOrWhiteSpace(connectionString))
{
connectionString = System.Configuration.ConfigurationManager
.ConnectionStrings[config.GetString("connection-string-name", "DefaultConnection")]?
.ConnectionString;
}
#endif

if (string.IsNullOrWhiteSpace(connectionString))
throw new ConfigurationException("No connection string for Sql Event Journal was specified");
Expand Down Expand Up @@ -1524,5 +1523,15 @@ public class JournalBufferOverflowException : AkkaException
+ " change it.")
{
}

/// <summary>
/// Initializes a new instance of the <see cref="JournalBufferOverflowException" /> 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 JournalBufferOverflowException(SerializationInfo info, StreamingContext context)
: base(info, context)
{
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -506,12 +506,10 @@ protected virtual string GetConnectionString()
{
var connectionString = _settings.ConnectionString;

#if CONFIGURATION
if (string.IsNullOrEmpty(connectionString))
{
connectionString = System.Configuration.ConfigurationManager.ConnectionStrings[_settings.ConnectionStringName].ConnectionString;
}
#endif

return connectionString;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -149,12 +149,10 @@ protected virtual string GetConnectionString()
{
var connectionString = _settings.ConnectionString;

#if CONFIGURATION
if (string.IsNullOrEmpty(connectionString))
{
connectionString = System.Configuration.ConfigurationManager.ConnectionStrings[_settings.ConnectionStringName].ConnectionString;
}
#endif

return connectionString;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,6 @@
<PackageReference Include="FluentAssertions" Version="$(FluentAssertionsVersion)" />
</ItemGroup>

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

<PropertyGroup Condition=" '$(Configuration)' == 'Release' ">
<DefineConstants>$(DefineConstants);RELEASE</DefineConstants>
</PropertyGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,6 @@
<PackageReference Include="FluentAssertions" Version="$(FluentAssertionsVersion)" />
</ItemGroup>

<PropertyGroup Condition=" '$(TargetFramework)' == '$(NetFrameworkTestVersion)' ">
<DefineConstants>$(DefineConstants);SERIALIZABLE</DefineConstants>
</PropertyGroup>

<PropertyGroup Condition=" '$(Configuration)' == 'Release' ">
<DefineConstants>$(DefineConstants);RELEASE</DefineConstants>
</PropertyGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,14 @@
<PackageReference Include="Hyperion" Version="$(HyperionVersion)" />
<ProjectReference Include="..\..\..\core\Akka\Akka.csproj" />
</ItemGroup>
<ItemGroup Condition=" '$(TargetFramework)' == '$(NetStandardLibVersion)' ">
Arkatufus marked this conversation as resolved.
Show resolved Hide resolved
<PackageReference Include="System.Reflection" Version="4.3.0" />
<PackageReference Include="System.Runtime" Version="4.3.1" />
</ItemGroup>
<ItemGroup Condition=" '$(TargetFramework)' == '$(NetFrameworkLibVersion)' ">
Arkatufus marked this conversation as resolved.
Show resolved Hide resolved
<Reference Include="System" />
<Reference Include="Microsoft.CSharp" />
</ItemGroup>

<PropertyGroup Condition=" '$(Configuration)' == 'Release' ">
<DefineConstants>$(DefineConstants);RELEASE</DefineConstants>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,9 @@
<ItemGroup>
<ProjectReference Include="..\..\..\core\Akka.Tests.Shared.Internals\Akka.Tests.Shared.Internals.csproj" />
</ItemGroup>

<PropertyGroup Condition=" '$(Configuration)' == 'Release' ">
Arkatufus marked this conversation as resolved.
Show resolved Hide resolved
<DefineConstants>$(DefineConstants);RELEASE</DefineConstants>
</PropertyGroup>

</Project>
Loading