fix(driver-galaxy): vendor MxGateway.Client + MxGateway.Contracts as binary refs
The sibling mxaccessgw repo restructured: clients/dotnet/MxGateway.Client no longer exists, and the proto contracts moved to a new namespace (ZB.MOM.WW.MxGateway.Contracts.Proto, was MxGateway.Contracts.Proto). The driver's source still expects the pre-restructure namespace, so the broken ProjectReference produced 86 build errors in src/ + 1 in tests/ on master. Resolution: vendor the last known-good build of MxGateway.Client.dll (99 KB, May 22) and MxGateway.Contracts.dll (490 KB, May 23) under src/Drivers/.../Driver.Galaxy/libs/, reference them via <Reference HintPath=...> in both the driver and its test csproj, and declare the NuGet packages the dropped ProjectReference was supplying transitively (Google.Protobuf, Grpc.Core.Api, Grpc.Net.Client, Microsoft.Extensions.Logging.Abstractions, Polly) at versions matching the sibling repo's ZB.MOM.WW.MxGateway.Contracts.csproj so binary compatibility is preserved. Why this over a source migration: Source migration would require namespace renames across ~19 driver files PLUS reimplementing MxGatewayClient / MxGatewaySession / GalaxyRepositoryClient (~2,200 LoC) — the sibling repo dropped the client library entirely, keeping only the proto contracts. Vendoring the last known-good binaries unblocks the build in minutes, freezes the gateway contract surface at a known-good version, and preserves the option to migrate properly once the sibling repo decides whether to restore a client library or hand the work back to us. libs/README.md documents the unwinding plan (either path closes the debt: sibling restores a client library, or driver migrates to the new contracts namespace + reimplements the client wrapper). Verification: - dotnet build ZB.MOM.WW.OtOpcUa.slnx: 0 errors (was 87). - Driver.Galaxy unit tests: 245/245 pass. - Integration tests not run here (require a live mxaccessgw gateway). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -15,10 +15,36 @@
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\..\Core\ZB.MOM.WW.OtOpcUa.Core.Abstractions\ZB.MOM.WW.OtOpcUa.Core.Abstractions.csproj"/>
|
||||
<ProjectReference Include="..\..\Core\ZB.MOM.WW.OtOpcUa.Core\ZB.MOM.WW.OtOpcUa.Core.csproj"/>
|
||||
<!-- mxaccessgw .NET client. Path-based ProjectReference because both repos sit
|
||||
side-by-side on the dev box; long-term we'll consume MxGateway.Client as a
|
||||
NuGet package. PR 4.W revisits the dependency shape before parity gating. -->
|
||||
<ProjectReference Include="..\..\..\..\mxaccessgw\clients\dotnet\MxGateway.Client\MxGateway.Client.csproj"/>
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<!-- Vendored mxaccessgw .NET client. Originally consumed via path-based
|
||||
ProjectReference to the sibling repo, but the sibling repo restructured
|
||||
and the MxGateway.Client.csproj path no longer exists. The DLLs in
|
||||
libs/ are the last known-good build (May 2026); they reference proto
|
||||
types from MxGateway.Contracts.dll using the pre-restructure namespace
|
||||
(MxGateway.Contracts.Proto). See libs/README.md for the unwinding plan
|
||||
once the sibling repo restores a client library or we migrate to the
|
||||
new ZB.MOM.WW.MxGateway.Contracts.Proto namespace. -->
|
||||
<Reference Include="MxGateway.Client">
|
||||
<HintPath>libs\MxGateway.Client.dll</HintPath>
|
||||
<Private>true</Private>
|
||||
</Reference>
|
||||
<Reference Include="MxGateway.Contracts">
|
||||
<HintPath>libs\MxGateway.Contracts.dll</HintPath>
|
||||
<Private>true</Private>
|
||||
</Reference>
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<!-- Transitive deps the vendored DLLs need exposed at consumer level
|
||||
(versions match the sibling mxaccessgw repo's
|
||||
ZB.MOM.WW.MxGateway.Contracts.csproj so binary-compat is preserved). -->
|
||||
<PackageReference Include="Google.Protobuf" Version="3.34.1" />
|
||||
<PackageReference Include="Grpc.Core.Api" Version="2.76.0" />
|
||||
<PackageReference Include="Grpc.Net.Client" Version="2.71.0" />
|
||||
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="10.0.0" />
|
||||
<PackageReference Include="Polly" Version="8.5.2" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
||||
Reference in New Issue
Block a user