From 6182f636c645f934ddf02d740be66f643c841695 Mon Sep 17 00:00:00 2001 From: Zeke Foppa Date: Sun, 31 May 2026 11:06:57 -0700 Subject: [PATCH 1/6] script-triage --- script-triage.txt | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 script-triage.txt diff --git a/script-triage.txt b/script-triage.txt new file mode 100644 index 00000000000..2f875f25084 --- /dev/null +++ b/script-triage.txt @@ -0,0 +1,24 @@ +# remove +tools/publish-crates.sh +demo/Blackholio/server-csharp/write-nuget-config.sh +demo/Blackholio/server-csharp/logs.sh +demo/Blackholio/server-csharp/publish.sh +demo/Blackholio/server-rust/logs.sh +sdks/csharp/tools~/upgrade-version.py +run_standalone_temp.sh + +# translate +git-hooks/install-hooks.sh +tools/update-test-snapshots.sh # this should probably go under cargo gen + +# ask for input +tools/perf.sh + +crates/sqltest/build_standard.py +crates/sqltest/override_with_output.sh +crates/sqltest/reformat.sh +crates/sqltest/run_all_sequential.sh + +crates/bindings/bindings-doctests.sh # should this be run in CI? + +sdks/csharp/tools~/update-against-stdb.sh # what do people use this for? From 3aeb0cad0d90b1ccf341ae5120faa083ed99167f Mon Sep 17 00:00:00 2001 From: Zeke Foppa Date: Sun, 31 May 2026 12:50:02 -0700 Subject: [PATCH 2/6] remove --- demo/Blackholio/server-csharp/logs.sh | 5 - demo/Blackholio/server-csharp/publish.sh | 5 - .../server-csharp/write-nuget-config.sh | 44 -------- demo/Blackholio/server-rust/logs.sh | 5 - run_standalone_temp.sh | 25 ----- sdks/csharp/tools~/upgrade-version.py | 78 ------------- tools/publish-crates.sh | 105 ------------------ 7 files changed, 267 deletions(-) delete mode 100644 demo/Blackholio/server-csharp/logs.sh delete mode 100644 demo/Blackholio/server-csharp/publish.sh delete mode 100755 demo/Blackholio/server-csharp/write-nuget-config.sh delete mode 100755 demo/Blackholio/server-rust/logs.sh delete mode 100755 run_standalone_temp.sh delete mode 100644 sdks/csharp/tools~/upgrade-version.py delete mode 100755 tools/publish-crates.sh diff --git a/demo/Blackholio/server-csharp/logs.sh b/demo/Blackholio/server-csharp/logs.sh deleted file mode 100644 index efce2bccd73..00000000000 --- a/demo/Blackholio/server-csharp/logs.sh +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/bash - -set -euo pipefail - -spacetime logs -s local blackholio \ No newline at end of file diff --git a/demo/Blackholio/server-csharp/publish.sh b/demo/Blackholio/server-csharp/publish.sh deleted file mode 100644 index f3311d04923..00000000000 --- a/demo/Blackholio/server-csharp/publish.sh +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/bash - -set -euo pipefail - -spacetime publish -s local blackholio --delete-data -y diff --git a/demo/Blackholio/server-csharp/write-nuget-config.sh b/demo/Blackholio/server-csharp/write-nuget-config.sh deleted file mode 100755 index 7d3da536429..00000000000 --- a/demo/Blackholio/server-csharp/write-nuget-config.sh +++ /dev/null @@ -1,44 +0,0 @@ -#!/bin/bash - -# Helper script to override dependencies to use a local clone of the SpacetimeDB repo. -# e.g. run: -# dotnet nuget locals all -c && dotnet pack ../../../SpacetimeDB/crates/bindings-csharp/BSATN.Runtime && dotnet pack ../../../SpacetimeDB/crates/bindings-csharp/Runtime && ./write-nuget-config.sh ../../../SpacetimeDB - -set -ueo pipefail - -SPACETIMEDB_REPO_PATH="$1" - -cd "$(dirname "$(readlink -f "$0")")" - -# Write out the nuget config file to `nuget.config`. This causes the spacetimedb-csharp-sdk repository -# to be aware of the local versions of the `bindings-csharp` packages in SpacetimeDB, and use them if -# available. -# See https://learn.microsoft.com/en-us/nuget/reference/nuget-config-file for more info on the config file, -# and https://tldp.org/LDP/abs/html/here-docs.html for more info on this bash feature. -cat >nuget.config < - - - - - - - - - - - - - - - - - - - - - -EOF - -echo "Wrote nuget.config contents:" -cat nuget.config diff --git a/demo/Blackholio/server-rust/logs.sh b/demo/Blackholio/server-rust/logs.sh deleted file mode 100755 index efce2bccd73..00000000000 --- a/demo/Blackholio/server-rust/logs.sh +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/bash - -set -euo pipefail - -spacetime logs -s local blackholio \ No newline at end of file diff --git a/run_standalone_temp.sh b/run_standalone_temp.sh deleted file mode 100755 index 739a29a93f1..00000000000 --- a/run_standalone_temp.sh +++ /dev/null @@ -1,25 +0,0 @@ -#!/bin/bash -# Run a ephemeral database inside a `temp` folder -set -euo pipefail - -cd "$(dirname "$0")" - -cargo build -p spacetimedb-standalone - -STDB_PATH="${STDB_PATH:-$(mktemp -d)}" - -function cleanup { - echo "Removing ${STDB_PATH}" - rm -rf "$STDB_PATH" -} - -trap cleanup EXIT - -echo "DATABASE AT ${STDB_PATH}" - -cargo run -p spacetimedb-standalone -- start \ - --data-dir ${STDB_PATH} \ - --jwt-pub-key-path "${STDB_PATH}/id_ecdsa.pub" \ - --jwt-priv-key-path "${STDB_PATH}/id_ecdsa" \ - --pg-port 5432 \ - -l 127.0.0.1:3000 --enable-tracy diff --git a/sdks/csharp/tools~/upgrade-version.py b/sdks/csharp/tools~/upgrade-version.py deleted file mode 100644 index 95ce86339dc..00000000000 --- a/sdks/csharp/tools~/upgrade-version.py +++ /dev/null @@ -1,78 +0,0 @@ -import os -import re -import sys -import json -import argparse - -def update_csproj_file(path, version): - with open(path, 'r', encoding='utf-8') as f: - lines = f.readlines() - - updated_lines = [] - version_prefix = '.'.join(version.split('.')[:2]) + '.*' - version_tag_written = set() - - for i, line in enumerate(lines): - # Update PackageReference for SpacetimeDB.* - updated_line = re.sub( - r'(]*Include="SpacetimeDB\.[^"]*"[^>]*Version=")[^"]*(")', - rf'\g<1>{version_prefix}\g<2>', - line - ) - - for tag in ('Version', 'AssemblyVersion'): - if re.search(rf'<{tag}>.*', updated_line.strip()): - updated_line = re.sub( - rf'(<{tag}>).*()', - rf'\g<1>{version}\g<2>', - updated_line - ) - version_tag_written.add(tag) - - updated_lines.append(updated_line) - - with open(path, 'w', encoding='utf-8') as f: - f.writelines(updated_lines) - print(f"Updated: {path}") - -def update_all_csproj_files(version): - for root, _, files in os.walk('.'): - for file in files: - if file.endswith('.csproj'): - update_csproj_file(os.path.join(root, file), version) - -def update_package_json(version): - path = 'package.json' - if os.path.exists(path): - with open(path, 'r', encoding='utf-8') as f: - data = json.load(f) - data['version'] = version - with open(path, 'w', encoding='utf-8') as f: - json.dump(data, f, indent=2) - f.write('\n') # ensure trailing newline - print(f"Updated version in {path} to {version}") - else: - print("package.json not found.") - -def main(): - parser = argparse.ArgumentParser( - description='Update version numbers in .csproj files and package.json', - formatter_class=argparse.RawDescriptionHelpFormatter, - epilog=""" -Examples: - python upgrade-version.py 1.2.3 - python upgrade-version.py --version 1.2.3 - """ - ) - parser.add_argument( - 'version', - help='Version number to set (e.g., 1.2.3)' - ) - - args = parser.parse_args() - - update_all_csproj_files(args.version) - update_package_json(args.version) - -if __name__ == '__main__': - main() diff --git a/tools/publish-crates.sh b/tools/publish-crates.sh deleted file mode 100755 index 42d4cfd3a8d..00000000000 --- a/tools/publish-crates.sh +++ /dev/null @@ -1,105 +0,0 @@ -#!/bin/bash -set -euo pipefail - -cd "$(dirname "$0")/.." - -DRY_RUN=0 -ALLOW_DIRTY=0 -SKIP_ALREADY_PUBLISHED=0 -# Use usernames here to help prevent users from getting spam -NEW_CRATE_OWNERS=("cloutiertyler" "bfops" "jdetter") - -# Parse arguments -while [[ $# -gt 0 ]]; do - case "$1" in - --dry-run) - DRY_RUN=1 - ;; - --allow-dirty) - ALLOW_DIRTY=1 - ;; - --skip-already-published) - SKIP_ALREADY_PUBLISHED=1 - echo "Skipping already published crates." - ;; - *) - echo "Invalid argument: $1" - exit 1 - ;; - esac - shift -done - -if [ $DRY_RUN -ne 1 ]; then - echo "You are about to publish to crates.io (dry run is false.)" - echo "We are also going to do a test install after publishing. This will remove any version of spacetimedb-cli you may have installed." - echo - echo "Press [Enter] to continue." - read -r -fi - -BASEDIR=$(pwd) -declare -a ROOTS=(spacetimedb spacetimedb-sdk) -declare -a CRATES=($(python3 tools/find-publish-list.py --recursive --quiet --directories "${ROOTS[@]}")) - -echo Crates to publish: "${CRATES[@]}" -echo - -for path in "${CRATES[@]}"; do - if [ ! -d "${path}" ]; then - echo "This crate does not exist: ${path}" - exit 1 - fi -done - -i=0 -for path in "${CRATES[@]}"; do - i=$(($i+1)) - cd "${path}" - - PUBLISH_CMD="cargo publish" - [[ $DRY_RUN -eq 1 ]] && PUBLISH_CMD+=" --dry-run" - [[ $ALLOW_DIRTY -eq 1 ]] && PUBLISH_CMD+=" --allow-dirty" - - echo "[$i/${#CRATES[@]}] Publishing crate at $path with command: $PUBLISH_CMD" - if ! OUTPUT=$($PUBLISH_CMD 2>&1); then - if [ $SKIP_ALREADY_PUBLISHED -eq 1 ] && echo "$OUTPUT" | grep -q "already exists"; then - echo "WARNING: Crate at $path is already published at this version. Skipping..." - else - echo "ERROR: Failed to publish crate at $path. Check logs:" - echo "$OUTPUT" - exit 1 - fi - fi - - crate="$(basename "$path")" - # Add owners - echo "Adding owners for $crate..." - for owner in "${NEW_CRATE_OWNERS[@]}"; do - if ! OUTPUT=$(cargo owner --add "$owner" 2>&1); then - if echo "$OUTPUT" | grep -q "already" ; then - echo "$owner already is an owner of the crate." - else - echo "Unknown error adding owner $owner:" - echo "$OUTPUT" - exit 1 - fi - else - echo "Added $owner as an owner of $crate." - fi - done - echo -done - -echo "Doing a test install." - -set +e -cargo uninstall spacetimedb-cli > /dev/null -set -e - -echo -if cargo install spacetimedb-cli; then - echo "Installation was successful. Congrats on publishing to crates.io!" -else - echo "ERROR: Installation failed! Check the build log for details. This typically means you forgot to update the version of a dependency." -fi From e0ac9c11a7681f934abfb36373a5df4cffaaf46d Mon Sep 17 00:00:00 2001 From: Zeke Foppa Date: Sun, 31 May 2026 12:50:12 -0700 Subject: [PATCH 3/6] update --- script-triage.txt | 9 --------- 1 file changed, 9 deletions(-) diff --git a/script-triage.txt b/script-triage.txt index 2f875f25084..79bbd867ccd 100644 --- a/script-triage.txt +++ b/script-triage.txt @@ -1,12 +1,3 @@ -# remove -tools/publish-crates.sh -demo/Blackholio/server-csharp/write-nuget-config.sh -demo/Blackholio/server-csharp/logs.sh -demo/Blackholio/server-csharp/publish.sh -demo/Blackholio/server-rust/logs.sh -sdks/csharp/tools~/upgrade-version.py -run_standalone_temp.sh - # translate git-hooks/install-hooks.sh tools/update-test-snapshots.sh # this should probably go under cargo gen From 9a521f77f9ea33b2a90dbb4d9a4b27c7a934f8ce Mon Sep 17 00:00:00 2001 From: Zeke Foppa Date: Sun, 31 May 2026 13:07:36 -0700 Subject: [PATCH 4/6] update triage file --- crates/bindings/README.md | 8 +++----- script-triage.txt | 9 ++++----- 2 files changed, 7 insertions(+), 10 deletions(-) diff --git a/crates/bindings/README.md b/crates/bindings/README.md index ea0046b287b..92dcd5c8e0e 100644 --- a/crates/bindings/README.md +++ b/crates/bindings/README.md @@ -4,9 +4,7 @@ Some of the links in this file are not resolved when previewing on GitHub, but *are* resolved when compiled by Rustdoc. - To run the doctests, run the `./bindings-doctests.sh` script. - This works around some issues related to doctests and wasm, but it requires nightly, - so it isn't currently run on CI. + The doctests run on CI through `cargo ci lint`. When you add a doc-tested code sample, make sure to copy the boilerplate around some other code sample, the: @@ -16,7 +14,7 @@ # } ``` This makes sure your samples don't break when tested on non-wasm; - but you need to use `./bindings-doctests.sh` to actually test them. + CI also tests them for wasm. --> [SpacetimeDB](https://spacetimedb.com/) allows using the Rust language to write server-side applications called **modules**. Modules, which run inside a relational database, have direct access to database tables, and expose public functions called **reducers** that can be invoked over the network. Clients connect directly to the database to read data. @@ -618,7 +616,7 @@ fn players_for_level(ctx: &AnonymousViewContext) -> Vec { .player_level() .level() .filter(2u64) - .map(|player| { + .filter_map(|player| { ctx.db .player() .id() diff --git a/script-triage.txt b/script-triage.txt index 79bbd867ccd..7d2ada3a5a2 100644 --- a/script-triage.txt +++ b/script-triage.txt @@ -1,15 +1,14 @@ # translate git-hooks/install-hooks.sh -tools/update-test-snapshots.sh # this should probably go under cargo gen +crates/bindings/bindings-doctests.sh # run as part of CI +sdks/csharp/tools~/update-against-stdb.sh # port to `cargo csharp` # ask for input -tools/perf.sh crates/sqltest/build_standard.py crates/sqltest/override_with_output.sh crates/sqltest/reformat.sh crates/sqltest/run_all_sequential.sh -crates/bindings/bindings-doctests.sh # should this be run in CI? - -sdks/csharp/tools~/update-against-stdb.sh # what do people use this for? +# exception +tools/perf.sh # this one only works on linux regardless so /shrug From 474c07a70f610fbb725562b6351ddc417341b52d Mon Sep 17 00:00:00 2001 From: Zeke Foppa Date: Sun, 31 May 2026 13:16:35 -0700 Subject: [PATCH 5/6] traige txt --- script-triage.txt | 1 - 1 file changed, 1 deletion(-) diff --git a/script-triage.txt b/script-triage.txt index 7d2ada3a5a2..7995f554957 100644 --- a/script-triage.txt +++ b/script-triage.txt @@ -1,6 +1,5 @@ # translate git-hooks/install-hooks.sh -crates/bindings/bindings-doctests.sh # run as part of CI sdks/csharp/tools~/update-against-stdb.sh # port to `cargo csharp` # ask for input From 490b3dd30f41105a9b26635c8082e2b68360d07b Mon Sep 17 00:00:00 2001 From: Zeke Foppa Date: Sun, 31 May 2026 13:25:22 -0700 Subject: [PATCH 6/6] more triage doc --- script-triage.txt | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) diff --git a/script-triage.txt b/script-triage.txt index 7995f554957..f5b195bbf75 100644 --- a/script-triage.txt +++ b/script-triage.txt @@ -11,3 +11,41 @@ crates/sqltest/run_all_sequential.sh # exception tools/perf.sh # this one only works on linux regardless so /shrug + + +# untriaged +crates/bench/callgrind-docker.sh +crates/bench/flamegraph.sh +crates/bench/hyper_cmp.py +crates/bench/instruments.sh +crates/bindings-cpp/tests/client-comparison/check_tables.py +crates/bindings-cpp/tests/client-comparison/run_client_comparison.sh +crates/bindings-cpp/tests/client-comparison/scripts/compare_clients.sh +crates/bindings-cpp/tests/client-comparison/scripts/compare_modules.sh +crates/bindings-cpp/tests/client-comparison/scripts/regenerate_cpp_client.sh +crates/bindings-cpp/tests/client-comparison/scripts/regenerate_rust_client.sh +crates/bindings-cpp/tests/type-isolation-test/run_type_isolation_test.sh +crates/bindings-cpp/tests/type-isolation-test/update_table_from_log.sh +crates/bindings/bindings-doctests.sh +crates/sqltest/build_standard.py +crates/sqltest/override_with_output.sh +crates/sqltest/reformat.sh +crates/sqltest/run_all_sequential.sh +crates/update/spacetime-install.sh +demo/Blackholio/server-csharp/generate.sh +demo/Blackholio/server-rust/generate.sh +demo/Blackholio/server-rust/publish.sh +docs/scripts/get-old-docs.sh +modules/module-test-cpp/compare_module_schemas.py +sdks/csharp/tools~/gen-client-api.sh +sdks/csharp/tools~/run-regression-tests.sh +templates/keynote-2/scripts/bench-stats.py +templates/keynote-2/scripts/check-bench.sh +templates/keynote-2/scripts/plot-bench.py +templates/keynote-2/scripts/start-bench.sh +templates/keynote-2/scripts/stop-bench.sh +tools/clippy.sh +tools/crate-publish-checks.py +tools/find-publish-list.py +tools/merge-docker-images.sh +tools/update-test-snapshots.sh