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
added Akka.Analyzer reference #7031
added Akka.Analyzer reference #7031
Conversation
Was able to roll the changes back to the MSFT.EXT version range - turns out I had to upgrade to .NET 7.0 originally only because I have screwed up the NuGet package format for the Roslyn Analyzers themselves. Fixed that in https://github.com/akkadotnet/akka.analyzers/releases/tag/0.1.1 and was able to roll it back. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Detailed my changes - one last thing we need to do is to ensure that the core Akka package lists this analyzer package as a dependency. That will allow Akka.Analyzers to be consumed from end-user applications automatically, which is the entire point. This PR doesn't do that. I think I'll handle that one in a separate PR later.
@@ -56,6 +56,8 @@ EndProject | |||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Build", "Build", "{10C5B1E8-15B5-4EB3-81AE-1FC054FE1305}" | |||
ProjectSection(SolutionItems) = preProject | |||
..\build.fsx = ..\build.fsx | |||
Directory.Build.props = Directory.Build.props |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added these to solution file so they would be easier to edit.
@@ -69,6 +69,9 @@ If you want to see the [full set of changes made in Akka.NET v1.5.14, click here | |||
| 1 | 227 | 25 | Drew | | |||
| 1 | 1 | 1 | szaliszali |</PackageReleaseNotes> | |||
</PropertyGroup> | |||
<ItemGroup Label="Analyzers"> | |||
<PackageReference Include="Akka.Analyzers" Version="0.1.2" PrivateAssets="all" /> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Included this package as a private asset in Directory.Build.props
to the analysis would be applied solution-wide.
@@ -298,7 +298,9 @@ public override int GetNrOfInstances(ActorSystem system) | |||
/// <inheritdoc cref="RouterConfig.CreateRouterActor"/> | |||
public override ActorBase CreateRouterActor() | |||
{ | |||
#pragma warning disable AK1000 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Disabling AK1000
here because custom router types kind of fall outside the normal use cases for not new
-ing up actors
@@ -298,7 +298,9 @@ public override int GetNrOfInstances(ActorSystem system) | |||
/// <inheritdoc cref="RouterConfig.CreateRouterActor"/> | |||
public override ActorBase CreateRouterActor() | |||
{ | |||
#pragma warning disable AK1000 | |||
return new ClusterRouterPoolActor(Local.SupervisorStrategy, Settings); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Disabling AK1000
here because custom router types kind of fall outside the normal use cases for not new
-ing up actors
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Applying AK1001
fixes here (PipeTo
closures)
@@ -179,7 +179,7 @@ public async Task An_ActorRef_should_support_nested_ActorOfs() | |||
var a = Sys.ActorOf(Props.Create(() => new NestingActor(Sys))); | |||
a.Should().NotBeNull(); | |||
|
|||
Func<Task> t1 = async () => | |||
var t1 = async () => |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unrelated fix
@@ -29,7 +29,7 @@ | |||
<PackageReference Include="Microsoft.Bcl.AsyncInterfaces" Version="$(MicrosoftLibVersion)" /> | |||
<PackageReference Include="Nito.AsyncEx.Coordination" Version="5.1.2" /> | |||
<PackageReference Include="Nito.AsyncEx.Context" Version="5.1.2" /> | |||
<PackageReference Include="System.Linq.Async" Version="$(MicrosoftLibVersion)" /> | |||
<PackageReference Include="System.Linq.Async" Version="6.0.1" /> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
System.Linq.Async is actually part of Reactive Extensions (Rx) so it doesn't ship at the normal / same cadences as the rest of the MSFT libraries, so we shouldn't include it in the version range.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Applying AK1001
fixes here (PipeTo
closures)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Applying AK1001
fixes here (PipeTo
closures)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Applying AK1001
fixes here (PipeTo
closures)
And as far as website documentation goes: that is planned and will happen in subsequent PRs akkadotnet/akka.analyzers#6 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Changes
Adding https://github.com/akkadotnet/akka.analyzers support into Akka.NET itself.
Checklist
For significant changes, please ensure that the following have been completed (delete if not relevant):