Cargo callers on committed-lock crates run with --locked (locked-cargo-callers) #160
10 changed files with 14 additions and 13 deletions
2
.github/workflows/cultnet-interop.yml
vendored
2
.github/workflows/cultnet-interop.yml
vendored
|
|
@ -138,7 +138,7 @@ jobs:
|
|||
run: cargo test --locked --manifest-path packages/cultnet-rs/Cargo.toml rudp
|
||||
|
||||
- name: Verify Rust CultMesh runtime-local surface
|
||||
run: cargo test --manifest-path packages/cultmesh-rs/Cargo.toml
|
||||
run: cargo test --locked --manifest-path packages/cultmesh-rs/Cargo.toml
|
||||
|
||||
- name: Verify C# RUDP reliability
|
||||
run: dotnet test tests/GameCult.Networking.Tests/GameCult.Networking.Tests.csproj --filter "FullyQualifiedName~Rudp"
|
||||
|
|
|
|||
|
|
@ -212,8 +212,8 @@ identity-owned C# session after provider route replacement.
|
|||
Rust package tests:
|
||||
|
||||
```powershell
|
||||
cargo test --manifest-path packages/cultcache-rs/Cargo.toml
|
||||
cargo test --manifest-path packages/cultnet-rs/Cargo.toml
|
||||
cargo test --locked --manifest-path packages/cultcache-rs/Cargo.toml
|
||||
cargo test --locked --manifest-path packages/cultnet-rs/Cargo.toml
|
||||
```
|
||||
|
||||
Kotlin package build:
|
||||
|
|
|
|||
|
|
@ -124,7 +124,7 @@ The test imports from `../src/index` where the block reads `@gamecult/cultcache-
|
|||
Same shape with `derive(DatabaseEntry)`: slots are `#[cultcache(key = N)]`, so the `.cc` payload is the
|
||||
slot-indexed array the C# runtime writes. The source is
|
||||
[`packages/cultcache-rs/tests/first_call.rs`](../../packages/cultcache-rs/tests/first_call.rs), run by
|
||||
`cargo test --test first_call` in `packages/cultcache-rs`; a second test in that file fails if the block
|
||||
`cargo test --locked --test first_call` in `packages/cultcache-rs`; a second test in that file fails if the block
|
||||
below stops matching the file. The Rust runtime has no name lookup, so the read-back is by key. More:
|
||||
`packages/cultcache-rs/README.md`.
|
||||
|
||||
|
|
@ -341,7 +341,7 @@ async function firstCall() {
|
|||
### Rust CultNet first call
|
||||
|
||||
Source: [`packages/cultnet-rs/tests/first_call.rs`](../../packages/cultnet-rs/tests/first_call.rs), run by
|
||||
`cargo test --test first_call` in `packages/cultnet-rs`. More: `packages/cultnet-rs/README.md`.
|
||||
`cargo test --locked --test first_call` in `packages/cultnet-rs`. More: `packages/cultnet-rs/README.md`.
|
||||
|
||||
```rust
|
||||
use std::net::{TcpListener, TcpStream};
|
||||
|
|
|
|||
|
|
@ -2106,7 +2106,7 @@ async function readTsInteropStore(file: string): Promise<InteropNote> {
|
|||
|
||||
async function buildInteropPeers(): Promise<void> {
|
||||
if (!(await exists(rustInteropBinary))) {
|
||||
await execAsync(`"${cargoCommand}" build --quiet --example cultcache_interop`, {
|
||||
await execAsync(`"${cargoCommand}" build --locked --quiet --example cultcache_interop`, {
|
||||
cwd: cultcacheRsRoot,
|
||||
});
|
||||
}
|
||||
|
|
|
|||
|
|
@ -147,8 +147,8 @@ CultMath names with tests instead of copied project-local helper drift.
|
|||
```powershell
|
||||
dotnet build packages/cultmath/src/CultMath/CultMath.csproj
|
||||
dotnet test packages/cultmath/tests/CultMath.Tests/CultMath.Tests.csproj
|
||||
cargo test --manifest-path packages/cultmath/native/cultmath-core/Cargo.toml
|
||||
cargo build --release --manifest-path packages/cultmath/native/cultmath-core/Cargo.toml
|
||||
cargo test --locked --manifest-path packages/cultmath/native/cultmath-core/Cargo.toml
|
||||
cargo build --locked --release --manifest-path packages/cultmath/native/cultmath-core/Cargo.toml
|
||||
.\packages\cultmath\scripts\build-unity-package.ps1
|
||||
```
|
||||
|
||||
|
|
|
|||
|
|
@ -122,7 +122,7 @@ const rust: Target = {
|
|||
name: "rust",
|
||||
payload: (text) => encode({ text }),
|
||||
async start() {
|
||||
if (!prebuilt) await execFileAsync(cargo, ["build", "--example", "receipt_interop_server", "--message-format", "short"], { cwd: rustManifestDir });
|
||||
if (!prebuilt) await execFileAsync(cargo, ["build", "--locked", "--example", "receipt_interop_server", "--message-format", "short"], { cwd: rustManifestDir });
|
||||
const metadata = spawnSync(cargo, ["metadata", "--format-version", "1", "--no-deps"], { cwd: rustManifestDir, encoding: "utf8" });
|
||||
if (metadata.status !== 0) throw new Error(`cargo metadata failed: ${metadata.stderr}`);
|
||||
const exe = join(JSON.parse(metadata.stdout).target_directory, "debug", "examples", `receipt_interop_server${process.platform === "win32" ? ".exe" : ""}`);
|
||||
|
|
|
|||
|
|
@ -30,7 +30,7 @@ knock on the contract before touching the furniture.
|
|||
## Receipts
|
||||
|
||||
```powershell
|
||||
cargo test
|
||||
cargo test --locked
|
||||
```
|
||||
|
||||
The initial tests prove:
|
||||
|
|
|
|||
|
|
@ -2795,7 +2795,7 @@ async function buildInteropPeers(): Promise<void> {
|
|||
}
|
||||
|
||||
async function buildRustInteropPeer(): Promise<void> {
|
||||
rustInteropPeerBuild ??= execFileAsync(cargoCommand, ["build", "--quiet", "--example", "cultnet_interop_peer"], {
|
||||
rustInteropPeerBuild ??= execFileAsync(cargoCommand, ["build", "--locked", "--quiet", "--example", "cultnet_interop_peer"], {
|
||||
cwd: cultnetRsRoot,
|
||||
}).then(() => undefined);
|
||||
await rustInteropPeerBuild;
|
||||
|
|
|
|||
|
|
@ -11,8 +11,8 @@ adversary, storage, and any projection. Every parameter is a placeholder until t
|
|||
## First call
|
||||
|
||||
```
|
||||
cargo run --example first_call # prints the Meta example and a splitting table
|
||||
cargo test
|
||||
cargo run --locked --example first_call # prints the Meta example and a splitting table
|
||||
cargo test --locked
|
||||
```
|
||||
|
||||
```rust
|
||||
|
|
|
|||
|
|
@ -111,6 +111,7 @@ probe() {
|
|||
node ../../node_modules/typescript/bin/tsc -p tsconfig.test.json
|
||||
node --test dist-test/test/old-reader-v3.test.js ;;
|
||||
python) PYTHONPATH=packages/cultcache-py/src python3 packages/cultcache-py/tests/test_old_reader_v3.py -v ;;
|
||||
# The staged tree is the frozen cultcache-rs-v0.3.1 revision, which has no committed Cargo.lock: --locked cannot work here.
|
||||
rust) cd packages/cultcache-rs && cargo test --test old_reader_v3 -- --nocapture ;;
|
||||
*) usage ;;
|
||||
esac
|
||||
|
|
|
|||
Loading…
Reference in a new issue