diff --git a/src/Drivers/ZB.MOM.WW.OtOpcUa.Driver.Galaxy/ZB.MOM.WW.OtOpcUa.Driver.Galaxy.csproj b/src/Drivers/ZB.MOM.WW.OtOpcUa.Driver.Galaxy/ZB.MOM.WW.OtOpcUa.Driver.Galaxy.csproj index c8d2716..d33a446 100644 --- a/src/Drivers/ZB.MOM.WW.OtOpcUa.Driver.Galaxy/ZB.MOM.WW.OtOpcUa.Driver.Galaxy.csproj +++ b/src/Drivers/ZB.MOM.WW.OtOpcUa.Driver.Galaxy/ZB.MOM.WW.OtOpcUa.Driver.Galaxy.csproj @@ -15,10 +15,36 @@ - - + + + + + + libs\MxGateway.Client.dll + true + + + libs\MxGateway.Contracts.dll + true + + + + + + + + + + diff --git a/src/Drivers/ZB.MOM.WW.OtOpcUa.Driver.Galaxy/libs/MxGateway.Client.dll b/src/Drivers/ZB.MOM.WW.OtOpcUa.Driver.Galaxy/libs/MxGateway.Client.dll new file mode 100644 index 0000000..6fc124b Binary files /dev/null and b/src/Drivers/ZB.MOM.WW.OtOpcUa.Driver.Galaxy/libs/MxGateway.Client.dll differ diff --git a/src/Drivers/ZB.MOM.WW.OtOpcUa.Driver.Galaxy/libs/MxGateway.Contracts.dll b/src/Drivers/ZB.MOM.WW.OtOpcUa.Driver.Galaxy/libs/MxGateway.Contracts.dll new file mode 100644 index 0000000..f918a73 Binary files /dev/null and b/src/Drivers/ZB.MOM.WW.OtOpcUa.Driver.Galaxy/libs/MxGateway.Contracts.dll differ diff --git a/src/Drivers/ZB.MOM.WW.OtOpcUa.Driver.Galaxy/libs/README.md b/src/Drivers/ZB.MOM.WW.OtOpcUa.Driver.Galaxy/libs/README.md new file mode 100644 index 0000000..63400e8 --- /dev/null +++ b/src/Drivers/ZB.MOM.WW.OtOpcUa.Driver.Galaxy/libs/README.md @@ -0,0 +1,63 @@ +# Vendored MxGateway client DLLs + +This directory holds binary copies of `MxGateway.Client.dll` and +`MxGateway.Contracts.dll` from the sibling `mxaccessgw` repo's last known-good +build (May 2026). The DLLs are referenced from the driver's csproj as +`` items rather than `ProjectReference`. + +## Why + +The sibling `mxaccessgw` repo restructured: the `clients/dotnet/MxGateway.Client` +project the driver previously referenced via path-based `ProjectReference` no +longer exists, and the proto contracts moved from the `MxGateway.Contracts.Proto` +namespace to `ZB.MOM.WW.MxGateway.Contracts.Proto`. The driver's source still +expects the pre-restructure namespace, so re-pointing at the new contracts would +require a global namespace rename across ~19 driver files PLUS reimplementing +the `MxGatewayClient` / `MxGatewaySession` / `GalaxyRepositoryClient` types the +old client library provided (the sibling repo dropped the client library +entirely, keeping only the contracts). + +Vendoring the binaries unblocks the build in minutes instead of hours, freezes +the gateway contract surface at a known-good version, and preserves the option +to migrate properly later without an emergency rewrite. + +## What's vendored + +| File | Source | Built against | +|---|---|---| +| `MxGateway.Client.dll` | mxaccessgw repo, `clients/dotnet/MxGateway.Client/` (pre-restructure) | net10.0, `MxGateway.Contracts.dll` | +| `MxGateway.Contracts.dll` | mxaccessgw repo, `src/MxGateway.Contracts/` (pre-restructure) | net10.0, proto namespace `MxGateway.Contracts.Proto[.Galaxy]` | + +The NuGet packages the vendored DLLs need transitively (Google.Protobuf, +Grpc.Core.Api, Grpc.Net.Client, Microsoft.Extensions.Logging.Abstractions, +Polly) are declared as direct `PackageReference` in the driver csproj — when +the dropped `ProjectReference` was in place those packages were transitively +provided; with binary references the consumer must declare them explicitly. +Versions match what the sibling repo's `ZB.MOM.WW.MxGateway.Contracts.csproj` +uses so the gRPC + proto runtime stays binary-compatible. + +## Decompiled-source archive + +The vendored DLLs are byte-for-byte the build output. The full source can be +recovered with `ilspycmd MxGateway.Client.dll > MxGateway.Client.cs` if a code +review or audit needs it. There is no proprietary code in either DLL — they +are the OtOpcUa team's own client implementation against the gateway's open +proto contracts. + +## How to unwind + +Either path closes the vendored-binary debt: + +1. **Sibling repo restores `MxGateway.Client.csproj`** (or publishes a NuGet + package). Switch the csproj back to a `ProjectReference` / `PackageReference`, + delete this directory. +2. **Driver migrates to the new `ZB.MOM.WW.MxGateway.Contracts.Proto` + namespace.** Global namespace rename across the ~19 consuming source files, + plus re-implementing `MxGatewayClient` / `MxGatewaySession` / + `GalaxyRepositoryClient` (≈2,200 LoC of behavioural client code) either + inlined into this driver or as a fresh sibling library. Delete this + directory. + +Either way: when unwinding, also drop the five `PackageReference` lines added +to the csproj alongside the `` items — the new ProjectReference / +PackageReference will provide them transitively again. diff --git a/tests/Drivers/ZB.MOM.WW.OtOpcUa.Driver.Galaxy.Tests/ZB.MOM.WW.OtOpcUa.Driver.Galaxy.Tests.csproj b/tests/Drivers/ZB.MOM.WW.OtOpcUa.Driver.Galaxy.Tests/ZB.MOM.WW.OtOpcUa.Driver.Galaxy.Tests.csproj index eaf17ef..dd2b9df 100644 --- a/tests/Drivers/ZB.MOM.WW.OtOpcUa.Driver.Galaxy.Tests/ZB.MOM.WW.OtOpcUa.Driver.Galaxy.Tests.csproj +++ b/tests/Drivers/ZB.MOM.WW.OtOpcUa.Driver.Galaxy.Tests/ZB.MOM.WW.OtOpcUa.Driver.Galaxy.Tests.csproj @@ -21,9 +21,19 @@ - - + + + + + + ..\..\..\src\Drivers\ZB.MOM.WW.OtOpcUa.Driver.Galaxy\libs\MxGateway.Contracts.dll + true +