From e5e00165d4d191f6f6ea9f5b2a6eaf4f67bf5a4c Mon Sep 17 00:00:00 2001 From: Jose Date: Thu, 30 Apr 2026 18:31:17 +0200 Subject: [PATCH] Aggregate Protobuf build telemetry into a single per-build report (#4443) The build-telemetry plug-in ran inside each per-file protoc invocation, producing N uploads with FileCount=1 instead of one upload describing the whole compilation. Generalize ProtocTask to take a `Plugins` item list (matching the shape of SlicecTask.Generators) and an `AdditionalOptions` parameter, and run it twice from the targets: per-file for codegen plus per-file dependency files, then once over all ProtoFile items for the telemetry plug-in. --- .../IceRpc.Protobuf.Tools.targets | 43 ++++++++-- src/IceRpc.Protobuf.Tools/ProtocTask.cs | 83 +++++++------------ 2 files changed, 64 insertions(+), 62 deletions(-) diff --git a/src/IceRpc.Protobuf.Tools/IceRpc.Protobuf.Tools.targets b/src/IceRpc.Protobuf.Tools/IceRpc.Protobuf.Tools.targets index c44e9d0e6f..bbaf2ae254 100644 --- a/src/IceRpc.Protobuf.Tools/IceRpc.Protobuf.Tools.targets +++ b/src/IceRpc.Protobuf.Tools/IceRpc.Protobuf.Tools.targets @@ -26,12 +26,6 @@ AssemblyFile="$(IceRpcProtobufToolsTaskAssembliesPath)IceRpc.Protobuf.Tools.dll" Runtime="NET" /> - @@ -69,6 +63,24 @@ + + <_ProtocPluginScriptExtension Condition="$([MSBuild]::IsOSPlatform('Windows'))">.bat + <_ProtocPluginScriptExtension Condition="!$([MSBuild]::IsOSPlatform('Windows'))">.sh + + + + + <_ProtocCodegenPlugin Include="csharp" /> + <_ProtocCodegenPlugin Include="icerpc-csharp"> + $(IceRpcProtocGenPath)protoc-gen-icerpc-csharp$(_ProtocPluginScriptExtension) + + + + <_ProtocTelemetryPlugin Include="icerpc-build-telemetry"> + $(IceRpcProtocBuildTelemetryPath)protoc-gen-icerpc-build-telemetry$(_ProtocPluginScriptExtension) + + + + +