Skip to content

Commit bf852ec

Browse files
authored
Remove clusterinit (#1763)
* remove cluster init * cluster tweaks
1 parent c9ef833 commit bf852ec

File tree

9 files changed

+40
-49
lines changed

9 files changed

+40
-49
lines changed
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
namespace ClusterHelloWorld.Messages;
2+
3+
public class ClusterInit
4+
{
5+
6+
}
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
namespace ClusterHelloWorld.Messages;
2+
3+
public class ClusterInit
4+
{
5+
6+
}

examples/ClusterGrainHelloWorld/Messages/Messages.csproj

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,18 +4,18 @@
44
<TargetFramework>net6.0</TargetFramework>
55
</PropertyGroup>
66
<ItemGroup>
7-
<PackageReference Include="Google.Protobuf" Version="3.21.1"/>
8-
<PackageReference Include="Grpc.Tools" Version="2.46.3" PrivateAssets="All"/>
9-
<PackageReference Include="Proto.Cluster.CodeGen" Version="0.30.0"/>
7+
<PackageReference Include="Google.Protobuf" Version="3.21.1" />
8+
<PackageReference Include="Grpc.Tools" Version="2.46.3" PrivateAssets="All" />
9+
<PackageReference Include="Proto.Cluster.CodeGen" Version="0.30.0" />
1010
</ItemGroup>
1111
<ItemGroup>
12-
<Protobuf Include="Protos.proto"/>
12+
<Protobuf Include="Protos.proto" />
1313
</ItemGroup>
1414
<ItemGroup>
15-
<ProtoGrain Include="Protos.proto"/>
15+
<ProtoGrain Include="Protos.proto" />
1616
</ItemGroup>
1717
<ItemGroup>
18-
<ProjectReference Include="..\..\..\src\Proto.Cluster\Proto.Cluster.csproj"/>
18+
<ProjectReference Include="..\..\..\src\Proto.Cluster\Proto.Cluster.csproj" />
1919
</ItemGroup>
2020

2121
</Project>
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
namespace ClusterPubSub;
2+
3+
public class ClusterInit
4+
{
5+
6+
}

examples/ClusterPubSub/ClusterPubSub.csproj

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,22 +6,22 @@
66
</PropertyGroup>
77

88
<ItemGroup>
9-
<ProjectReference Include="..\..\src\Proto.Cluster.TestProvider\Proto.Cluster.TestProvider.csproj"/>
9+
<ProjectReference Include="..\..\src\Proto.Cluster.TestProvider\Proto.Cluster.TestProvider.csproj" />
1010
</ItemGroup>
1111

1212
<ItemGroup>
13-
<PackageReference Include="Google.Protobuf" Version="3.21.1"/>
13+
<PackageReference Include="Google.Protobuf" Version="3.21.1" />
1414
<PackageReference Include="Grpc.Tools" Version="2.46.3">
1515
<PrivateAssets>all</PrivateAssets>
1616
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
1717
</PackageReference>
18-
<PackageReference Include="Microsoft.Extensions.Logging.Console" Version="6.0.0"/>
19-
<PackageReference Include="Proto.Cluster.CodeGen" Version="0.31.0"/>
18+
<PackageReference Include="Microsoft.Extensions.Logging.Console" Version="6.0.0" />
19+
<PackageReference Include="Proto.Cluster.CodeGen" Version="0.31.0" />
2020
</ItemGroup>
2121

2222
<ItemGroup>
23-
<Protobuf Include="protos.proto" GrpcServices="none"/>
24-
<ProtoGrain Include="protos.proto"/>
23+
<Protobuf Include="protos.proto" GrpcServices="none" />
24+
<ProtoGrain Include="protos.proto" />
2525
</ItemGroup>
2626

2727
</Project>

src/Proto.Cluster.CodeGen/CodeGenerator.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ static string RemovePackageName(string type)
130130
}
131131

132132
static string GetKind(string? packageName, string serviceName) =>
133-
string.IsNullOrEmpty(packageName) ? serviceName : $"{packageName}/{serviceName}";
133+
string.IsNullOrEmpty(packageName) ? serviceName : $"{packageName}.{serviceName}";
134134
}
135135

136136
#region UnusedMethods

src/Proto.Cluster/Grain/ClusterInit.cs

Lines changed: 0 additions & 27 deletions
This file was deleted.

src/Proto.Cluster/Proto.Cluster.csproj

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,21 +6,21 @@
66
<TargetFrameworks>netcoreapp3.1;net6.0;net7.0</TargetFrameworks>
77
</PropertyGroup>
88
<ItemGroup>
9-
<PackageReference Include="Grpc.Tools" Version="2.46.3" PrivateAssets="All"/>
9+
<PackageReference Include="Grpc.Tools" Version="2.46.3" PrivateAssets="All" />
1010
<PackageReference Include="Roslynator.Analyzers" Version="4.0.2">
1111
<PrivateAssets>all</PrivateAssets>
1212
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
1313
</PackageReference>
14-
<PackageReference Update="Microsoft.SourceLink.GitHub" Version="1.1.1"/>
14+
<PackageReference Update="Microsoft.SourceLink.GitHub" Version="1.1.1" />
1515
</ItemGroup>
1616
<ItemGroup>
17-
<ProjectReference Include="..\Proto.Remote\Proto.Remote.csproj"/>
17+
<ProjectReference Include="..\Proto.Remote\Proto.Remote.csproj" />
1818
</ItemGroup>
1919
<ItemGroup>
20-
<Protobuf Include="SeedContracts.proto" GrpcServices="Server" AdditionalImportDirs=".; ..\..\src"/>
21-
<Protobuf Include="ClusterContracts.proto" GrpcServices="Server" AdditionalImportDirs=".; ..\..\src"/>
22-
<Protobuf Include="GossipContracts.proto" GrpcServices="Server" AdditionalImportDirs=".; ..\..\src"/>
23-
<Protobuf Include="PubSubContracts.proto" GrpcServices="Server" AdditionalImportDirs=".; ..\..\src"/>
24-
<Protobuf Include="GrainContracts.proto" GrpcServices="Server" AdditionalImportDirs=".; ..\..\src"/>
20+
<Protobuf Include="SeedContracts.proto" GrpcServices="Server" AdditionalImportDirs=".; ..\..\src" />
21+
<Protobuf Include="ClusterContracts.proto" GrpcServices="Server" AdditionalImportDirs=".; ..\..\src" />
22+
<Protobuf Include="GossipContracts.proto" GrpcServices="Server" AdditionalImportDirs=".; ..\..\src" />
23+
<Protobuf Include="PubSubContracts.proto" GrpcServices="Server" AdditionalImportDirs=".; ..\..\src" />
24+
<Protobuf Include="GrainContracts.proto" GrpcServices="Server" AdditionalImportDirs=".; ..\..\src" />
2525
</ItemGroup>
2626
</Project>

tests/Proto.Cluster.CodeGen.Tests/ExpectedOutput.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -265,7 +265,7 @@ public TestGrainClient(Cluster cluster, string id)
265265

266266
public class TestGrainActor : IActor
267267
{
268-
public const string Kind = "Foo/TestGrain";
268+
public const string Kind = "Foo.TestGrain";
269269

270270
private TestGrainBase? _inner;
271271
private IContext? _context;

0 commit comments

Comments
 (0)