ci(codegen): Check 3 sweeps both directions — canonical protos missing a vendored copy now fail
This commit is contained in:
@@ -206,7 +206,8 @@ publish` ship them inside the `.crate`, making the crate buildable standalone
|
||||
with no access to the rest of the mxaccessgw repo. Any Contracts proto change
|
||||
must refresh `clients/rust/protos/` in the same commit; `scripts/check-codegen.ps1`
|
||||
Check 3 byte-compares the vendored copies against the canonical protos and
|
||||
fails on drift. Because the vendored protos make a standalone build possible,
|
||||
fails on drift — in both directions, so a newly added canonical proto that
|
||||
was never vendored fails there rather than at a consumer's standalone build. Because the vendored protos make a standalone build possible,
|
||||
`cargo package`/`cargo publish` run **with** verification (no `--no-verify`) —
|
||||
a `cargo package` that cannot build from the vendored tree alone would mean
|
||||
the vendored copies are stale, and verification is what catches that before
|
||||
|
||||
@@ -689,6 +689,11 @@ committed client descriptor set (Check 1), the C# `Generated/` (Check 2), the Ru
|
||||
protos (Check 3), or the Go/Python client bindings (Check 4, IPC-25) no longer match the current
|
||||
`.proto` sources — the codegen drift class this repo has hit repeatedly (stale client
|
||||
descriptors, net48 `CS0246` on unregenerated protos, silently stale Go/Python worker bindings).
|
||||
Check 3 sweeps both directions: a vendored copy that drifted from (or has no) canonical proto
|
||||
fails, and so does a canonical proto with no vendored copy at all. The second direction matters
|
||||
because `clients/rust/build.rs` prefers the canonical directory whenever it exists, so an
|
||||
unvendored proto builds fine in-repo and only breaks the standalone crate build a consumer runs
|
||||
from the published tarball — drift no in-repo build can surface.
|
||||
Check 4 regenerates the Go and Python bindings with their pinned generators (`protoc-gen-go`
|
||||
v1.36.11 / `protoc-gen-go-grpc` 1.6.2, `grpcio-tools` 1.80.0) and fails on any diff; a missing
|
||||
generator fails the check rather than skipping it. The **primary** guard for the
|
||||
|
||||
Reference in New Issue
Block a user