Skip to content

Conversation

@bfops
Copy link
Collaborator

@bfops bfops commented Aug 19, 2025

Description of Changes

I'm moving crates/sdk to sdks/rust to be more in line with where the rest of our SDKs are listed. I updated the corresponding paths etc. that pointed to the previous location.

This PR is based on #3185, because if we merge this without that, our release scripts will be broken.

API and ABI breaking changes

None

Expected complexity level and risk

1

Testing

  • Existing CI passes

@bfops bfops linked an issue Aug 20, 2025 that may be closed by this pull request
…xible-publish-scripts' into bfops/move-rust-sdk
@bfops bfops changed the base branch from master to bfops/flexible-publish-scripts August 20, 2025 17:23
@bfops bfops marked this pull request as ready for review August 20, 2025 17:47
@bfops bfops requested a review from gefjon as a code owner August 20, 2025 17:47
github-merge-queue bot pushed a commit that referenced this pull request Aug 20, 2025
# Description of Changes

I updated `tools/publish-crates.sh` and `tools/find-publish-list.py` to
be more flexible to where our crates can be located (rather than
hardcoding `crates/foo`). This is in preparation for
#3181.

Now, `find-publish-list.py` loads the output of `cargo metadata` to
dynamically find the path of the crate in question. This also allows us
to "properly" determine which crates are ours, instead of the
`spacetimedb-` string prefix check that we were doing before.

It also now supports `--directories` to output directory paths, rather
than just crate names. `publish-crates.sh` now uses those output paths
rather than assuming that it knows where to find crates.

As a bonus, this approach is also much faster (~0.3s to find the crate
list, vs ~8 before to load and process all the tomls).

# API and ABI breaking changes

None

# Expected complexity level and risk

2

# Testing

- [x] `find-publish-list.py` lists the same crates before and after:
```bash
$ ( git checkout master && python3 tools/find-publish-list.py --recursive --quiet bindings sdk cli standalone > before.txt )

$ ( git checkout bfops/flexible-publish-scripts && python3 tools/find-publish-list.py --recursive --quiet spacetimedb spacetimedb-sdk spacetimedb-cli spacetimedb-standalone > after.txt )

# the new script prints out crate names rather than directory names, so we need to tweak a bit
$ diff -U2 before.txt <(cat after.txt | sed 's/^spacetimedb-//' | sed 's/^spacetimedb$/bindings/')
--- before.txt	2025-08-20 10:18:07.323217870 -0700
+++ /dev/fd/63	2025-08-20 10:35:38.344074842 -0700
@@ -8,17 +8,17 @@
 data-structures
 schema
-table
-expr
-physical-plan
 paths
 fs-utils
 commitlog
+table
 durability
-execution
+expr
+physical-plan
 snapshot
+execution
 client-api-messages
 query
-subscription
 vm
+subscription
 datastore
 auth
```
Some lines are reordered because we find dependencies via metadata
instead of toml now - I spot-checked some of the moved lines to see
whether they were in an invalid place, and I did not find any evidence
of that.

- [x] `--directories` flag prints correct directories instead of names
```bash
$ python3 tools/find-publish-list.py --directories --quiet --recursive spacetimedb-sdk
/home/lead/work/clockwork-localhd/SpacetimeDBPrivate/public/crates/memory-usage/Cargo.toml
/home/lead/work/clockwork-localhd/SpacetimeDBPrivate/public/crates/primitives/Cargo.toml
/home/lead/work/clockwork-localhd/SpacetimeDBPrivate/public/crates/metrics/Cargo.toml
/home/lead/work/clockwork-localhd/SpacetimeDBPrivate/public/crates/bindings-macro/Cargo.toml
/home/lead/work/clockwork-localhd/SpacetimeDBPrivate/public/crates/sats/Cargo.toml
/home/lead/work/clockwork-localhd/SpacetimeDBPrivate/public/crates/lib/Cargo.toml
/home/lead/work/clockwork-localhd/SpacetimeDBPrivate/public/crates/client-api-messages/Cargo.toml
/home/lead/work/clockwork-localhd/SpacetimeDBPrivate/public/crates/data-structures/Cargo.toml
/home/lead/work/clockwork-localhd/SpacetimeDBPrivate/public/crates/sdk/Cargo.toml
```

---------

Co-authored-by: Zeke Foppa <bfops@users.noreply.github.com>
Base automatically changed from bfops/flexible-publish-scripts to master August 20, 2025 18:57
@bfops bfops added this pull request to the merge queue Aug 20, 2025
Merged via the queue into master with commit b6fdc6c Aug 20, 2025
24 of 25 checks passed
github-merge-queue bot pushed a commit that referenced this pull request Aug 21, 2025
# Description of Changes

We had weird caching issues in the C#/Unity testsuite. Somehow, they got
triggered only as of
#3181 merging, and I
have no idea why/how.

I've restored the `id` field of the checkout step (which is used by the
cache step), and this _seems_ to have fixed it.

# API and ABI breaking changes

None.

# Expected complexity level and risk

1

# Testing

- [x] It passes on this PR
- [x] It passes in a test PR that combines this change with
#3182

---------

Co-authored-by: Zeke Foppa <bfops@users.noreply.github.com>
@bfops bfops deleted the bfops/move-rust-sdk branch September 18, 2025 16:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Move crates/sdk to sdks/rust

3 participants