From 36c851de37ca23305fa284ca1fca72439e7fd169 Mon Sep 17 00:00:00 2001 From: Brandon Cook Date: Sat, 6 Jun 2026 16:43:57 +1000 Subject: [PATCH] release: run the version sync script in the changesets action MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit changesets/action was invoking 'npx changeset version' directly, skipping the package.json version script that syncs rust/Cargo.toml to the kit version — so the Version Packages PR bumped package.json without the crate, and the rust CI job's lockstep guard (correctly) fails it. Point the action at 'npm run version' so the Version Packages PR carries both. Co-Authored-By: Claude Opus 4.8 (1M context) --- .github/workflows/release.yml | 2 +- rust/src/lib.rs | 10 ++++++++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 7410994..48eb9f9 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -23,7 +23,7 @@ jobs: # the vX.Y.Z tag — and the tag triggers the GoReleaser workflow. - uses: changesets/action@v1 with: - version: npx changeset version + version: npm run version # changeset version + sync rust/Cargo.toml (lockstep) publish: npm run release env: # A PAT (contents:write + pull-requests:write on this repo) lets the diff --git a/rust/src/lib.rs b/rust/src/lib.rs index da97063..515d079 100644 --- a/rust/src/lib.rs +++ b/rust/src/lib.rs @@ -139,6 +139,16 @@ pub mod prelude { #[macro_export] macro_rules! shellcade_game { ($game:expr) => { + // Native builds (cargo test) have no exports, so the registration is + // surfaced as a doc-hidden pub fn instead: it type-checks the Game + // impl, roots the whole game for dead-code analysis, and hands tests + // a constructor. + #[cfg(not(target_arch = "wasm32"))] + #[doc(hidden)] + pub fn __shellcade_game() -> impl $crate::Game { + $game + } + #[cfg(target_arch = "wasm32")] const _: () = { ::std::thread_local! {