Skip to content

use Polyfill #6693

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

Merged
merged 12 commits into from
May 3, 2023
1 change: 1 addition & 0 deletions src/core/Akka.API.Tests/Akka.API.Tests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
<PackageReference Include="xunit" Version="$(XunitVersion)" />
<PackageReference Include="xunit.runner.visualstudio" Version="$(XunitVersion)" />
<PackageReference Include="PublicApiGenerator" Version="9.3.0" />
<PackageReference Include="Verify.Xunit" Version="19.14.0" />
Copy link
Member

Choose a reason for hiding this comment

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

Duplicate reference - I'll remove it.

<PackageReference Include="Verify.Xunit" Version="19.14.1" />
<PackageReference Include="Verify.DiffPlex" Version="2.2.1" />
</ItemGroup>
Expand Down
17 changes: 5 additions & 12 deletions src/core/Akka.API.Tests/CoreAPISpec.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@
// </copyright>
//-----------------------------------------------------------------------

using System;
using System.IO;
using System.Reflection;
using System.Threading.Tasks;
using Akka.Actor;
using Akka.Cluster;
Expand All @@ -20,26 +23,16 @@
using Akka.Persistence.Query.Sql;
using Akka.Persistence.Sql.Common.Journal;
using Akka.Streams;
using VerifyTests;
using VerifyXunit;

namespace Akka.API.Tests
{
[UsesVerify]
public class CoreAPISpec
{
static CoreAPISpec()
{
VerifierSettings.ScrubLinesContaining("[assembly: ReleaseDateAttribute(");
VerifyDiffPlex.Initialize();
}

static Task VerifyAssembly<T>()
{
var settings = new VerifySettings() { };
settings.UniqueForRuntime();
settings.UseDirectory("verify");
return Verifier.Verify(GeneratePublicApi(typeof(T).Assembly), settings);
return Verifier.Verify(GeneratePublicApi(typeof(T).Assembly));
}

[Fact]
Expand Down Expand Up @@ -77,7 +70,7 @@ public Task ApprovePersistenceSqlCommonQuery()
{
return VerifyAssembly<SqlReadJournal>();
}

[Fact]
public Task ApprovePersistenceInMemoryQuery()
{
Expand Down
22 changes: 22 additions & 0 deletions src/core/Akka.API.Tests/ModuleInit.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
//-----------------------------------------------------------------------
// <copyright file="ModuleInit.cs" company="Akka.NET Project">
// Copyright (C) 2009-2023 Lightbend Inc. <http://www.lightbend.com>
// Copyright (C) 2013-2023 .NET Foundation <https://github.com/akkadotnet/akka.net>
// </copyright>
//-----------------------------------------------------------------------

using System.Runtime.CompilerServices;
using VerifyTests;
using VerifyXunit;

public static class ModuleInit
{
[ModuleInitializer]
public static void Init()
Copy link
Member

Choose a reason for hiding this comment

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

LGTM

{
VerifierSettings.ScrubLinesContaining("[assembly: ReleaseDateAttribute(");
Verifier.UseProjectRelativeDirectory("verify");
VerifierSettings.UniqueForRuntime();
VerifierSettings.InitializePlugins();
}
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
[assembly: System.Reflection.AssemblyMetadataAttribute("RepositoryUrl", "https://github.com/akkadotnet/akka.net")]
[assembly: System.Runtime.CompilerServices.InternalsVisibleToAttribute("Akka.API.Tests")]
[assembly: System.Runtime.CompilerServices.InternalsVisibleToAttribute("Akka.Benchmarks")]
[assembly: System.Runtime.CompilerServices.InternalsVisibleToAttribute("Akka.Cluster")]
[assembly: System.Runtime.CompilerServices.InternalsVisibleToAttribute("Akka.Cluster.Sharding")]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
[assembly: System.Reflection.AssemblyMetadataAttribute("RepositoryUrl", "https://github.com/akkadotnet/akka.net")]
[assembly: System.Runtime.CompilerServices.InternalsVisibleToAttribute("Akka.API.Tests")]
[assembly: System.Runtime.CompilerServices.InternalsVisibleToAttribute("Akka.Benchmarks")]
[assembly: System.Runtime.CompilerServices.InternalsVisibleToAttribute("Akka.Cluster")]
[assembly: System.Runtime.CompilerServices.InternalsVisibleToAttribute("Akka.Cluster.Sharding")]
Expand Down
1 change: 1 addition & 0 deletions src/core/Akka/Akka.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Polyfill" Version="1.21.0" PrivateAssets="all" />
Copy link
Member

Choose a reason for hiding this comment

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

LGTM

<PackageReference Include="Microsoft.Extensions.ObjectPool" Version="7.0.5" />
<PackageReference Include="Newtonsoft.Json" Version="$(NewtonsoftJsonVersion)" />
<PackageReference Include="System.Reflection.Emit" Version="4.7.0" />
Expand Down
1 change: 1 addition & 0 deletions src/core/Akka/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@

[assembly: Guid("1a5cab08-b032-49ca-8db3-9428c5a9db14")]
[assembly: InternalsVisibleTo("Akka.Tests")]
[assembly: InternalsVisibleTo("Akka.API.Tests")]
[assembly: InternalsVisibleTo("Akka.Tests.Performance")]
[assembly: InternalsVisibleTo("Akka.TestKit")]
[assembly: InternalsVisibleTo("Akka.TestKit.Tests")]
Expand Down