fix(CLI-02): make Rust crate buildable outside the repository
build.rs resolved the .proto files via a monorepo-relative path and packaging relied on `cargo publish --no-verify` to hide the resulting failure. Vendor the three canonical protos into clients/rust/protos/, resolve them via CARGO_MANIFEST_DIR (in-repo path preferred, vendored fallback for the packaged crate), ship them via Cargo.toml `include`, and drop `--no-verify` from pack-clients.ps1. archreview: CLI-02 (P1). Verified: cargo fmt/check/test (28) + clippy -D warnings, and `cargo package` (no --no-verify) compiles standalone in the isolated staging dir — the out-of-repo proof. Vendored-proto drift is guarded by check-codegen.ps1.
This commit is contained in:
@@ -187,7 +187,9 @@ function Invoke-PackRust {
|
||||
}
|
||||
|
||||
Write-Host 'Running cargo package...'
|
||||
& cargo package --no-verify
|
||||
# No --no-verify: the crate vendors its protos (clients/rust/protos) so
|
||||
# the verify build proves it compiles standalone from the tarball (CLI-02).
|
||||
& cargo package
|
||||
if ($LASTEXITCODE -ne 0) { throw 'cargo package failed.' }
|
||||
|
||||
$packageDir = Join-Path $rustDir 'target/package'
|
||||
@@ -207,7 +209,7 @@ function Invoke-PackRust {
|
||||
Write-Host 'Publishing Rust crate to Gitea...' -ForegroundColor Yellow
|
||||
Push-Location (Join-Path $RepoRoot 'clients/rust')
|
||||
try {
|
||||
& cargo publish --no-verify --registry dohertj2-gitea
|
||||
& cargo publish --registry dohertj2-gitea
|
||||
if ($LASTEXITCODE -ne 0) { throw 'cargo publish failed.' }
|
||||
} finally { Pop-Location }
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user