From 5a859224c1b3e3f9d8b34790039d9f00b7c60850 Mon Sep 17 00:00:00 2001 From: John Detter <4099508+jdetter@users.noreply.github.com> Date: Wed, 21 Jan 2026 11:24:12 -0600 Subject: [PATCH 01/18] Update the version upgrade tool --- tools/upgrade-version/src/main.rs | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/tools/upgrade-version/src/main.rs b/tools/upgrade-version/src/main.rs index 212f82e9fc4..66b1c40a207 100644 --- a/tools/upgrade-version/src/main.rs +++ b/tools/upgrade-version/src/main.rs @@ -184,7 +184,18 @@ fn main() -> anyhow::Result<()> { process_license_file("LICENSE.txt", &full_version); process_license_file("licenses/BSL.txt", &full_version); + println!("$> cargo check"); cmd!("cargo", "check").run().expect("Cargo check failed!"); + + println!("$> pnpm --dir templates/quickstart-chat-typescript generate"); + cmd!("pnpm", "--dir", "templates/quickstart-chat-typescript", "generate") + .run() + .expect("pnpm generate failed!"); + + println!("$> cargo test -p spacetimedb-codegen"); + cmd!("cargo", "test", "-p", "spacetimedb-codegen").run()?; + println!("$> cargo insta review"); + cmd!("cargo", "insta", "review").run()?; } if matches.get_flag("typescript") || matches.get_flag("all") { From beca5be7484efdbdc2381de50bdfb2a306876478 Mon Sep 17 00:00:00 2001 From: John Detter <4099508+jdetter@users.noreply.github.com> Date: Wed, 21 Jan 2026 11:31:12 -0600 Subject: [PATCH 02/18] Allow the user to just accept the insta snapshot change --- tools/upgrade-version/src/main.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tools/upgrade-version/src/main.rs b/tools/upgrade-version/src/main.rs index 66b1c40a207..e163e8ba2ee 100644 --- a/tools/upgrade-version/src/main.rs +++ b/tools/upgrade-version/src/main.rs @@ -192,8 +192,11 @@ fn main() -> anyhow::Result<()> { .run() .expect("pnpm generate failed!"); + // This gives an error because the snapshot has been updated println!("$> cargo test -p spacetimedb-codegen"); - cmd!("cargo", "test", "-p", "spacetimedb-codegen").run()?; + let _ = cmd!("cargo", "test", "-p", "spacetimedb-codegen").run(); + + // Let the user approve the snapshot change println!("$> cargo insta review"); cmd!("cargo", "insta", "review").run()?; } From 9d040e7c2d35dac9bf1b925df2195693e30b461b Mon Sep 17 00:00:00 2001 From: John Detter <4099508+jdetter@users.noreply.github.com> Date: Sat, 24 Jan 2026 05:13:10 -0600 Subject: [PATCH 03/18] Fix CI check --- .github/workflows/upgrade-version-check.yml | 2 +- tools/upgrade-version/src/main.rs | 18 +++++++++++++++--- 2 files changed, 16 insertions(+), 4 deletions(-) diff --git a/.github/workflows/upgrade-version-check.yml b/.github/workflows/upgrade-version-check.yml index 41f8f178573..3fbbb64cf93 100644 --- a/.github/workflows/upgrade-version-check.yml +++ b/.github/workflows/upgrade-version-check.yml @@ -16,7 +16,7 @@ jobs: - name: Checkout uses: actions/checkout@v3 - name: Verify that upgrade-version still works - run: cargo bump-versions 123.456.789 --rust-and-cli --csharp --typescript + run: cargo bump-versions 123.456.789 --rust-and-cli --csharp --typescript --accept-snapshots - name: Show diff run: git diff HEAD diff --git a/tools/upgrade-version/src/main.rs b/tools/upgrade-version/src/main.rs index e163e8ba2ee..dc9f2269bb2 100644 --- a/tools/upgrade-version/src/main.rs +++ b/tools/upgrade-version/src/main.rs @@ -127,6 +127,12 @@ fn main() -> anyhow::Result<()> { .help("Update all targets (equivalent to --typescript --rust-and-cli --csharp)") .conflicts_with_all(["typescript", "rust-and-cli", "csharp"]), ) + .arg( + Arg::new("accept-snapshots") + .long("accept-snapshots") + .action(clap::ArgAction::SetTrue) + .help("If there are snapshots to review automatically accept them all."), + ) .group( ArgGroup::new("update-targets") .args(["all", "typescript", "rust-and-cli", "csharp"]) @@ -196,9 +202,15 @@ fn main() -> anyhow::Result<()> { println!("$> cargo test -p spacetimedb-codegen"); let _ = cmd!("cargo", "test", "-p", "spacetimedb-codegen").run(); - // Let the user approve the snapshot change - println!("$> cargo insta review"); - cmd!("cargo", "insta", "review").run()?; + if matches.get_flag("accept-snapshots") { + // automatically accept the snapshot + println!("$> cargo insta accept"); + cmd!("cargo", "insta", "accept").run()?; + } else { + // Let the user manually approve the snapshot change + println!("$> cargo insta review"); + cmd!("cargo", "insta", "review").run()?; + } } if matches.get_flag("typescript") || matches.get_flag("all") { From 7d6ea9aff226ab4784bd3d9f8759aca6fa382582 Mon Sep 17 00:00:00 2001 From: John Detter <4099508+jdetter@users.noreply.github.com> Date: Sat, 24 Jan 2026 05:33:37 -0600 Subject: [PATCH 04/18] Run pnpm build as well --- tools/upgrade-version/src/main.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tools/upgrade-version/src/main.rs b/tools/upgrade-version/src/main.rs index dc9f2269bb2..5bd2a70ee22 100644 --- a/tools/upgrade-version/src/main.rs +++ b/tools/upgrade-version/src/main.rs @@ -193,6 +193,11 @@ fn main() -> anyhow::Result<()> { println!("$> cargo check"); cmd!("cargo", "check").run().expect("Cargo check failed!"); + println!("$> pnpm run build"); + cmd!("pnpm", "run", "build") + .run() + .expect("pnpm run build failed!"); + println!("$> pnpm --dir templates/quickstart-chat-typescript generate"); cmd!("pnpm", "--dir", "templates/quickstart-chat-typescript", "generate") .run() From 179ef5aaf4b0fb7878c370bc0c7c851fe37274b5 Mon Sep 17 00:00:00 2001 From: John Detter <4099508+jdetter@users.noreply.github.com> Date: Sat, 24 Jan 2026 14:23:21 -0600 Subject: [PATCH 05/18] Also pnpm install --- tools/upgrade-version/src/main.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tools/upgrade-version/src/main.rs b/tools/upgrade-version/src/main.rs index 79377105bca..3d2f05e481b 100644 --- a/tools/upgrade-version/src/main.rs +++ b/tools/upgrade-version/src/main.rs @@ -193,6 +193,11 @@ fn main() -> anyhow::Result<()> { println!("$> cargo check"); cmd!("cargo", "check").run().expect("Cargo check failed!"); + println!("$> pnpm install"); + cmd!("pnpm", "install") + .run() + .expect("pnpm run build failed!"); + println!("$> pnpm run build"); cmd!("pnpm", "run", "build") .run() From 47ce799e98a4b44394db2a3d77862eada3415b0d Mon Sep 17 00:00:00 2001 From: John Detter <4099508+jdetter@users.noreply.github.com> Date: Sat, 24 Jan 2026 14:35:16 -0600 Subject: [PATCH 06/18] Small fix from template rename --- tools/upgrade-version/src/main.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/upgrade-version/src/main.rs b/tools/upgrade-version/src/main.rs index 3d2f05e481b..6cafaeba9be 100644 --- a/tools/upgrade-version/src/main.rs +++ b/tools/upgrade-version/src/main.rs @@ -203,8 +203,8 @@ fn main() -> anyhow::Result<()> { .run() .expect("pnpm run build failed!"); - println!("$> pnpm --dir templates/quickstart-chat-typescript generate"); - cmd!("pnpm", "--dir", "templates/quickstart-chat-typescript", "generate") + println!("$> pnpm --dir templates/chat-react-ts generate"); + cmd!("pnpm", "--dir", "templates/chat-react-ts", "generate") .run() .expect("pnpm generate failed!"); From 89ce89caf090449db2ed83ed1ac2a6235e450a7b Mon Sep 17 00:00:00 2001 From: John Detter <4099508+jdetter@users.noreply.github.com> Date: Sat, 24 Jan 2026 14:37:53 -0600 Subject: [PATCH 07/18] Install npm/pnpm in workflow --- .github/workflows/upgrade-version-check.yml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.github/workflows/upgrade-version-check.yml b/.github/workflows/upgrade-version-check.yml index 3fbbb64cf93..849657047d4 100644 --- a/.github/workflows/upgrade-version-check.yml +++ b/.github/workflows/upgrade-version-check.yml @@ -15,6 +15,14 @@ jobs: steps: - name: Checkout uses: actions/checkout@v3 + # pnpm is required for regenerating the typescript bindings + - name: Set up Node.js + uses: actions/setup-node@v4 + with: + node-version: 18 + - uses: pnpm/action-setup@v4 + with: + run_install: true - name: Verify that upgrade-version still works run: cargo bump-versions 123.456.789 --rust-and-cli --csharp --typescript --accept-snapshots - name: Show diff From be961a0307af5c823e03e0565673f6c1cf897aa4 Mon Sep 17 00:00:00 2001 From: John Detter <4099508+jdetter@users.noreply.github.com> Date: Sat, 24 Jan 2026 14:42:26 -0600 Subject: [PATCH 08/18] Upgrade npm version --- .github/workflows/upgrade-version-check.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/upgrade-version-check.yml b/.github/workflows/upgrade-version-check.yml index 849657047d4..f6abff297e5 100644 --- a/.github/workflows/upgrade-version-check.yml +++ b/.github/workflows/upgrade-version-check.yml @@ -19,7 +19,7 @@ jobs: - name: Set up Node.js uses: actions/setup-node@v4 with: - node-version: 18 + node-version: 20 - uses: pnpm/action-setup@v4 with: run_install: true From 6a8b3001c5a09bc03388a17057082059057574af Mon Sep 17 00:00:00 2001 From: John Detter <4099508+jdetter@users.noreply.github.com> Date: Sat, 24 Jan 2026 14:47:14 -0600 Subject: [PATCH 09/18] Test after accepting new snapshot --- tools/upgrade-version/src/main.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tools/upgrade-version/src/main.rs b/tools/upgrade-version/src/main.rs index 6cafaeba9be..f969d6d0b87 100644 --- a/tools/upgrade-version/src/main.rs +++ b/tools/upgrade-version/src/main.rs @@ -208,10 +208,6 @@ fn main() -> anyhow::Result<()> { .run() .expect("pnpm generate failed!"); - // This gives an error because the snapshot has been updated - println!("$> cargo test -p spacetimedb-codegen"); - let _ = cmd!("cargo", "test", "-p", "spacetimedb-codegen").run(); - if matches.get_flag("accept-snapshots") { // automatically accept the snapshot println!("$> cargo insta accept"); @@ -221,6 +217,10 @@ fn main() -> anyhow::Result<()> { println!("$> cargo insta review"); cmd!("cargo", "insta", "review").run()?; } + + // This gives an error because the snapshot has been updated + println!("$> cargo test -p spacetimedb-codegen"); + let _ = cmd!("cargo", "test", "-p", "spacetimedb-codegen").run(); } if matches.get_flag("typescript") || matches.get_flag("all") { From 3ade9ed84796c41a1ef3a3053b6c3ab44c4c5fe7 Mon Sep 17 00:00:00 2001 From: John Detter <4099508+jdetter@users.noreply.github.com> Date: Sat, 24 Jan 2026 14:51:31 -0600 Subject: [PATCH 10/18] cargo fmt --- tools/upgrade-version/src/main.rs | 27 +++++++++++++++++---------- 1 file changed, 17 insertions(+), 10 deletions(-) diff --git a/tools/upgrade-version/src/main.rs b/tools/upgrade-version/src/main.rs index f969d6d0b87..065f1c74032 100644 --- a/tools/upgrade-version/src/main.rs +++ b/tools/upgrade-version/src/main.rs @@ -194,33 +194,40 @@ fn main() -> anyhow::Result<()> { cmd!("cargo", "check").run().expect("Cargo check failed!"); println!("$> pnpm install"); - cmd!("pnpm", "install") - .run() - .expect("pnpm run build failed!"); + cmd!("pnpm", "install").run().expect("pnpm run build failed!"); println!("$> pnpm run build"); - cmd!("pnpm", "run", "build") - .run() - .expect("pnpm run build failed!"); - + cmd!("pnpm", "run", "build").run().expect("pnpm run build failed!"); + println!("$> pnpm --dir templates/chat-react-ts generate"); cmd!("pnpm", "--dir", "templates/chat-react-ts", "generate") .run() .expect("pnpm generate failed!"); + println!("$> cargo install cargo-insta"); + cmd!("cargo", "install", "cargo-insta") + .run() + .expect("cargo install cargo-insta failed!"); + if matches.get_flag("accept-snapshots") { // automatically accept the snapshot println!("$> cargo insta accept"); - cmd!("cargo", "insta", "accept").run()?; + cmd!("cargo", "insta", "accept") + .run() + .expect("cargo insta accept failed!"); } else { // Let the user manually approve the snapshot change println!("$> cargo insta review"); - cmd!("cargo", "insta", "review").run()?; + cmd!("cargo", "insta", "review") + .run() + .expect("cargo insta review failed!"); } // This gives an error because the snapshot has been updated println!("$> cargo test -p spacetimedb-codegen"); - let _ = cmd!("cargo", "test", "-p", "spacetimedb-codegen").run(); + cmd!("cargo", "test", "-p", "spacetimedb-codegen") + .run() + .expect("cargo test -p spacetimedb-codegen failed!"); } if matches.get_flag("typescript") || matches.get_flag("all") { From 43504e41d1af232c91c97eda3779df62726558f7 Mon Sep 17 00:00:00 2001 From: John Detter <4099508+jdetter@users.noreply.github.com> Date: Sat, 24 Jan 2026 15:06:22 -0600 Subject: [PATCH 11/18] One more fix --- tools/upgrade-version/src/main.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/tools/upgrade-version/src/main.rs b/tools/upgrade-version/src/main.rs index 065f1c74032..bdc82ef8478 100644 --- a/tools/upgrade-version/src/main.rs +++ b/tools/upgrade-version/src/main.rs @@ -209,6 +209,10 @@ fn main() -> anyhow::Result<()> { .run() .expect("cargo install cargo-insta failed!"); + // This gives an error because the snapshot will be updated during the test + println!("$> cargo test -p spacetimedb-codegen (expected to fail)"); + let _ = cmd!("cargo", "test", "-p", "spacetimedb-codegen").run(); + if matches.get_flag("accept-snapshots") { // automatically accept the snapshot println!("$> cargo insta accept"); @@ -223,7 +227,7 @@ fn main() -> anyhow::Result<()> { .expect("cargo insta review failed!"); } - // This gives an error because the snapshot has been updated + // This should now pass println!("$> cargo test -p spacetimedb-codegen"); cmd!("cargo", "test", "-p", "spacetimedb-codegen") .run() From 2804fdc8fd2add4ee70558ead99fc18321f3c292 Mon Sep 17 00:00:00 2001 From: John Detter <4099508+jdetter@users.noreply.github.com> Date: Sat, 24 Jan 2026 15:10:22 -0600 Subject: [PATCH 12/18] cargo fmt --- tools/upgrade-version/src/main.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/upgrade-version/src/main.rs b/tools/upgrade-version/src/main.rs index bdc82ef8478..876ad503e8f 100644 --- a/tools/upgrade-version/src/main.rs +++ b/tools/upgrade-version/src/main.rs @@ -212,7 +212,7 @@ fn main() -> anyhow::Result<()> { // This gives an error because the snapshot will be updated during the test println!("$> cargo test -p spacetimedb-codegen (expected to fail)"); let _ = cmd!("cargo", "test", "-p", "spacetimedb-codegen").run(); - + if matches.get_flag("accept-snapshots") { // automatically accept the snapshot println!("$> cargo insta accept"); From e44fa54236cb52dae8173dce82a3ec5109e512b8 Mon Sep 17 00:00:00 2001 From: John Detter <4099508+jdetter@users.noreply.github.com> Date: Sat, 24 Jan 2026 19:28:30 -0600 Subject: [PATCH 13/18] Small fix for CI --- tools/upgrade-version/src/main.rs | 31 +++++++++++++++---------------- 1 file changed, 15 insertions(+), 16 deletions(-) diff --git a/tools/upgrade-version/src/main.rs b/tools/upgrade-version/src/main.rs index 876ad503e8f..b1b7247631e 100644 --- a/tools/upgrade-version/src/main.rs +++ b/tools/upgrade-version/src/main.rs @@ -209,23 +209,22 @@ fn main() -> anyhow::Result<()> { .run() .expect("cargo install cargo-insta failed!"); - // This gives an error because the snapshot will be updated during the test - println!("$> cargo test -p spacetimedb-codegen (expected to fail)"); - let _ = cmd!("cargo", "test", "-p", "spacetimedb-codegen").run(); - - if matches.get_flag("accept-snapshots") { - // automatically accept the snapshot - println!("$> cargo insta accept"); - cmd!("cargo", "insta", "accept") - .run() - .expect("cargo insta accept failed!"); + println!("$> INSTA_UPDATE=always cargo test -p spacetimedb-codegen --test codegen"); + cmd!("cargo", "test", "-p", "spacetimedb-codegen", "--test", "codegen") + .env("INSTA_UPDATE", "always") + .run() + .expect("cargo test -p spacetimedb-codegen --test codegen (INSTA_UPDATE=always) failed!"); + + + let insta_command = if matches.get_flag("accept-snapshots") { + "accept" } else { - // Let the user manually approve the snapshot change - println!("$> cargo insta review"); - cmd!("cargo", "insta", "review") - .run() - .expect("cargo insta review failed!"); - } + "review" + }; + println!("$> cargo insta {}", insta_command); + cmd!("cargo", "insta", insta_command) + .run() + .expect(format!("cargo insta {} failed!", insta_command).as_str()); // This should now pass println!("$> cargo test -p spacetimedb-codegen"); From ac9b4946a05bf04d6be07165c49fd7ee95f92d22 Mon Sep 17 00:00:00 2001 From: John Detter <4099508+jdetter@users.noreply.github.com> Date: Sat, 24 Jan 2026 19:42:02 -0600 Subject: [PATCH 14/18] Cleanup --- tools/upgrade-version/src/main.rs | 51 +++++++++++++++---------------- 1 file changed, 25 insertions(+), 26 deletions(-) diff --git a/tools/upgrade-version/src/main.rs b/tools/upgrade-version/src/main.rs index b1b7247631e..3165894daed 100644 --- a/tools/upgrade-version/src/main.rs +++ b/tools/upgrade-version/src/main.rs @@ -204,33 +204,32 @@ fn main() -> anyhow::Result<()> { .run() .expect("pnpm generate failed!"); - println!("$> cargo install cargo-insta"); - cmd!("cargo", "install", "cargo-insta") - .run() - .expect("cargo install cargo-insta failed!"); - - println!("$> INSTA_UPDATE=always cargo test -p spacetimedb-codegen --test codegen"); - cmd!("cargo", "test", "-p", "spacetimedb-codegen", "--test", "codegen") - .env("INSTA_UPDATE", "always") - .run() - .expect("cargo test -p spacetimedb-codegen --test codegen (INSTA_UPDATE=always) failed!"); - - - let insta_command = if matches.get_flag("accept-snapshots") { - "accept" + if matches.get_flag("accept_snapshots") { + // Generate and auto-accept snapshots + println!("$> INSTA_UPDATE=always cargo test -p spacetimedb-codegen --test codegen"); + cmd!("cargo", "test", "-p", "spacetimedb-codegen", "--test", "codegen") + .env("INSTA_UPDATE", "always") + .run() + .expect("cargo test -p spacetimedb-codegen --test codegen (INSTA_UPDATE=always) failed!"); } else { - "review" - }; - println!("$> cargo insta {}", insta_command); - cmd!("cargo", "insta", insta_command) - .run() - .expect(format!("cargo insta {} failed!", insta_command).as_str()); - - // This should now pass - println!("$> cargo test -p spacetimedb-codegen"); - cmd!("cargo", "test", "-p", "spacetimedb-codegen") - .run() - .expect("cargo test -p spacetimedb-codegen failed!"); + // Initial test - this will generate snapshots + println!("$> cargo test -p spacetimedb-codegen --test codegen"); + cmd!("cargo", "test", "-p", "spacetimedb-codegen", "--test", "codegen") + .run() + .expect("cargo test -p spacetimedb-codegen --test codegen failed!"); + + // Review the new snapshots + println!("$> cargo insta review"); + cmd!("cargo", "insta", "review") + .run() + .expect("cargo insta review failed!"); + + // Test again now that the user has had a chance to accept the snapshots + println!("$> cargo test -p spacetimedb-codegen --test codegen"); + cmd!("cargo", "test", "-p", "spacetimedb-codegen", "--test", "codegen") + .run() + .expect("cargo test -p spacetimedb-codegen --test codegen failed!"); + } } if matches.get_flag("typescript") || matches.get_flag("all") { From ea0b07c52ff4fbd7287ba00ecfe81a7e804143ba Mon Sep 17 00:00:00 2001 From: John Detter <4099508+jdetter@users.noreply.github.com> Date: Sat, 24 Jan 2026 19:53:59 -0600 Subject: [PATCH 15/18] Small bug fix --- tools/upgrade-version/src/main.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/upgrade-version/src/main.rs b/tools/upgrade-version/src/main.rs index 3165894daed..11ddeda256d 100644 --- a/tools/upgrade-version/src/main.rs +++ b/tools/upgrade-version/src/main.rs @@ -204,7 +204,7 @@ fn main() -> anyhow::Result<()> { .run() .expect("pnpm generate failed!"); - if matches.get_flag("accept_snapshots") { + if matches.get_flag("accept-snapshots") { // Generate and auto-accept snapshots println!("$> INSTA_UPDATE=always cargo test -p spacetimedb-codegen --test codegen"); cmd!("cargo", "test", "-p", "spacetimedb-codegen", "--test", "codegen") From 8009ae912e1b0496e7ace3896fef9fd8ac535657 Mon Sep 17 00:00:00 2001 From: John Detter <4099508+jdetter@users.noreply.github.com> Date: Sat, 24 Jan 2026 20:04:13 -0600 Subject: [PATCH 16/18] Install cargo insta when a review is required --- tools/upgrade-version/src/main.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tools/upgrade-version/src/main.rs b/tools/upgrade-version/src/main.rs index 11ddeda256d..c9018f117f0 100644 --- a/tools/upgrade-version/src/main.rs +++ b/tools/upgrade-version/src/main.rs @@ -212,6 +212,11 @@ fn main() -> anyhow::Result<()> { .run() .expect("cargo test -p spacetimedb-codegen --test codegen (INSTA_UPDATE=always) failed!"); } else { + println!("$> cargo install cargo-insta"); + cmd!("cargo", "install", "cargo-insta") + .run() + .expect("cargo install cargo-insta failed!"); + // Initial test - this will generate snapshots println!("$> cargo test -p spacetimedb-codegen --test codegen"); cmd!("cargo", "test", "-p", "spacetimedb-codegen", "--test", "codegen") From e09974f4bcf525ab825e63db058a04c0799f520c Mon Sep 17 00:00:00 2001 From: John Detter <4099508+jdetter@users.noreply.github.com> Date: Sat, 24 Jan 2026 20:11:12 -0600 Subject: [PATCH 17/18] When review is required, the first pass of tests is expected to fail --- tools/upgrade-version/src/main.rs | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/tools/upgrade-version/src/main.rs b/tools/upgrade-version/src/main.rs index c9018f117f0..c5a28785ecf 100644 --- a/tools/upgrade-version/src/main.rs +++ b/tools/upgrade-version/src/main.rs @@ -217,11 +217,10 @@ fn main() -> anyhow::Result<()> { .run() .expect("cargo install cargo-insta failed!"); - // Initial test - this will generate snapshots + // Initial test - this will generate snapshots. This is expected to fail. println!("$> cargo test -p spacetimedb-codegen --test codegen"); - cmd!("cargo", "test", "-p", "spacetimedb-codegen", "--test", "codegen") - .run() - .expect("cargo test -p spacetimedb-codegen --test codegen failed!"); + let _ = cmd!("cargo", "test", "-p", "spacetimedb-codegen", "--test", "codegen") + .run(); // Review the new snapshots println!("$> cargo insta review"); From 4a6228fec73c9fefa0ee32ceebf06c91933453ab Mon Sep 17 00:00:00 2001 From: John Detter <4099508+jdetter@users.noreply.github.com> Date: Sat, 24 Jan 2026 20:15:11 -0600 Subject: [PATCH 18/18] Fix lints --- tools/upgrade-version/src/main.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/tools/upgrade-version/src/main.rs b/tools/upgrade-version/src/main.rs index c5a28785ecf..c9a02732ce8 100644 --- a/tools/upgrade-version/src/main.rs +++ b/tools/upgrade-version/src/main.rs @@ -219,8 +219,7 @@ fn main() -> anyhow::Result<()> { // Initial test - this will generate snapshots. This is expected to fail. println!("$> cargo test -p spacetimedb-codegen --test codegen"); - let _ = cmd!("cargo", "test", "-p", "spacetimedb-codegen", "--test", "codegen") - .run(); + let _ = cmd!("cargo", "test", "-p", "spacetimedb-codegen", "--test", "codegen").run(); // Review the new snapshots println!("$> cargo insta review");