From 7d7f2d69409fea3ab645be0777597f9528bb612c Mon Sep 17 00:00:00 2001 From: Zeke Foppa Date: Fri, 19 Dec 2025 12:19:39 -0800 Subject: [PATCH 1/2] [bfops/debug-link-error]: fix --- .github/workflows/ci.yml | 18 ++++++++++++------ sdks/csharp/tools~/gen-client-api.sh | 7 ++++--- sdks/csharp/tools~/gen-quickstart.sh | 5 +++-- sdks/csharp/tools~/gen-regression-tests.sh | 9 +++++---- 4 files changed, 24 insertions(+), 15 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a4ec4b4b883..1b8c4456861 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -686,12 +686,18 @@ jobs: save-if: false prefix-key: v1 - - name: Install SpacetimeDB CLI from the local checkout + # This step shouldn't be needed, but somehow we end up with caches that are missing librusty_v8.a. + # ChatGPT suspects that this could be due to different build invocations using the same target dir, + # and this makes sense to me because we only see it in this job where we mix `cargo build -p` with + # `cargo build --manifest-path` (which apparently build different dependency trees). + # However, we've been unable to fix it so... /shrug + - name: Check v8 outputs run: | - cargo install --force --path crates/cli --locked --message-format=short - cargo install --force --path crates/standalone --locked --message-format=short - # Add a handy alias using the old binary name, so that we don't have to rewrite all scripts (incl. in submodules). - ln -sf $CARGO_HOME/bin/spacetimedb-cli $CARGO_HOME/bin/spacetime + find "${CARGO_TARGET_DIR}"/ -type f | grep '[/_]v8' || true + if ! [ -f "${CARGO_TARGET_DIR}"/debug/gn_out/obj/librusty_v8.a ]; then + echo "Could not find v8 output file librusty_v8.a; rebuilding manually." + cargo build v8 + fi - name: Check quickstart-chat bindings are up to date working-directory: sdks/csharp @@ -713,7 +719,7 @@ jobs: - name: Start SpacetimeDB run: | - spacetime start & + cargo run -pspacetimedb-cli -- start & disown - name: Run regression tests diff --git a/sdks/csharp/tools~/gen-client-api.sh b/sdks/csharp/tools~/gen-client-api.sh index 3f01188d1c2..c19410599b4 100755 --- a/sdks/csharp/tools~/gen-client-api.sh +++ b/sdks/csharp/tools~/gen-client-api.sh @@ -6,10 +6,11 @@ SDK_PATH="$(dirname "$0")/.." SDK_PATH="$(realpath "$SDK_PATH")" STDB_PATH="$SDK_PATH/../.." -cargo build --manifest-path "$STDB_PATH/crates/standalone/Cargo.toml" +cd "$STDB_PATH" +cargo build -p spacetimedb-standalone -cargo run --manifest-path $STDB_PATH/crates/client-api-messages/Cargo.toml --example get_ws_schema | -cargo run --manifest-path $STDB_PATH/crates/cli/Cargo.toml -- generate -l csharp --namespace SpacetimeDB.ClientApi \ +cargo run -p spacetimedb-client-api-messages --example get_ws_schema | +cargo run -p spacetimedb-cli -- generate -l csharp --namespace SpacetimeDB.ClientApi \ --module-def \ -o $SDK_PATH/src/SpacetimeDB/ClientApi/.output diff --git a/sdks/csharp/tools~/gen-quickstart.sh b/sdks/csharp/tools~/gen-quickstart.sh index fefb84a5bd1..ef31c94f756 100755 --- a/sdks/csharp/tools~/gen-quickstart.sh +++ b/sdks/csharp/tools~/gen-quickstart.sh @@ -6,5 +6,6 @@ SDK_PATH="$(dirname "$0")/.." SDK_PATH="$(realpath "$SDK_PATH")" STDB_PATH="$SDK_PATH/../.." -cargo build --manifest-path "$STDB_PATH/crates/standalone/Cargo.toml" -cargo run --manifest-path "$STDB_PATH/crates/cli/Cargo.toml" -- generate -y -l csharp -o "$SDK_PATH/examples~/quickstart-chat/client/module_bindings" --project-path "$SDK_PATH/examples~/quickstart-chat/server" +cd "$STDB_PATH" +cargo build -p spacetimedb-standalone +cargo run -p spacetimedb-cli -- generate -y -l csharp -o "$SDK_PATH/examples~/quickstart-chat/client/module_bindings" --project-path "$SDK_PATH/examples~/quickstart-chat/server" diff --git a/sdks/csharp/tools~/gen-regression-tests.sh b/sdks/csharp/tools~/gen-regression-tests.sh index dd58c2e6946..f13a23d0a75 100755 --- a/sdks/csharp/tools~/gen-regression-tests.sh +++ b/sdks/csharp/tools~/gen-regression-tests.sh @@ -6,7 +6,8 @@ SDK_PATH="$(dirname "$0")/.." SDK_PATH="$(realpath "$SDK_PATH")" STDB_PATH="$SDK_PATH/../.." -cargo build --manifest-path "$STDB_PATH/crates/standalone/Cargo.toml" -cargo run --manifest-path "$STDB_PATH/crates/cli/Cargo.toml" -- generate -y -l csharp -o "$SDK_PATH/examples~/regression-tests/client/module_bindings" --project-path "$SDK_PATH/examples~/regression-tests/server" -cargo run --manifest-path "$STDB_PATH/crates/cli/Cargo.toml" -- generate -y -l csharp -o "$SDK_PATH/examples~/regression-tests/republishing/client/module_bindings" --project-path "$SDK_PATH/examples~/regression-tests/republishing/server-republish" -cargo run --manifest-path "$STDB_PATH/crates/cli/Cargo.toml" -- generate -y -l csharp -o "$SDK_PATH/examples~/regression-tests/procedure-client/module_bindings" --project-path "$STDB_PATH/modules/sdk-test-procedure" +cd "$STDB_PATH" +cargo build -p spacetimedb-standalone +cargo run -p spacetimedb-cli -- generate -y -l csharp -o "$SDK_PATH/examples~/regression-tests/client/module_bindings" --project-path "$SDK_PATH/examples~/regression-tests/server" +cargo run -p spacetimedb-cli -- generate -y -l csharp -o "$SDK_PATH/examples~/regression-tests/republishing/client/module_bindings" --project-path "$SDK_PATH/examples~/regression-tests/republishing/server-republish" +cargo run -p spacetimedb-cli -- generate -y -l csharp -o "$SDK_PATH/examples~/regression-tests/procedure-client/module_bindings" --project-path "$STDB_PATH/modules/sdk-test-procedure" From 9481ce870ba4e4784cccfe94b01db651d10fd8db Mon Sep 17 00:00:00 2001 From: Zeke Foppa Date: Mon, 22 Dec 2025 22:50:34 -0800 Subject: [PATCH 2/2] [bfops/debug-link-error]: remove master changes for debugging --- .github/workflows/ci.yml | 9 --------- 1 file changed, 9 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 1b8c4456861..57449ac8f23 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -686,18 +686,9 @@ jobs: save-if: false prefix-key: v1 - # This step shouldn't be needed, but somehow we end up with caches that are missing librusty_v8.a. - # ChatGPT suspects that this could be due to different build invocations using the same target dir, - # and this makes sense to me because we only see it in this job where we mix `cargo build -p` with - # `cargo build --manifest-path` (which apparently build different dependency trees). - # However, we've been unable to fix it so... /shrug - name: Check v8 outputs run: | find "${CARGO_TARGET_DIR}"/ -type f | grep '[/_]v8' || true - if ! [ -f "${CARGO_TARGET_DIR}"/debug/gn_out/obj/librusty_v8.a ]; then - echo "Could not find v8 output file librusty_v8.a; rebuilding manually." - cargo build v8 - fi - name: Check quickstart-chat bindings are up to date working-directory: sdks/csharp