Skip to content

Commit

Permalink
Remove clusterinit (#1763)
Browse files Browse the repository at this point in the history
* remove cluster init
* cluster tweaks
  • Loading branch information
rogeralsing authored Sep 25, 2022
1 parent c9ef833 commit bf852ec
Show file tree
Hide file tree
Showing 9 changed files with 40 additions and 49 deletions.
6 changes: 6 additions & 0 deletions benchmarks/GossipBenchmark/Messages/ClusterInit.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
namespace ClusterHelloWorld.Messages;

public class ClusterInit
{

}
6 changes: 6 additions & 0 deletions examples/ClusterGrainHelloWorld/Messages/ClusterInit.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
namespace ClusterHelloWorld.Messages;

public class ClusterInit
{

}
12 changes: 6 additions & 6 deletions examples/ClusterGrainHelloWorld/Messages/Messages.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,18 @@
<TargetFramework>net6.0</TargetFramework>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Google.Protobuf" Version="3.21.1"/>
<PackageReference Include="Grpc.Tools" Version="2.46.3" PrivateAssets="All"/>
<PackageReference Include="Proto.Cluster.CodeGen" Version="0.30.0"/>
<PackageReference Include="Google.Protobuf" Version="3.21.1" />
<PackageReference Include="Grpc.Tools" Version="2.46.3" PrivateAssets="All" />
<PackageReference Include="Proto.Cluster.CodeGen" Version="0.30.0" />
</ItemGroup>
<ItemGroup>
<Protobuf Include="Protos.proto"/>
<Protobuf Include="Protos.proto" />
</ItemGroup>
<ItemGroup>
<ProtoGrain Include="Protos.proto"/>
<ProtoGrain Include="Protos.proto" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\..\src\Proto.Cluster\Proto.Cluster.csproj"/>
<ProjectReference Include="..\..\..\src\Proto.Cluster\Proto.Cluster.csproj" />
</ItemGroup>

</Project>
6 changes: 6 additions & 0 deletions examples/ClusterPubSub/ClusterInit.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
namespace ClusterPubSub;

public class ClusterInit
{

}
12 changes: 6 additions & 6 deletions examples/ClusterPubSub/ClusterPubSub.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -6,22 +6,22 @@
</PropertyGroup>

<ItemGroup>
<ProjectReference Include="..\..\src\Proto.Cluster.TestProvider\Proto.Cluster.TestProvider.csproj"/>
<ProjectReference Include="..\..\src\Proto.Cluster.TestProvider\Proto.Cluster.TestProvider.csproj" />
</ItemGroup>

<ItemGroup>
<PackageReference Include="Google.Protobuf" Version="3.21.1"/>
<PackageReference Include="Google.Protobuf" Version="3.21.1" />
<PackageReference Include="Grpc.Tools" Version="2.46.3">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Microsoft.Extensions.Logging.Console" Version="6.0.0"/>
<PackageReference Include="Proto.Cluster.CodeGen" Version="0.31.0"/>
<PackageReference Include="Microsoft.Extensions.Logging.Console" Version="6.0.0" />
<PackageReference Include="Proto.Cluster.CodeGen" Version="0.31.0" />
</ItemGroup>

<ItemGroup>
<Protobuf Include="protos.proto" GrpcServices="none"/>
<ProtoGrain Include="protos.proto"/>
<Protobuf Include="protos.proto" GrpcServices="none" />
<ProtoGrain Include="protos.proto" />
</ItemGroup>

</Project>
2 changes: 1 addition & 1 deletion src/Proto.Cluster.CodeGen/CodeGenerator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ static string RemovePackageName(string type)
}

static string GetKind(string? packageName, string serviceName) =>
string.IsNullOrEmpty(packageName) ? serviceName : $"{packageName}/{serviceName}";
string.IsNullOrEmpty(packageName) ? serviceName : $"{packageName}.{serviceName}";
}

#region UnusedMethods
Expand Down
27 changes: 0 additions & 27 deletions src/Proto.Cluster/Grain/ClusterInit.cs

This file was deleted.

16 changes: 8 additions & 8 deletions src/Proto.Cluster/Proto.Cluster.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -6,21 +6,21 @@
<TargetFrameworks>netcoreapp3.1;net6.0;net7.0</TargetFrameworks>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Grpc.Tools" Version="2.46.3" PrivateAssets="All"/>
<PackageReference Include="Grpc.Tools" Version="2.46.3" PrivateAssets="All" />
<PackageReference Include="Roslynator.Analyzers" Version="4.0.2">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Update="Microsoft.SourceLink.GitHub" Version="1.1.1"/>
<PackageReference Update="Microsoft.SourceLink.GitHub" Version="1.1.1" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Proto.Remote\Proto.Remote.csproj"/>
<ProjectReference Include="..\Proto.Remote\Proto.Remote.csproj" />
</ItemGroup>
<ItemGroup>
<Protobuf Include="SeedContracts.proto" GrpcServices="Server" AdditionalImportDirs=".; ..\..\src"/>
<Protobuf Include="ClusterContracts.proto" GrpcServices="Server" AdditionalImportDirs=".; ..\..\src"/>
<Protobuf Include="GossipContracts.proto" GrpcServices="Server" AdditionalImportDirs=".; ..\..\src"/>
<Protobuf Include="PubSubContracts.proto" GrpcServices="Server" AdditionalImportDirs=".; ..\..\src"/>
<Protobuf Include="GrainContracts.proto" GrpcServices="Server" AdditionalImportDirs=".; ..\..\src"/>
<Protobuf Include="SeedContracts.proto" GrpcServices="Server" AdditionalImportDirs=".; ..\..\src" />
<Protobuf Include="ClusterContracts.proto" GrpcServices="Server" AdditionalImportDirs=".; ..\..\src" />
<Protobuf Include="GossipContracts.proto" GrpcServices="Server" AdditionalImportDirs=".; ..\..\src" />
<Protobuf Include="PubSubContracts.proto" GrpcServices="Server" AdditionalImportDirs=".; ..\..\src" />
<Protobuf Include="GrainContracts.proto" GrpcServices="Server" AdditionalImportDirs=".; ..\..\src" />
</ItemGroup>
</Project>
2 changes: 1 addition & 1 deletion tests/Proto.Cluster.CodeGen.Tests/ExpectedOutput.cs
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,7 @@ public TestGrainClient(Cluster cluster, string id)

public class TestGrainActor : IActor
{
public const string Kind = "Foo/TestGrain";
public const string Kind = "Foo.TestGrain";

private TestGrainBase? _inner;
private IContext? _context;
Expand Down

0 comments on commit bf852ec

Please sign in to comment.