Commit Graph

82 Commits

Author SHA1 Message Date
Tyler Cloutier 45498b6f1a Merge branch 'master' into tyler/translate-smoketests
Signed-off-by: Tyler Cloutier <cloutiertyler@users.noreply.github.com>
2026-01-27 17:12:28 -05:00
Tyler Cloutier 504b13ba4a Small docs improvement (#4071)
# Description of Changes

  Two documentation improvements:

1. **Reducers documentation**: Clarified that using global/static
variables in reducers is **undefined behavior**, not just "values won't
persist". Added six specific reasons why this is undefined:
     - Fresh execution environments
     - Module updates
     - Concurrent execution
     - Crash recovery
     - Non-transactional updates
     - Replay safety

2. **Access permissions documentation**: Replaced the "Combining Both
Techniques" example that used indexes on Option fields (which
SpacetimeDB doesn't support) with a working example that filters by a
required `department` field instead.

  # API and ABI breaking changes

  None. Documentation only.

  # Expected complexity level and risk

  1 - Documentation changes only.

  # Testing

  - [ ] Verify the reducers warning is clear and accurate
  - [ ] Verify the access permissions example compiles and makes sense

---------

Signed-off-by: Tyler Cloutier <cloutiertyler@users.noreply.github.com>
Co-authored-by: clockwork-labs-bot <clockwork-labs-bot@users.noreply.github.com>
Co-authored-by: John Detter <4099508+jdetter@users.noreply.github.com>
Co-authored-by: Zeke Foppa <bfops@users.noreply.github.com>
2026-01-27 21:37:11 +00:00
Tyler Cloutier 8fe5ac5d28 cargo fmt 2026-01-27 09:24:10 -05:00
Tyler Cloutier 73d2209139 Exclude smoketests from cargo ci test
Smoketests require pre-built binaries and have their own dedicated
command (cargo ci smoketests) that builds binaries first. Exclude
them from cargo test --all to prevent failures in CI.
2026-01-27 09:17:55 -05:00
Tyler Cloutier add5eff3be Merge branch 'master' into tyler/translate-smoketests 2026-01-26 23:28:46 -05:00
Tyler Cloutier 42f679e612 Add remote server support to Rust smoketests
Enable running Rust smoketests against a remote server instead of
spawning local servers, similar to Python smoketests --remote-server.

- Add SPACETIME_REMOTE_SERVER env var support to skip local server spawn
- Add --server CLI option to cargo smoketest
- Add skip_if_remote!() macro for tests requiring local server control
- Mark restart tests with skip_if_remote!() since they need local server
2026-01-26 23:27:18 -05:00
John Detter 7e202db606 Fix the upgrade version tool (#4085)
# Description of Changes

<!-- Please describe your change, mention any related tickets, and so on
here. -->

This fixes 2 issues with the upgrade version tool:
1. The typescript bindings need to be updated otherwise the typescript
test in CI will fail
2. The snapshots need to be updated

When the version upgrade tool check in CI runs, snapshot changes are
accepted automatically via the `--accept-snapshots` cli argument. When
you are running this tool locally without `--accept-snapshots` you will
be asked to manually review the snapshot changes before doing a final
test to make sure the snapshots are correct.

# API and ABI breaking changes

<!-- If this is an API or ABI breaking change, please apply the
corresponding GitHub label. -->

None

# Expected complexity level and risk

1 - this just updates the version upgrade tool

<!--
How complicated do you think these changes are? Grade on a scale from 1
to 5,
where 1 is a trivial change, and 5 is a deep-reaching and complex
change.

This complexity rating applies not only to the complexity apparent in
the diff,
but also to its interactions with existing and future code.

If you answered more than a 2, explain what is complex about the PR,
and what other components it interacts with in potentially concerning
ways. -->

# Testing

<!-- Describe any testing you've done, and any testing you'd like your
reviewers to do,
so that you're confident that all the changes work as expected! -->

- [x] Version bump 1.12.0 worked:
https://github.com/clockworklabs/SpacetimeDB/pull/4084
- [x] CI passes

---------

Signed-off-by: John Detter <4099508+jdetter@users.noreply.github.com>
Co-authored-by: Zeke Foppa <196249+bfops@users.noreply.github.com>
2026-01-27 03:28:10 +00:00
Tyler Cloutier 363f9212aa Add Rust smoketests to CI with nextest, keep Python smoketests running
- Rename existing smoketests job to use cargo smoketest (xtask) which
  handles pre-building binaries, using nextest, and optimal parallelism
- Add cargo-nextest installation step for better parallel execution
- Add new "Smoketests (Python Legacy)" job that runs the old Python
  smoketests alongside the Rust ones for comparison during transition
- Add warn-python-smoketests job that posts a PR comment when Python
  smoketests are modified, encouraging use of Rust smoketests instead
- Update smoketests/README.md to note the transition to Rust smoketests
2026-01-26 12:46:41 -05:00
Tyler Cloutier 9b47a1b554 Fix lint 2026-01-26 12:35:33 -05:00
Tyler Cloutier db95efd38c Ran cargo fmt 2026-01-25 21:27:37 -05:00
= 4ad3112716 Switch smoketests to release mode and remove redundant warmup
- Build CLI/standalone in release mode for faster test execution
- Run tests in release mode (faster SpacetimeDB server)
- Remove redundant WASM cache warmup (precompiled modules already warm it)
- Increase default parallelism to 16 (optimal based on benchmarks)

This reduces fresh build time by ~16 seconds and test execution
time by ~5x compared to debug mode.
2026-01-25 21:17:03 -05:00
= 5a8107f633 Add precompiled WASM modules for smoketests
Extract static smoketest modules into a nested workspace at
crates/smoketests/modules/ that is pre-compiled during warmup.
This eliminates per-test WASM compilation overhead.

Key changes:
- Add 38 precompiled module crates in nested workspace
- Add module registry (src/modules.rs) for WASM path lookup
- Add precompiled_module() builder and use_precompiled_module() method
- Update xtask warmup to build nested workspace
- Migrate all static tests to use precompiled modules
- Tests using precompiled modules run in ~0.5-3s vs ~4-7s before

Tests that need runtime compilation (auto_migration, detect_wasm_bindgen,
intentionally-broken modules) continue to use module_code().
2026-01-25 21:17:03 -05:00
= 4e7fee21e7 Add WASM cache warmup and optimize parallel smoketest execution
- Add warmup_wasm_cache() to pre-compile dependencies before tests run
- Use shared target directory for all tests to reuse compiled deps
- Limit parallelism to 8 jobs to reduce cargo lock contention
- Add --no-fail-fast to run all tests even if some fail

Results: 329s total (vs 378s before), 13 slow tests (vs 35 before)
2026-01-25 21:17:03 -05:00
= 87f318c4bc Add shared target directory for faster parallel smoketests
- Rename tools/xtask to tools/xtask-smoketest
- Add USE_SHARED_TARGET_DIR flag to control caching behavior
- When true: tests share target/smoketest-modules/ and global CARGO_HOME
- When false: each test gets isolated CARGO_HOME (no sharing)
- Shared mode is 1.68x faster (378s vs 636s for all tests)
- Add detailed build timing instrumentation
2026-01-25 21:17:03 -05:00
Tyler Cloutier 147f273053 Merge branch 'master' into tyler/translate-smoketests 2026-01-23 16:46:48 -05:00
Zeke Foppa ed2735e11d [tyler/translate-smoketests]: fix build 2026-01-23 10:40:36 -08:00
Zeke Foppa 95308f2797 [tyler/translate-smoketests]: update ci stuff 2026-01-23 10:39:52 -08:00
Piotr Sarnacki cd1ec90d16 Templates naming standarization (#4042)
# Description of Changes

This PR renames the templates to always use shorthand for the language,
specify a framework (or console) if necessary, and shorten the naming in
general

# Expected complexity level and risk

1

# Testing

I've tested generating templates manually

---------

Co-authored-by: clockwork-labs-bot <clockwork-labs-bot@users.noreply.github.com>
2026-01-23 16:08:23 +00:00
John Detter d8d63e2d29 Reduce Test Suite test concurrency to reduce test flakes (#3979)
# Description of Changes

<!-- Please describe your change, mention any related tickets, and so on
here. -->

This PR started as an experiment to see if restricting the amount of
test job threads would reduce the flakiness in the `Test Suite` CI job.
I have tested several values here (`1`, `2` and `10`) and I believe 2 is
very stable. I'm also very confused with this change because it seems
like somehow the `Test Suite` CI job is now faster than it was before:

Before:

<img width="502" height="57" alt="image"
src="https://github.com/user-attachments/assets/d944041c-8ccc-4382-a8a7-06e7ff5cba12"
/>

After:

<img width="481" height="46" alt="image"
src="https://github.com/user-attachments/assets/49b89143-b201-4a1a-820c-13e5b3feda76"
/>

It's possible that having less test threads means less cpu contention on
the github runners, but I'm not completely sure. It could also somehow
be less lock contention in SpacetimeDB. I have looked at the output of
the `Test Suite` job and it does appear that all tests are running.

# API and ABI breaking changes

<!-- If this is an API or ABI breaking change, please apply the
corresponding GitHub label. -->

None

# Expected complexity level and risk

0 - this only updates our workflow and has no impact on the code.

<!--
How complicated do you think these changes are? Grade on a scale from 1
to 5,
where 1 is a trivial change, and 5 is a deep-reaching and complex
change.

This complexity rating applies not only to the complexity apparent in
the diff,
but also to its interactions with existing and future code.

If you answered more than a 2, explain what is complex about the PR,
and what other components it interacts with in potentially concerning
ways. -->

# Testing

<!-- Describe any testing you've done, and any testing you'd like your
reviewers to do,
so that you're confident that all the changes work as expected! -->

- [x] CI is passing and `Test Suite` is less flakey

---------

Signed-off-by: John Detter <4099508+jdetter@users.noreply.github.com>
2026-01-23 10:30:57 +00:00
Ryan 1fd3394972 Add cargo ci dlls command for building C# DLLs and NuGet packages (#4033)
# Description of Changes
* Added a new `cargo ci dlls` subcommand to build/pack the in-repo C#
NuGet packages and the C# SDK.
* `cargo ci dlls` restores `sdks/csharp/SpacetimeDB.ClientSDK.csproj`
using the freshly built local package outputs as to populate
`sdks/csharp/packages/**`.
* Added a Unity `.meta` skeleton under
`sdks/csharp/unity-meta-skeleton~/**` and overlays those `.meta` files
onto the latest restored versioned package directory to keep Unity GUIDs
stable and import settings consistent.
* Unity-specific import fixes are captured in the skeleton overlay
(notably: preventing Unity from importing incompatible TFMs like
`net8.0`, and marking analyzer DLLs with the `RoslynAnalyzer` label so
Unity can recognize them).
# How to use (local)
```bash
# Build/pack + restore local packages into sdks/csharp/packages/**
cargo ci dlls
```
# API and ABI breaking changes
N/A
# Expected complexity level and risk
2 - Local developer tooling + file overlay into restore output; no
runtime/SDK API behavior changes.
# Testing
- [x] `cargo check -p ci`
- [x] Ran `cargo ci dlls` and verified the output under
`sdks/csharp/packages/**` and the various NuGet package locations.
- [x] Tested a Unity project importing the SpacetimeDB SDK after
generating output and confirmed no errors.

---------

Signed-off-by: Ryan <r.ekhoff@clockworklabs.io>
Co-authored-by: Zeke Foppa <196249+bfops@users.noreply.github.com>
Co-authored-by: John Detter <4099508+jdetter@users.noreply.github.com>
2026-01-22 18:26:55 +00:00
Tyler Cloutier 3b9497e318 Empty commit basically (#4088)
Empty commit to fix llm benchmark.

---------

Co-authored-by: clockwork-labs-bot <clockwork-labs-bot@users.noreply.github.com>
2026-01-21 20:41:38 -05:00
Tyler Cloutier b5a7b37660 Fixes C# benchmark test failures caused by table naming convention mismatches (#4059)
# Description of Changes

Adds TypeScript as a third language for LLM benchmark tests alongside
Rust and C#, and fixes table naming convention mismatches.

  **TypeScript Support:**
  - Added `Lang::TypeScript` variant with camelCase naming conventions
- Created TypeScript project template (`templates/typescript/server/`)
with package.json, tsconfig.json, and index.ts
- Added TypeScript publisher that uses `spacetime build` and `spacetime
publish`
- Created 22 TypeScript task prompts and golden answer files for all
benchmark tests
  - Updated prompt discovery to find `tasks/typescript.txt` files

  **Table Naming Fix:**
  - Standardized on singular table names across all languages:
    - Rust: `user` (snake_case singular)
    - C#: `User` (PascalCase singular)  
    - TypeScript: `user` (camelCase singular)
- Updated `table_name()` helper to convert singular names to appropriate
case per language
- Updated all spec.rs files to use `table_name("user", lang)` instead of
hardcoded `"users"`

  **CI/Hashing Improvements:**
- Added `compute_processed_context_hash()` for language-specific hash
computation after tab filtering
- Updated CI check to verify both `rustdoc_json` and `docs` modes for
Rust
  - Fixed `--hash-only` mode to skip golden builds

  # API and ABI breaking changes

  None - these are internal benchmark tooling changes only.

  # Expected complexity level and risk

  **Complexity: 2**

The changes add a new language following existing patterns for Rust and
C#. The table naming fixes are straightforward find-and-replace style
updates. Low risk since this only affects the benchmark tooling, not the
core SpacetimeDB codebase.

  # Testing

  - [x] `cargo build -p xtask-llm-benchmark` compiles successfully
  - [x] All 22 TypeScript golden modules build and publish successfully
  - [x] Rust and C# benchmarks unaffected by changes

---------

Signed-off-by: Tyler Cloutier <cloutiertyler@users.noreply.github.com>
Co-authored-by: clockwork-labs-bot <clockwork-labs-bot@users.noreply.github.com>
Co-authored-by: John Detter <4099508+jdetter@users.noreply.github.com>
2026-01-21 03:51:33 +00:00
Boegie19 6273d8e8dc fix: docs llm test. make tables that we sql query public (#4058)
# Description of Changes

<!-- Please describe your change, mention any related tickets, and so on
here. -->
in the llm tests we run to see if docs update break llms.
we are making sql queries to tables that we did not set to public what
means the sql query will fail

# API and ABI breaking changes

<!-- If this is an API or ABI breaking change, please apply the
corresponding GitHub label. -->

# Expected complexity level and risk
1
<!--
How complicated do you think these changes are? Grade on a scale from 1
to 5,
where 1 is a trivial change, and 5 is a deep-reaching and complex
change.

This complexity rating applies not only to the complexity apparent in
the diff,
but also to its interactions with existing and future code.

If you answered more than a 2, explain what is complex about the PR,
and what other components it interacts with in potentially concerning
ways. -->

# Testing

<!-- Describe any testing you've done, and any testing you'd like your
reviewers to do,
so that you're confident that all the changes work as expected! -->

Run /update-llm-benchmark and see if it fixes the sql query issues.

Signed-off-by: Boegie19 <34578426+Boegie19@users.noreply.github.com>
2026-01-20 17:33:45 +00:00
Tyler Cloutier 73881e38f7 Further misc docs changes (#4029)
# Description of Changes

Major documentation overhaul focusing on tables, column types, and
indexes.

  **Quickstart Guides:**
- Updated React, TypeScript, Rust, and C# quickstarts with table/reducer
examples
  - Fixed CLI syntax (positional `--database` argument)
  - Improved template consistency across languages

  **Tables Documentation:**
- Added "Why Tables" section explaining table-oriented design philosophy
(tables as fundamental unit, system tables, data-oriented design
principles)
- Added "Physical and Logical Independence" section explaining how
subscription queries use the relational model independently of physical
storage
- Added brief sections linking to related pages (Visibility,
Constraints, Schedule Tables)
- Renamed "Scheduled Tables" to "Schedule Tables" throughout (tables
store schedules; reducers are scheduled)

  **Column Types:**
  - Split into dedicated page with unified type reference table
- Added "Representing Collections" section (Vec/Array vs table
tradeoffs)
  - Added "Binary Data and Files" section for Vec<u8> storage patterns
- Added "Type Performance" section (smaller types, fixed-size types,
column ordering for alignment)
  - Added complete example struct demonstrating all type categories
  - Renamed "Structured" category to "Composite"

  **Indexes:**
  - Complete rewrite with textbook-style documentation
  - Added "When to Use Indexes" guidance
- Documented single-column and multi-column index syntax (field-level
and table-level)
- Comprehensive range query examples with correct TypeScript `Range`
class syntax
  - Explained multi-column index prefix matching semantics
  - Added index-accelerated deletion examples
  - Included index design guidelines

  **Styling:**
  - Added CSS for table border radius and row separators
  - Created Check component for green checkmarks in tables

  # API and ABI breaking changes

  None. Documentation only.

  # Expected complexity level and risk

  1 - Documentation changes only, no code changes.

  # Testing

  - [ ] Verify docs build without errors
  - [ ] Review rendered pages for formatting issues
  - [ ] Confirm code examples are syntactically correct

---------

Signed-off-by: Tyler Cloutier <cloutiertyler@users.noreply.github.com>
Signed-off-by: John Detter <4099508+jdetter@users.noreply.github.com>
Co-authored-by: clockwork-labs-bot <clockwork-labs-bot@users.noreply.github.com>
Co-authored-by: John Detter <4099508+jdetter@users.noreply.github.com>
2026-01-17 17:44:58 +00:00
Zeke Foppa 38ee9e89ba CI - Fix hint for fixing llm benchmarks (#4040)
# Description of Changes

I believe that local users do not have API tokens for OpenAI, so the
existing hint was not helpful. Apparently the correct path is to post
`/update-llm-benchmark` on the PR and let the CI take care of it.

# API and ABI breaking changes

None

# Expected complexity level and risk

1

# Testing

None

---------

Co-authored-by: Zeke Foppa <bfops@users.noreply.github.com>
2026-01-16 23:15:32 +00:00
Boegie19 eb11d67f91 Fix LLM benchmark Rust wrong struct name (#4043)
# Description of Changes

<!-- Please describe your change, mention any related tickets, and so on
here. -->
Fix LLM benachmarks in rust since they used Result instead of ResultRow
in the request to the LLM making it always fail.
1. see the answer's file there it is ResultRow.
2. Result is a keyword so it will always fail

# API and ABI breaking changes

<!-- If this is an API or ABI breaking change, please apply the
corresponding GitHub label. -->

# Expected complexity level and risk

<!--
How complicated do you think these changes are? Grade on a scale from 1
to 5,
where 1 is a trivial change, and 5 is a deep-reaching and complex
change.

This complexity rating applies not only to the complexity apparent in
the diff,
but also to its interactions with existing and future code.

If you answered more than a 2, explain what is complex about the PR,
and what other components it interacts with in potentially concerning
ways. -->
1 
# Testing

<!-- Describe any testing you've done, and any testing you'd like your
reviewers to do,
so that you're confident that all the changes work as expected! -->

Run /update-llm-benchmark to see if more passes.

---------

Co-authored-by: clockwork-labs-bot <clockwork-labs-bot@users.noreply.github.com>
Co-authored-by: Zeke Foppa <bfops@users.noreply.github.com>
2026-01-16 03:56:17 +00:00
Piotr Sarnacki 3c8836b1a3 Templates rework (#3879)
# Description of Changes

We would like to move all of the templates to a central directory

# API and ABI breaking changes

None

# Expected complexity level and risk

2

# Testing

---------

Co-authored-by: spacetimedb-bot <spacetimedb-bot@users.noreply.github.com>
2026-01-09 15:09:26 +00:00
bradleyshep b00ba57ed0 Fix CI hash save in llm quick fix summary file (#3963)
# Description of Changes

Previously the run file was used with ci-check, and whatever summary
hash was not used. I have updated the `ensure_mode` to always update the
hash in the summary file.

# API and ABI breaking changes

<!-- If this is an API or ABI breaking change, please apply the
corresponding GitHub label. -->

# Expected complexity level and risk

<!--
How complicated do you think these changes are? Grade on a scale from 1
to 5,
where 1 is a trivial change, and 5 is a deep-reaching and complex
change.

This complexity rating applies not only to the complexity apparent in
the diff,
but also to its interactions with existing and future code.

If you answered more than a 2, explain what is complex about the PR,
and what other components it interacts with in potentially concerning
ways. -->

# Testing

<!-- Describe any testing you've done, and any testing you'd like your
reviewers to do,
so that you're confident that all the changes work as expected! -->

- [ ] <!-- maybe a test you want to do -->
- [ ] <!-- maybe a test you want a reviewer to do, so they can check it
off when they're satisfied. -->
2026-01-07 19:53:56 +00:00
bradleyshep b75bf6decf LLM Benchmarking (#3486)
# Description of Changes

Introduce a new **LLM benchmarking app** and supporting code.

* **CLI:** `llm` with subcommands `run`, `routes list`, `diff`,
`ci-check`.
* **Runner:** executes globally numbered tasks; filters by `--lang`,
`--categories`, `--tasks`, `--providers`, `--models`.
* **Providers/clients:** route layer (`provider:model`) with HTTP LLM
Vendor clients; env-driven keys/base URLs.
* **Evaluation:** deterministic scorers (hash/equality, JSON
shape/count, light schema/reducer parity) with clear failure messages.
* **Results:** stable JSON schema; single-file HTML viewer to
inspect/filter/export CSV.
* **Build & guards:** build script for compile-time setup;
* **Docs:** `DEVELOP.md` includes `cargo llm …` usage.

This PR is the initial addition of the app and its modules (runner,
config, routes, prompt/segmentation, scorers, schema/types,
defaults/constants/paths/hashing/combine, publishers, spacetime guard,
HTML stats viewer).

### How it works
1. **Pick what to run**

* Choose tasks (`--tasks 0,7,12`), or a language (`--lang rust|csharp`),
or categories (`--categories basics,schema`).
   * Optionally limit vendors/models (`--providers …`, `--models …`).

2. **Resolve routes**

* Read env (API keys + base URLs) and build the active set (e.g.,
`openai:gpt-5`).

3. **Build context**

   * Start Spacetime
   * Publish golden answer modules
   * Prepare prompts and send to LLM model
   * Attempt to publish LLM module

4. **Execute calls**

* Run the selected tasks within each test against selected models and
languages.

5. **Score outputs**

* Apply deterministic scorers (hash/equality, JSON shape/count, simple
schema/reducer checks).
   * Record the score and any short failure reason.

6. **Update results file**

* Write/update the single results JSON with task/route outcomes,
timings, and summaries.


# API and ABI breaking changes

None. New application and modules; no existing public APIs/ABIs altered.

# Expected complexity level and risk

**4/5.** New CLI, routing, evaluation, and artifact format.

* External model APIs may rate-limit/timeout; concurrency tunable via
`LLM_BENCH_CONCURRENCY` / `LLM_BENCH_ROUTE_CONCURRENCY`.

# Testing

I ran the full test matrix and generated results for every task against
every vendor, model, and language (rust + C#). I also tested the CI
check locally using [act](https://github.com/nektos/act).

**Please verify**

* [ ] `llm run --tasks 0,1,2` (explicit `run`)
* [ ] `llm run --lang rust --categories basics` (filters)
* [ ] `llm run --categories basics,schema` (multiple categories)
* [ ] `llm run --lang csharp` (language switch)
* [ ] `llm run --providers openai,anthropic --models "openai:gpt-5
anthropic:claude-sonnet-4-5"` (provider/model limits)
* [ ] `llm run --hash-only` (dry integrity)
* [ ] `llm run --goldens-only` (test goldens only)
* [ ] `llm run --force` (skip hash check)
* [ ] `llm ci-check`
* [ ] Stats viewer loads the JSON; filtering and CSV export work
* [ ] CI works as intended

---------

Signed-off-by: bradleyshep <148254416+bradleyshep@users.noreply.github.com>
Signed-off-by: Tyler Cloutier <cloutiertyler@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
Co-authored-by: Tyler Cloutier <cloutiertyler@aol.com>
Co-authored-by: Tyler Cloutier <cloutiertyler@users.noreply.github.com>
Co-authored-by: spacetimedb-bot <spacetimedb-bot@users.noreply.github.com>
Co-authored-by: John Detter <4099508+jdetter@users.noreply.github.com>
2026-01-06 22:22:57 +00:00
Zeke Foppa 70628fb51e cargo ci on windows (#3859)
# Description of Changes

Make `cargo ci` work properly on Windows, in preparation for
https://github.com/clockworklabs/SpacetimeDB/pull/3702.

# API and ABI breaking changes

No. CI-only.

# Expected complexity level and risk

2. Not trivial, but not complicated.

# Testing

- [x] CI output seems to be genuinely running the tests, and it's
passing on Windows
- [x] Make a change to `crates/bindings-csharp` and see that `cargo ci
test` fails
- [x] I can manually run a minimal `cargo ci smoketests` invocation on a
Windows machine

---------

Signed-off-by: Zeke Foppa <196249+bfops@users.noreply.github.com>
Co-authored-by: Kasama <robertoaall@gmail.com>
Co-authored-by: Zeke Foppa <bfops@users.noreply.github.com>
2025-12-17 17:34:49 +00:00
Zeke Foppa f49945cc6a Fix CLI reference generation (#3403)
# Description of Changes

Add back the instructions for regenerating CLI docs, which were removed
in https://github.com/clockworklabs/SpacetimeDB/pull/3343. I also made a
script for it.

This also fixes the CI checking this file, which was silently broken in
the same PR.

I have **not** verified that this works in Git Bash in Windows.

# API and ABI breaking changes

None

# Expected complexity level and risk

1

# Testing
- [x] CI passes
- [x] CI fails if I change the CLI reference
- [x] CLI reference looks visually reasonable on a local `pnpm dev`

---------

Signed-off-by: Zeke Foppa <196249+bfops@users.noreply.github.com>
Co-authored-by: Zeke Foppa <bfops@users.noreply.github.com>
2025-12-16 20:17:51 +00:00
Roberto Pommella Alegro 5ac65739e5 add initial cargo ci (#3409)
# Description of Changes

This changes the ci runs to execute `cargo ci` instead of running
commands directly from the github workflow.

The goal here is to unify the commands under `cargo ci` so that it's
easier and more intuitive to run locally

# API and ABI breaking changes

There are no API/ABI changes.

<!-- If this is an API or ABI breaking change, please apply the
corresponding GitHub label. -->

# Expected complexity level and risk

Complexity: 1

It is not a complex change as it is mostly localized to the ci runs and
is easily reversible if something goes wrong. The biggest risk here is
to have future CI runs break, which can be remediated by reverting these
changes.

<!--
How complicated do you think these changes are? Grade on a scale from 1
to 5,
where 1 is a trivial change, and 5 is a deep-reaching and complex
change.

This complexity rating applies not only to the complexity apparent in
the diff,
but also to its interactions with existing and future code.

If you answered more than a 2, explain what is complex about the PR,
and what other components it interacts with in potentially concerning
ways. -->

# Testing

<!-- Describe any testing you've done, and any testing you'd like your
reviewers to do,
so that you're confident that all the changes work as expected! -->

- [x] run `cargo ci` and its subcommands locally
- [x] run the github workflow against this branch to check if the CI
jobs are working properly.

---------

Signed-off-by: Zeke Foppa <196249+bfops@users.noreply.github.com>
Signed-off-by: Roberto Pommella Alegro <robertoaall@gmail.com>
Co-authored-by: Zeke Foppa <bfops@users.noreply.github.com>
Co-authored-by: Zeke Foppa <196249+bfops@users.noreply.github.com>
2025-12-10 19:18:43 +00:00
Tyler Cloutier ce543854e9 Unifies server module library and client SDK for TypeScript (and fixes several bugs) (#3559)
# Description of Changes

This PR is a very large change to the workings of the TypeScript SDK and
as such requires a higher bar of testing than other PRs. However, it
does several important things:

1. Unifies the API of the server and client so they not only have the
same API, but they actually implement it with the same TypeScript types.
This fixes several inconsistencies between them and fixes several small
bugs as well.
2. Closes https://github.com/clockworklabs/SpacetimeDB/issues/3365
3. Closes https://github.com/clockworklabs/SpacetimeDB/issues/3431
4. Closes https://github.com/clockworklabs/SpacetimeDB/issues/3435
5. Subsumes the work done in
https://github.com/clockworklabs/SpacetimeDB/pull/3447
6. Derives all type information on the client from a single
`RemoteModule` type which vastly cleans up the correctness of type
checking on the client and helped me to find several small bugs

It accomplishes this by changing code generation of TypeScript on the
client to code generation approximately what a developer would manually
write in their module. The ultimate goal would be to allow the developer
to use the types and functions that they define on in their module
directly on the client without needing to do any code generation at all,
provided they are using TypeScript on the server and client.

https://github.com/clockworklabs/SpacetimeDB/issues/3365 is resolved by
`.build()`ing the `DbConnection` inside a React `useEffect` rather than
doing it directly in line with the render of the provider. In order to
do that we needed to not expose the `DbConnection` directly to
developers by returning a different type from `useSpacetimeDB`.
`useSpacetimeDB` now returns a `ConnectionState` object which is stored
as React state and updates when any of the fields change. This change
also resolves https://github.com/clockworklabs/SpacetimeDB/issues/3431.

https://github.com/clockworklabs/SpacetimeDB/issues/3435 was the issue
that initially lead me down the rabbit hole of unifying the server and
the client because it was nearly impossible to track down all the
various type functions and how they connect to the values that we code
generate on the server. After several hours of attempting this, I
decided to clean up the types a bit to be more uniform.

Implementing the unification between the client and the server also
necessitated fully implemented parts of the API that were fully
implemented on the server, but were broken or missing on the client.

# API and ABI breaking changes

[Unification] -> Means that this is breaking behavior for the client
SDK, but that the new behavior is identical to the server's existing
behavior

## Breaking changes:

- Table accessor names and index accessor names are converted to
camelCase on the `ctx`, so `ctx.db.foo_bar` is now `ctx.db.fooBar`

- [Unification] On the client `my_table.iter()` returns
`IterableIterator` instead of an `Array`
- [Unification] `module_bindings` now export `TypeBuilder`s for all
types instead of a `type MyType` and object `MyType`, so instead of
using `MyType` as a type directly, you need to infer the type `MyType`
-> `Infer<typeof MyType>`.
- [Unification] We no longer generate and export `MyTypeVariants` for
sum types (these are now accessed by `Infer<typeof
MyType.variants.myVariant>`)
- [Unification] `MyType.getTypeScriptAlgebraicType()` has been replaced
with `MyType.algebraicType`

- `useSpacetimeDB()` no longer takes type parameters
- `useTable()` now takes a `TableDef` parameter and type params are
inferred
- `useTable()` now just returns an `Array` directly instead of a object
with `{ rows }`

- [Unification] `ctx.reducers.createPlayer(argA, argB)` ->
`ctx.reducers.createPlayer({ argA, argB })`
- [Unification] `ctx.reducers.onCreatePlayer(ctx, argA, argB)` ->
`ctx.reducers.onCreatePlayer(ctx, { argA, argB })`
- [Unification] `ctx.reducers.removeOnCreatePlayer(ctx, argA, argB)` ->
`ctx.reducers.removeOnCreatePlayer(ctx, { argA, argB })`
- [Unification] `myTable.count(): number` -> `myTable.count(): bigint`
 
## Additive changes:
- `Infer<>` now also does `InferTypeOfRow<>` if applicable
- Added a `useReducer()` React hook
- `module_bindings` now exports a `tables` object with references to all
the `TableDef`s
- `module_bindings` now exports a `reducers` object with references to
all the `ReducerDef`s
- Added a new `MyType.create('MyVariant', ...)` function in addition to
the `MyType.MyVariant(...)` constructors (this is private)

## Notable things that did not change:
- `MyType.serialize(writer: BinaryWriter, value: Infer<typeof MyType>)`
and `MyType.deserialize(reader: BinaryReader): Infer<typeof MyType>` are
still supported exactly as before.
- The `MyType.MyVariant(...)` constructor function on sum types is still
present, but implemented with the private `MyType.create('MyVariant',
...)`. We could choose to move away from this API later if we didn't
like the variants polluting the namespace


# Expected complexity level and risk

4 - This is a deep reaching an complex change for the SDK. For the
server, it is much less deep reaching since it reuses much of the same
machinery, although it does require thorough testing there as some of
the code was modified.

This change is fully localized to TypeScript and does not touch the host
(or other languages) at all, and therefore only impacts a beta aspect of
SpacetimeDB.

# Testing

<!-- Describe any testing you've done, and any testing you'd like your
reviewers to do,
so that you're confident that all the changes work as expected! -->

- [ ] Added regression test for
https://github.com/clockworklabs/SpacetimeDB/issues/3435
- [x] Manually tested `test-app` and `test-react-router-app`
- [ ] Add test cases for camelCase-ing

---------

Signed-off-by: Tyler Cloutier <cloutiertyler@users.noreply.github.com>
Co-authored-by: Noa <coolreader18@gmail.com>
2025-11-19 02:53:41 +00:00
Piotr Sarnacki 647be7e9c0 spacetime init rewrite (#3366)
This is a draft of the new functionality for `spacetime init`. In order
to run it with built-in templates you have to set the path to the config
file:

```
export SPACETIMEDB_CLI_TEMPLATES_FILE=crates/cli/.init-templates.json
```

In the future it will fetch the list from GH.

A few notes:

* the previous functionality of `spacetime init` does not work at the
moment
* the code needs a bit more cleanup and tests before merging
* there is a bit of a mix in how we generate empty server and client
projects. For Rust we use the existing way of generating. For TypeScript
we clone an empty project from the repo. I wanted to play with both ways
of doing things, and I'm still not sure which is better. Generation in
Rust means that the generated code will match the CLI version and not
necessarily whatever is in Git. On the other hand, for the builtin
templates we will be fetching the newest version from GH, which I guess
might also not what we want, ie. we probably want only stable templates.
More discussion is needed here
* we use `spacetimedb` directory for the server files
* I don't particularly like the inability to disable interactive mode
easily. We discussed disabling it by default if all of the required
arguments are passed, but I don't think it's feature proof. For example,
if someone relies on a non-interactive mode, and we add a new required
argument, instead of printing a message `missing --foo`, we will
automatically launch interactive mode, which is harder to debug. That's
why I think I'd prefer to implement `--non-interactive` argument
* it's kind of hard to keep the legacy behaviour. If you don't pass any
arguments, we go into interactive mode. In the legacy version, we would
print required arguments. If someone passes `--lang` or `--project-path`
explicitly, I guess we could run the legacy workflow, but not sure if
it's worth it, as the command was marked as unstable anyway
* the project path defaults to the project name, but I think we should
probably replace change whitespaces to dashes, or at least ask for the
project path with the project name being the default (or both)

---------

Signed-off-by: Tyler Cloutier <cloutiertyler@users.noreply.github.com>
Signed-off-by: John Detter <4099508+jdetter@users.noreply.github.com>
Co-authored-by: = <cloutiertyler@gmail.com>
Co-authored-by: Tyler Cloutier <cloutiertyler@users.noreply.github.com>
Co-authored-by: Tyler Cloutier <cloutiertyler@aol.com>
Co-authored-by: John Detter <4099508+jdetter@users.noreply.github.com>
2025-10-30 04:26:08 +00:00
Noa bb43213245 Typescript module API (#3327)
# Description of Changes

Currently based on #3361 

Implements most of the TS module API (not yet a function for type
aliases).

# Expected complexity level and risk

<!--
How complicated do you think these changes are? Grade on a scale from 1
to 5,
where 1 is a trivial change, and 5 is a deep-reaching and complex
change.

This complexity rating applies not only to the complexity apparent in
the diff,
but also to its interactions with existing and future code.

If you answered more than a 2, explain what is complex about the PR,
and what other components it interacts with in potentially concerning
ways. -->

# Testing

<!-- Describe any testing you've done, and any testing you'd like your
reviewers to do,
so that you're confident that all the changes work as expected! -->

- [x] Extremely basic module stuff works
- [ ] <!-- maybe a test you want a reviewer to do, so they can check it
off when they're satisfied. -->

---------

Signed-off-by: Noa <coolreader18@gmail.com>
Co-authored-by: Tyler Cloutier <cloutiertyler@aol.com>
Co-authored-by: = <cloutiertyler@gmail.com>
Co-authored-by: Tyler Cloutier <cloutiertyler@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
Co-authored-by: Zeke Foppa <bfops@users.noreply.github.com>
2025-10-16 14:58:50 +00:00
Zeke Foppa b34f37b3bd Misc cleanups in tools/upgrade-version (#3370)
# Description of Changes

* Make sure the user provides at least one of `--rust-and-cli`,
`--typescript`, or `--csharp`, since providing none of them is a no-op
as of #3308
* Do a semver-parsing of the arg before doing anything, and use that
parsed version everywhere
* Consolidate some version strings that we were computing in a few
places

# API and ABI breaking changes

None

# Expected complexity level and risk

1

# Testing

- [x] Running `cargo bump-versions 1.5.0 --typescript --rust-and-cli
--csharp` only shows a diff in the change dates

---------

Co-authored-by: Zeke Foppa <bfops@users.noreply.github.com>
2025-10-10 17:27:39 +00:00
Zeke Foppa 1aa4084762 CI - Clean up several scripts and call sites related to codegen (#3363)
# Description of Changes

* Small cleanups in `tools/check-diff.sh`
* Use `tools/check-diff.sh` wherever appropriate
* Simplify the `sdks/csharp/tools~/gen-*.sh` files after the repo merge

# API and ABI breaking changes

None.

# Expected complexity level and risk

1

# Testing

- [x] CI still passes

Co-authored-by: Zeke Foppa <bfops@users.noreply.github.com>
2025-10-10 14:23:18 +00:00
Zeke Foppa e3d2dfdfa0 Fix Rust dep versions (#3369)
# Description of Changes

It turns out that cargo automatically uses the latest semver-compatible
versions of dependencies, which is not what we expected. tl;dr
specifying `1.5.0` actually means `>=1.5.0 <2.0.0`, but we actually
intend `1.5.*`.

This PR updates our `upgrade-version` tool, and re-runs it to fix the
dep versions.

# API and ABI breaking changes

None.

# Expected complexity level and risk

1

# Testing

- [x] I ran `cargo bump-versions 1.5.0 --rust-and-cli` to regenerate the
other committed files.

---------

Co-authored-by: Zeke Foppa <bfops@users.noreply.github.com>
2025-10-07 19:00:47 +00:00
Zeke Foppa c7d825c1d0 Fix tools/publish-crates.sh (#3268)
# Description of Changes

Fixes two problems introduced in #3185:
1. The `--directories` option on `find-publish-list.py` was not printing
directories
2. The `publish-crates.sh` script was using an undefined variable.

# API and ABI breaking changes

No breaking changes

# Expected complexity level and risk

1

# Testing

This was used to publish crates in the release yesterday.

Co-authored-by: Zeke Foppa <bfops@users.noreply.github.com>
2025-10-02 17:06:37 +00:00
Zeke Foppa 77a219aca6 Integrate tools/upgrade-version into cargo and expand (#3308)
# Description of Changes

`tools/upgrade-version` can now be run via just `cargo bump-versions`.

By default, it does nothing. You must now specify at least one of:
`--rust-and-cli`, `--typescript`, or `--csharp`.

This also now bumps the `StdbModule.csproj` version in
`demo/Blackholio`. I'm not sure if that's desired or not, but it was
still at `1.0.0` which doesn't seem quite right.

# API and ABI breaking changes

None

# Expected complexity level and risk

2

# Testing

- [x] `cargo bump-versions 1.5.0 --rust-and-cli`
```
diff --git a/Cargo.lock b/Cargo.lock
index 941b9d66d..3800e547f 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -436,3 +436,3 @@ dependencies = [
  "anyhow",
- "spacetimedb 1.4.0",
+ "spacetimedb 1.5.0",
 ]
@@ -1023,3 +1023,3 @@ dependencies = [
 name = "connect_disconnect_client"
-version = "1.4.0"
+version = "1.5.0"
 dependencies = [
@@ -3089,3 +3089,3 @@ dependencies = [
  "log",
- "spacetimedb 1.4.0",
+ "spacetimedb 1.5.0",
 ]
@@ -3414,3 +3414,3 @@ dependencies = [
  "log",
- "spacetimedb 1.4.0",
+ "spacetimedb 1.5.0",
 ]
@@ -3897,3 +3897,3 @@ dependencies = [
  "log",
- "spacetimedb 1.4.0",
+ "spacetimedb 1.5.0",
 ]
@@ -4382,3 +4382,3 @@ dependencies = [
  "log",
- "spacetimedb 1.4.0",
+ "spacetimedb 1.5.0",
 ]
@@ -5077,3 +5077,3 @@ dependencies = [
  "paste",
- "spacetimedb 1.4.0",
+ "spacetimedb 1.5.0",
 ]
@@ -5082,3 +5082,3 @@ dependencies = [
 name = "sdk-unreal-test-harness"
-version = "1.4.0"
+version = "1.5.0"
 dependencies = [
@@ -5456,3 +5456,3 @@ dependencies = [
  "log",
- "spacetimedb 1.4.0",
+ "spacetimedb 1.5.0",
 ]
@@ -5479,3 +5479,3 @@ dependencies = [
 name = "spacetimedb"
-version = "1.4.0"
+version = "1.5.0"
 dependencies = [
@@ -5488,6 +5488,6 @@ dependencies = [
  "scoped-tls",
- "spacetimedb-bindings-macro 1.4.0",
- "spacetimedb-bindings-sys 1.4.0",
- "spacetimedb-lib 1.4.0",
- "spacetimedb-primitives 1.4.0",
+ "spacetimedb-bindings-macro 1.5.0",
+ "spacetimedb-bindings-sys 1.5.0",
+ "spacetimedb-lib 1.5.0",
+ "spacetimedb-primitives 1.5.0",
  "trybuild",
@@ -5497,3 +5497,3 @@ dependencies = [
 name = "spacetimedb-auth"
-version = "1.4.0"
+version = "1.5.0"
 dependencies = [
@@ -5504,3 +5504,3 @@ dependencies = [
  "spacetimedb-jsonwebtoken",
- "spacetimedb-lib 1.4.0",
+ "spacetimedb-lib 1.5.0",
 ]
@@ -5509,3 +5509,3 @@ dependencies = [
 name = "spacetimedb-bench"
-version = "1.4.0"
+version = "1.5.0"
 dependencies = [
@@ -5537,7 +5537,7 @@ dependencies = [
  "spacetimedb-execution",
- "spacetimedb-lib 1.4.0",
+ "spacetimedb-lib 1.5.0",
  "spacetimedb-paths",
- "spacetimedb-primitives 1.4.0",
+ "spacetimedb-primitives 1.5.0",
  "spacetimedb-query",
- "spacetimedb-sats 1.4.0",
+ "spacetimedb-sats 1.5.0",
  "spacetimedb-schema",
@@ -5570,3 +5570,3 @@ dependencies = [
 name = "spacetimedb-bindings-macro"
-version = "1.4.0"
+version = "1.5.0"
 dependencies = [
@@ -5576,3 +5576,3 @@ dependencies = [
  "quote",
- "spacetimedb-primitives 1.4.0",
+ "spacetimedb-primitives 1.5.0",
  "syn 2.0.101",
@@ -5591,5 +5591,5 @@ dependencies = [
 name = "spacetimedb-bindings-sys"
-version = "1.4.0"
+version = "1.5.0"
 dependencies = [
- "spacetimedb-primitives 1.4.0",
+ "spacetimedb-primitives 1.5.0",
 ]
@@ -5598,3 +5598,3 @@ dependencies = [
 name = "spacetimedb-cli"
-version = "1.4.0"
+version = "1.5.0"
 dependencies = [
@@ -5634,5 +5634,5 @@ dependencies = [
  "spacetimedb-jsonwebtoken",
- "spacetimedb-lib 1.4.0",
+ "spacetimedb-lib 1.5.0",
  "spacetimedb-paths",
- "spacetimedb-primitives 1.4.0",
+ "spacetimedb-primitives 1.5.0",
  "spacetimedb-schema",
@@ -5659,3 +5659,3 @@ dependencies = [
 name = "spacetimedb-client-api"
-version = "1.4.0"
+version = "1.5.0"
 dependencies = [
@@ -5696,3 +5696,3 @@ dependencies = [
  "spacetimedb-jsonwebtoken",
- "spacetimedb-lib 1.4.0",
+ "spacetimedb-lib 1.5.0",
  "spacetimedb-paths",
@@ -5713,3 +5713,3 @@ dependencies = [
 name = "spacetimedb-client-api-messages"
-version = "1.4.0"
+version = "1.5.0"
 dependencies = [
@@ -5727,5 +5727,5 @@ dependencies = [
  "smallvec",
- "spacetimedb-lib 1.4.0",
- "spacetimedb-primitives 1.4.0",
- "spacetimedb-sats 1.4.0",
+ "spacetimedb-lib 1.5.0",
+ "spacetimedb-primitives 1.5.0",
+ "spacetimedb-sats 1.5.0",
  "strum",
@@ -5736,3 +5736,3 @@ dependencies = [
 name = "spacetimedb-codegen"
-version = "1.4.0"
+version = "1.5.0"
 dependencies = [
@@ -5745,4 +5745,4 @@ dependencies = [
  "spacetimedb-data-structures",
- "spacetimedb-lib 1.4.0",
- "spacetimedb-primitives 1.4.0",
+ "spacetimedb-lib 1.5.0",
+ "spacetimedb-primitives 1.5.0",
  "spacetimedb-schema",
@@ -5753,3 +5753,3 @@ dependencies = [
 name = "spacetimedb-commitlog"
-version = "1.4.0"
+version = "1.5.0"
 dependencies = [
@@ -5773,4 +5773,4 @@ dependencies = [
  "spacetimedb-paths",
- "spacetimedb-primitives 1.4.0",
- "spacetimedb-sats 1.4.0",
+ "spacetimedb-primitives 1.5.0",
+ "spacetimedb-sats 1.5.0",
  "tempfile",
@@ -5785,3 +5785,3 @@ dependencies = [
 name = "spacetimedb-core"
-version = "1.4.0"
+version = "1.5.0"
 dependencies = [
@@ -5863,3 +5863,3 @@ dependencies = [
  "spacetimedb-jwks",
- "spacetimedb-lib 1.4.0",
+ "spacetimedb-lib 1.5.0",
  "spacetimedb-memory-usage",
@@ -5868,5 +5868,5 @@ dependencies = [
  "spacetimedb-physical-plan",
- "spacetimedb-primitives 1.4.0",
+ "spacetimedb-primitives 1.5.0",
  "spacetimedb-query",
- "spacetimedb-sats 1.4.0",
+ "spacetimedb-sats 1.5.0",
  "spacetimedb-schema",
@@ -5905,3 +5905,3 @@ dependencies = [
 name = "spacetimedb-data-structures"
-version = "1.4.0"
+version = "1.5.0"
 dependencies = [
@@ -5919,3 +5919,3 @@ dependencies = [
 name = "spacetimedb-datastore"
-version = "1.4.0"
+version = "1.5.0"
 dependencies = [
@@ -5939,7 +5939,7 @@ dependencies = [
  "spacetimedb-execution",
- "spacetimedb-lib 1.4.0",
+ "spacetimedb-lib 1.5.0",
  "spacetimedb-metrics",
  "spacetimedb-paths",
- "spacetimedb-primitives 1.4.0",
- "spacetimedb-sats 1.4.0",
+ "spacetimedb-primitives 1.5.0",
+ "spacetimedb-sats 1.5.0",
  "spacetimedb-schema",
@@ -5954,3 +5954,3 @@ dependencies = [
 name = "spacetimedb-durability"
-version = "1.4.0"
+version = "1.5.0"
 dependencies = [
@@ -5961,3 +5961,3 @@ dependencies = [
  "spacetimedb-paths",
- "spacetimedb-sats 1.4.0",
+ "spacetimedb-sats 1.5.0",
  "thiserror 1.0.69",
@@ -5969,3 +5969,3 @@ dependencies = [
 name = "spacetimedb-execution"
-version = "1.4.0"
+version = "1.5.0"
 dependencies = [
@@ -5974,6 +5974,6 @@ dependencies = [
  "spacetimedb-expr",
- "spacetimedb-lib 1.4.0",
+ "spacetimedb-lib 1.5.0",
  "spacetimedb-physical-plan",
- "spacetimedb-primitives 1.4.0",
- "spacetimedb-sats 1.4.0",
+ "spacetimedb-primitives 1.5.0",
+ "spacetimedb-sats 1.5.0",
  "spacetimedb-sql-parser",
@@ -5984,3 +5984,3 @@ dependencies = [
 name = "spacetimedb-expr"
-version = "1.4.0"
+version = "1.5.0"
 dependencies = [
@@ -5991,6 +5991,6 @@ dependencies = [
  "pretty_assertions",
- "spacetimedb 1.4.0",
- "spacetimedb-lib 1.4.0",
- "spacetimedb-primitives 1.4.0",
- "spacetimedb-sats 1.4.0",
+ "spacetimedb 1.5.0",
+ "spacetimedb-lib 1.5.0",
+ "spacetimedb-primitives 1.5.0",
+ "spacetimedb-sats 1.5.0",
  "spacetimedb-schema",
@@ -6002,3 +6002,3 @@ dependencies = [
 name = "spacetimedb-fs-utils"
-version = "1.4.0"
+version = "1.5.0"
 dependencies = [
@@ -6064,3 +6064,3 @@ dependencies = [
 name = "spacetimedb-lib"
-version = "1.4.0"
+version = "1.5.0"
 dependencies = [
@@ -6082,7 +6082,7 @@ dependencies = [
  "serde_json",
- "spacetimedb-bindings-macro 1.4.0",
+ "spacetimedb-bindings-macro 1.5.0",
  "spacetimedb-memory-usage",
  "spacetimedb-metrics",
- "spacetimedb-primitives 1.4.0",
- "spacetimedb-sats 1.4.0",
+ "spacetimedb-primitives 1.5.0",
+ "spacetimedb-sats 1.5.0",
  "thiserror 1.0.69",
@@ -6092,3 +6092,3 @@ dependencies = [
 name = "spacetimedb-memory-usage"
-version = "1.4.0"
+version = "1.5.0"
 dependencies = [
@@ -6102,3 +6102,3 @@ dependencies = [
 name = "spacetimedb-metrics"
-version = "1.4.0"
+version = "1.5.0"
 dependencies = [
@@ -6112,3 +6112,3 @@ dependencies = [
 name = "spacetimedb-paths"
-version = "1.4.0"
+version = "1.5.0"
 dependencies = [
@@ -6128,3 +6128,3 @@ dependencies = [
 name = "spacetimedb-pg"
-version = "1.4.0"
+version = "1.5.0"
 dependencies = [
@@ -6139,3 +6139,3 @@ dependencies = [
  "spacetimedb-client-api-messages",
- "spacetimedb-lib 1.4.0",
+ "spacetimedb-lib 1.5.0",
  "thiserror 1.0.69",
@@ -6146,3 +6146,3 @@ dependencies = [
 name = "spacetimedb-physical-plan"
-version = "1.4.0"
+version = "1.5.0"
 dependencies = [
@@ -6153,4 +6153,4 @@ dependencies = [
  "spacetimedb-expr",
- "spacetimedb-lib 1.4.0",
- "spacetimedb-primitives 1.4.0",
+ "spacetimedb-lib 1.5.0",
+ "spacetimedb-primitives 1.5.0",
  "spacetimedb-schema",
@@ -6174,3 +6174,3 @@ dependencies = [
 name = "spacetimedb-primitives"
-version = "1.4.0"
+version = "1.5.0"
 dependencies = [
@@ -6186,3 +6186,3 @@ dependencies = [
 name = "spacetimedb-query"
-version = "1.4.0"
+version = "1.5.0"
 dependencies = [
@@ -6194,5 +6194,5 @@ dependencies = [
  "spacetimedb-expr",
- "spacetimedb-lib 1.4.0",
+ "spacetimedb-lib 1.5.0",
  "spacetimedb-physical-plan",
- "spacetimedb-primitives 1.4.0",
+ "spacetimedb-primitives 1.5.0",
  "spacetimedb-sql-parser",
@@ -6229,3 +6229,3 @@ dependencies = [
 name = "spacetimedb-sats"
-version = "1.4.0"
+version = "1.5.0"
 dependencies = [
@@ -6254,6 +6254,6 @@ dependencies = [
  "smallvec",
- "spacetimedb-bindings-macro 1.4.0",
+ "spacetimedb-bindings-macro 1.5.0",
  "spacetimedb-memory-usage",
  "spacetimedb-metrics",
- "spacetimedb-primitives 1.4.0",
+ "spacetimedb-primitives 1.5.0",
  "thiserror 1.0.69",
@@ -6263,3 +6263,3 @@ dependencies = [
 name = "spacetimedb-schema"
-version = "1.4.0"
+version = "1.5.0"
 dependencies = [
@@ -6280,5 +6280,5 @@ dependencies = [
  "spacetimedb-data-structures",
- "spacetimedb-lib 1.4.0",
- "spacetimedb-primitives 1.4.0",
- "spacetimedb-sats 1.4.0",
+ "spacetimedb-lib 1.5.0",
+ "spacetimedb-primitives 1.5.0",
+ "spacetimedb-sats 1.5.0",
  "spacetimedb-sql-parser",
@@ -6293,3 +6293,3 @@ dependencies = [
 name = "spacetimedb-sdk"
-version = "1.4.0"
+version = "1.5.0"
 dependencies = [
@@ -6312,5 +6312,5 @@ dependencies = [
  "spacetimedb-data-structures",
- "spacetimedb-lib 1.4.0",
+ "spacetimedb-lib 1.5.0",
  "spacetimedb-metrics",
- "spacetimedb-sats 1.4.0",
+ "spacetimedb-sats 1.5.0",
  "spacetimedb-testing",
@@ -6323,3 +6323,3 @@ dependencies = [
 name = "spacetimedb-snapshot"
-version = "1.4.0"
+version = "1.5.0"
 dependencies = [
@@ -6340,6 +6340,6 @@ dependencies = [
  "spacetimedb-fs-utils",
- "spacetimedb-lib 1.4.0",
+ "spacetimedb-lib 1.5.0",
  "spacetimedb-paths",
- "spacetimedb-primitives 1.4.0",
- "spacetimedb-sats 1.4.0",
+ "spacetimedb-primitives 1.5.0",
+ "spacetimedb-sats 1.5.0",
  "spacetimedb-schema",
@@ -6356,6 +6356,6 @@ dependencies = [
 name = "spacetimedb-sql-parser"
-version = "1.4.0"
+version = "1.5.0"
 dependencies = [
  "derive_more",
- "spacetimedb-lib 1.4.0",
+ "spacetimedb-lib 1.5.0",
  "sqlparser",
@@ -6366,3 +6366,3 @@ dependencies = [
 name = "spacetimedb-standalone"
-version = "1.4.0"
+version = "1.5.0"
 dependencies = [
@@ -6390,3 +6390,3 @@ dependencies = [
  "spacetimedb-datastore",
- "spacetimedb-lib 1.4.0",
+ "spacetimedb-lib 1.5.0",
  "spacetimedb-paths",
@@ -6407,3 +6407,3 @@ dependencies = [
 name = "spacetimedb-subscription"
-version = "1.4.0"
+version = "1.5.0"
 dependencies = [
@@ -6412,5 +6412,5 @@ dependencies = [
  "spacetimedb-expr",
- "spacetimedb-lib 1.4.0",
+ "spacetimedb-lib 1.5.0",
  "spacetimedb-physical-plan",
- "spacetimedb-primitives 1.4.0",
+ "spacetimedb-primitives 1.5.0",
  "spacetimedb-query",
@@ -6420,3 +6420,3 @@ dependencies = [
 name = "spacetimedb-table"
-version = "1.4.0"
+version = "1.5.0"
 dependencies = [
@@ -6436,6 +6436,6 @@ dependencies = [
  "spacetimedb-data-structures",
- "spacetimedb-lib 1.4.0",
+ "spacetimedb-lib 1.5.0",
  "spacetimedb-memory-usage",
- "spacetimedb-primitives 1.4.0",
- "spacetimedb-sats 1.4.0",
+ "spacetimedb-primitives 1.5.0",
+ "spacetimedb-sats 1.5.0",
  "spacetimedb-schema",
@@ -6446,3 +6446,3 @@ dependencies = [
 name = "spacetimedb-testing"
-version = "1.4.0"
+version = "1.5.0"
 dependencies = [
@@ -6462,3 +6462,3 @@ dependencies = [
  "spacetimedb-data-structures",
- "spacetimedb-lib 1.4.0",
+ "spacetimedb-lib 1.5.0",
  "spacetimedb-paths",
@@ -6473,3 +6473,3 @@ dependencies = [
 name = "spacetimedb-update"
-version = "1.4.0"
+version = "1.5.0"
 dependencies = [
@@ -6498,3 +6498,3 @@ dependencies = [
 name = "spacetimedb-vm"
-version = "1.4.0"
+version = "1.5.0"
 dependencies = [
@@ -6508,5 +6508,5 @@ dependencies = [
  "spacetimedb-execution",
- "spacetimedb-lib 1.4.0",
- "spacetimedb-primitives 1.4.0",
- "spacetimedb-sats 1.4.0",
+ "spacetimedb-lib 1.5.0",
+ "spacetimedb-primitives 1.5.0",
+ "spacetimedb-sats 1.5.0",
  "spacetimedb-schema",
@@ -6589,3 +6589,3 @@ dependencies = [
 name = "sqltest"
-version = "1.4.0"
+version = "1.5.0"
 dependencies = [
@@ -6608,4 +6608,4 @@ dependencies = [
  "spacetimedb-datastore",
- "spacetimedb-lib 1.4.0",
- "spacetimedb-sats 1.4.0",
+ "spacetimedb-lib 1.5.0",
+ "spacetimedb-sats 1.5.0",
  "spacetimedb-vm",
@@ -6927,3 +6927,3 @@ dependencies = [
 name = "test-client"
-version = "1.4.0"
+version = "1.5.0"
 dependencies = [
@@ -6939,3 +6939,3 @@ dependencies = [
 name = "test-counter"
-version = "1.4.0"
+version = "1.5.0"
 dependencies = [
diff --git a/Cargo.toml b/Cargo.toml
index b3c6d3222..f84eff4df 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -94,3 +94,3 @@ debug = true
 [workspace.package]
-version = "1.4.0"
+version = "1.5.0"
 edition = "2021"
@@ -100,34 +100,34 @@ rust-version = "1.88.0"
 [workspace.dependencies]
-spacetimedb = { path = "crates/bindings", version = "1.4.0" }
-spacetimedb-auth = { path = "crates/auth", version = "1.4.0" }
-spacetimedb-bindings-macro = { path = "crates/bindings-macro", version = "1.4.0" }
-spacetimedb-bindings-sys = { path = "crates/bindings-sys", version = "1.4.0" }
-spacetimedb-cli = { path = "crates/cli", version = "1.4.0" }
-spacetimedb-client-api = { path = "crates/client-api", version = "1.4.0" }
-spacetimedb-client-api-messages = { path = "crates/client-api-messages", version = "1.4.0" }
-spacetimedb-codegen = { path = "crates/codegen", version = "1.4.0" }
-spacetimedb-commitlog = { path = "crates/commitlog", version = "1.4.0" }
-spacetimedb-core = { path = "crates/core", version = "1.4.0" }
-spacetimedb-data-structures = { path = "crates/data-structures", version = "1.4.0" }
-spacetimedb-datastore = { path = "crates/datastore", version = "1.4.0" }
-spacetimedb-durability = { path = "crates/durability", version = "1.4.0" }
-spacetimedb-execution = { path = "crates/execution", version = "1.4.0" }
-spacetimedb-expr = { path = "crates/expr", version = "1.4.0" }
-spacetimedb-lib = { path = "crates/lib", default-features = false, version = "1.4.0" }
-spacetimedb-memory-usage = { path = "crates/memory-usage", version = "1.4.0", default-features = false }
-spacetimedb-metrics = { path = "crates/metrics", version = "1.4.0" }
-spacetimedb-paths = { path = "crates/paths", version = "1.4.0" }
-spacetimedb-pg = { path = "crates/pg", version = "1.4.0" }
-spacetimedb-physical-plan = { path = "crates/physical-plan", version = "1.4.0" }
-spacetimedb-primitives = { path = "crates/primitives", version = "1.4.0" }
-spacetimedb-query = { path = "crates/query", version = "1.4.0" }
-spacetimedb-sats = { path = "crates/sats", version = "1.4.0" }
-spacetimedb-schema = { path = "crates/schema", version = "1.4.0" }
-spacetimedb-standalone = { path = "crates/standalone", version = "1.4.0" }
-spacetimedb-sql-parser = { path = "crates/sql-parser", version = "1.4.0" }
-spacetimedb-table = { path = "crates/table", version = "1.4.0" }
-spacetimedb-vm = { path = "crates/vm", version = "1.4.0" }
-spacetimedb-fs-utils = { path = "crates/fs-utils", version = "1.4.0" }
-spacetimedb-snapshot = { path = "crates/snapshot", version = "1.4.0" }
-spacetimedb-subscription = { path = "crates/subscription", version = "1.4.0" }
+spacetimedb = { path = "crates/bindings", version = "1.5.0" }
+spacetimedb-auth = { path = "crates/auth", version = "1.5.0" }
+spacetimedb-bindings-macro = { path = "crates/bindings-macro", version = "1.5.0" }
+spacetimedb-bindings-sys = { path = "crates/bindings-sys", version = "1.5.0" }
+spacetimedb-cli = { path = "crates/cli", version = "1.5.0" }
+spacetimedb-client-api = { path = "crates/client-api", version = "1.5.0" }
+spacetimedb-client-api-messages = { path = "crates/client-api-messages", version = "1.5.0" }
+spacetimedb-codegen = { path = "crates/codegen", version = "1.5.0" }
+spacetimedb-commitlog = { path = "crates/commitlog", version = "1.5.0" }
+spacetimedb-core = { path = "crates/core", version = "1.5.0" }
+spacetimedb-data-structures = { path = "crates/data-structures", version = "1.5.0" }
+spacetimedb-datastore = { path = "crates/datastore", version = "1.5.0" }
+spacetimedb-durability = { path = "crates/durability", version = "1.5.0" }
+spacetimedb-execution = { path = "crates/execution", version = "1.5.0" }
+spacetimedb-expr = { path = "crates/expr", version = "1.5.0" }
+spacetimedb-lib = { path = "crates/lib", default-features = false, version = "1.5.0" }
+spacetimedb-memory-usage = { path = "crates/memory-usage", version = "1.5.0", default-features = false }
+spacetimedb-metrics = { path = "crates/metrics", version = "1.5.0" }
+spacetimedb-paths = { path = "crates/paths", version = "1.5.0" }
+spacetimedb-pg = { path = "crates/pg", version = "1.5.0" }
+spacetimedb-physical-plan = { path = "crates/physical-plan", version = "1.5.0" }
+spacetimedb-primitives = { path = "crates/primitives", version = "1.5.0" }
+spacetimedb-query = { path = "crates/query", version = "1.5.0" }
+spacetimedb-sats = { path = "crates/sats", version = "1.5.0" }
+spacetimedb-schema = { path = "crates/schema", version = "1.5.0" }
+spacetimedb-standalone = { path = "crates/standalone", version = "1.5.0" }
+spacetimedb-sql-parser = { path = "crates/sql-parser", version = "1.5.0" }
+spacetimedb-table = { path = "crates/table", version = "1.5.0" }
+spacetimedb-vm = { path = "crates/vm", version = "1.5.0" }
+spacetimedb-fs-utils = { path = "crates/fs-utils", version = "1.5.0" }
+spacetimedb-snapshot = { path = "crates/snapshot", version = "1.5.0" }
+spacetimedb-subscription = { path = "crates/subscription", version = "1.5.0" }
 
diff --git a/LICENSE.txt b/LICENSE.txt
index 7c5f3cfff..d6571c196 100644
--- a/LICENSE.txt
+++ b/LICENSE.txt
@@ -7,3 +7,3 @@ Parameters
 Licensor:             Clockwork Laboratories, Inc.
-Licensed Work:        SpacetimeDB 1.4.0
+Licensed Work:        SpacetimeDB 1.5.0
                       The Licensed Work is
@@ -23,3 +23,3 @@ Additional Use Grant: You may make use of the Licensed Work provided your
 
-Change Date:          2030-09-22
+Change Date:          2030-09-29
 
diff --git a/crates/cli/src/subcommands/project/rust/Cargo._toml b/crates/cli/src/subcommands/project/rust/Cargo._toml
index d2a3da80f..2bd500e78 100644
--- a/crates/cli/src/subcommands/project/rust/Cargo._toml
+++ b/crates/cli/src/subcommands/project/rust/Cargo._toml
@@ -11,3 +11,3 @@ crate-type = ["cdylib"]
 [dependencies]
-spacetimedb = "1.4"
+spacetimedb = "1.5"
 log = "0.4"
diff --git a/licenses/BSL.txt b/licenses/BSL.txt
index 125fcf25a..e35adb65f 100644
--- a/licenses/BSL.txt
+++ b/licenses/BSL.txt
@@ -7,3 +7,3 @@ Parameters
 Licensor:             Clockwork Laboratories, Inc.
-Licensed Work:        SpacetimeDB 1.4.0
+Licensed Work:        SpacetimeDB 1.5.0
                       The Licensed Work is
@@ -23,3 +23,3 @@ Additional Use Grant: You may make use of the Licensed Work provided your
 
-Change Date:          2030-09-03
+Change Date:          2030-09-29
```

- [x] `cargo bump-versions 1.5.0 --typescript`
```
diff --git a/crates/bindings-typescript/package.json b/crates/bindings-typescript/package.json
index 2a3ac1d8b..e313ce262 100644
--- a/crates/bindings-typescript/package.json
+++ b/crates/bindings-typescript/package.json
@@ -2,3 +2,3 @@
   "name": "spacetimedb",
-  "version": "1.4.0",
+  "version": "1.5.0",
   "description": "API and ABI bindings for the SpacetimeDB TypeScript module library",
```

- [x] `cargo bump-versions 1.5.0 --csharp`
```
diff --git a/crates/bindings-csharp/BSATN.Codegen/BSATN.Codegen.csproj b/crates/bindings-csharp/BSATN.Codegen/BSATN.Codegen.csproj
index 1b4193828..f9d87e31b 100644
--- a/crates/bindings-csharp/BSATN.Codegen/BSATN.Codegen.csproj
+++ b/crates/bindings-csharp/BSATN.Codegen/BSATN.Codegen.csproj
@@ -4,3 +4,3 @@
     <AssemblyName>SpacetimeDB.BSATN.Codegen</AssemblyName>
-    <Version>1.4.0</Version>
+    <Version>1.5.0</Version>
     <Title>SpacetimeDB BSATN Codegen</Title>
diff --git a/crates/bindings-csharp/BSATN.Runtime/BSATN.Runtime.csproj b/crates/bindings-csharp/BSATN.Runtime/BSATN.Runtime.csproj
index 4ca49e0a0..781699c02 100644
--- a/crates/bindings-csharp/BSATN.Runtime/BSATN.Runtime.csproj
+++ b/crates/bindings-csharp/BSATN.Runtime/BSATN.Runtime.csproj
@@ -4,3 +4,3 @@
     <AssemblyName>SpacetimeDB.BSATN.Runtime</AssemblyName>
-    <Version>1.4.0</Version>
+    <Version>1.5.0</Version>
     <Title>SpacetimeDB BSATN Runtime</Title>
diff --git a/crates/bindings-csharp/Codegen/Codegen.csproj b/crates/bindings-csharp/Codegen/Codegen.csproj
index e701d4b44..d5a60956c 100644
--- a/crates/bindings-csharp/Codegen/Codegen.csproj
+++ b/crates/bindings-csharp/Codegen/Codegen.csproj
@@ -4,3 +4,3 @@
     <AssemblyName>SpacetimeDB.Codegen</AssemblyName>
-    <Version>1.4.0</Version>
+    <Version>1.5.0</Version>
     <Title>SpacetimeDB Module Codegen</Title>
diff --git a/crates/bindings-csharp/Runtime/Runtime.csproj b/crates/bindings-csharp/Runtime/Runtime.csproj
index 361f7db4d..a5492c4d3 100644
--- a/crates/bindings-csharp/Runtime/Runtime.csproj
+++ b/crates/bindings-csharp/Runtime/Runtime.csproj
@@ -4,3 +4,3 @@
     <AssemblyName>SpacetimeDB.Runtime</AssemblyName>
-    <Version>1.4.0</Version>
+    <Version>1.5.0</Version>
     <Title>SpacetimeDB Module Runtime</Title>
diff --git a/crates/cli/src/subcommands/project/csharp/StdbModule._csproj b/crates/cli/src/subcommands/project/csharp/StdbModule._csproj
index 65e514c72..63ebb94a8 100644
--- a/crates/cli/src/subcommands/project/csharp/StdbModule._csproj
+++ b/crates/cli/src/subcommands/project/csharp/StdbModule._csproj
@@ -10,3 +10,3 @@
   <ItemGroup>
-    <PackageReference Include="SpacetimeDB.Runtime" Version="1.4.*" />
+    <PackageReference Include="SpacetimeDB.Runtime" Version="1.5.*" />
   </ItemGroup>
diff --git a/demo/Blackholio/server-csharp/StdbModule.csproj b/demo/Blackholio/server-csharp/StdbModule.csproj
index cd429eb32..5fbfde1b9 100644
--- a/demo/Blackholio/server-csharp/StdbModule.csproj
+++ b/demo/Blackholio/server-csharp/StdbModule.csproj
@@ -15,3 +15,3 @@
   <ItemGroup>
-    <PackageReference Include="SpacetimeDB.Runtime" Version="1.0.0" />
+    <PackageReference Include="SpacetimeDB.Runtime" Version="1.5.*" />
   </ItemGroup>
diff --git a/sdks/csharp/SpacetimeDB.ClientSDK.csproj b/sdks/csharp/SpacetimeDB.ClientSDK.csproj
index 27ba3ab72..14c04bfe4 100644
--- a/sdks/csharp/SpacetimeDB.ClientSDK.csproj
+++ b/sdks/csharp/SpacetimeDB.ClientSDK.csproj
@@ -18,4 +18,4 @@
     <RepositoryUrl>https://github.com/clockworklabs/com.clockworklabs.spacetimedbsdk</RepositoryUrl>
-    <AssemblyVersion>1.4.0</AssemblyVersion>
-    <Version>1.4.0</Version>
+    <AssemblyVersion>1.5.0</AssemblyVersion>
+    <Version>1.5.0</Version>
     <DefaultItemExcludes>$(DefaultItemExcludes);*~/**</DefaultItemExcludes>
@@ -27,3 +27,3 @@
   <ItemGroup>
-    <PackageReference Include="SpacetimeDB.BSATN.Runtime" Version="1.4.*" />
+    <PackageReference Include="SpacetimeDB.BSATN.Runtime" Version="1.5.*" />
 
diff --git a/sdks/csharp/examples~/quickstart-chat/server/StdbModule.csproj b/sdks/csharp/examples~/quickstart-chat/server/StdbModule.csproj
index 633b214b7..29344f061 100644
--- a/sdks/csharp/examples~/quickstart-chat/server/StdbModule.csproj
+++ b/sdks/csharp/examples~/quickstart-chat/server/StdbModule.csproj
@@ -16,3 +16,3 @@
   <ItemGroup>
-    <PackageReference Include="SpacetimeDB.Runtime" Version="1.4.*" />
+    <PackageReference Include="SpacetimeDB.Runtime" Version="1.5.*" />
   </ItemGroup>
diff --git a/sdks/csharp/examples~/regression-tests/server/StdbModule.csproj b/sdks/csharp/examples~/regression-tests/server/StdbModule.csproj
index 65e514c72..63ebb94a8 100644
--- a/sdks/csharp/examples~/regression-tests/server/StdbModule.csproj
+++ b/sdks/csharp/examples~/regression-tests/server/StdbModule.csproj
@@ -10,3 +10,3 @@
   <ItemGroup>
-    <PackageReference Include="SpacetimeDB.Runtime" Version="1.4.*" />
+    <PackageReference Include="SpacetimeDB.Runtime" Version="1.5.*" />
   </ItemGroup>
diff --git a/sdks/csharp/package.json b/sdks/csharp/package.json
index 4585de204..025dfc6c1 100644
--- a/sdks/csharp/package.json
+++ b/sdks/csharp/package.json
@@ -3,3 +3,3 @@
   "displayName": "SpacetimeDB SDK",
-  "version": "1.4.0",
+  "version": "1.5.0",
   "description": "The SpacetimeDB Client SDK is a software development kit (SDK) designed to interact with and manipulate SpacetimeDB modules..",
```

---------

Co-authored-by: Zeke Foppa <bfops@users.noreply.github.com>
2025-09-30 18:47:19 +00:00
Zeke Foppa ad1bd5821d tools/upgrade-version works properly on Windows (#3232)
# Description of Changes

Fixed how the multi-line regexps worked on Windows (with `\r\n` line
endings).

# API and ABI breaking changes

None

# Expected complexity level and risk

1

# Testing
- [x] `cargo run -- 1.4.1` works properly on Linux still
- [x] Applying the same diff and running on Windows, now updates the
license files properly.

Co-authored-by: Zeke Foppa <bfops@users.noreply.github.com>
2025-09-05 18:56:59 +00:00
Zeke Foppa 726345206f CI - License checks (#3197)
# Description of Changes

- Checks that all `LICENSE`/`LICENSE.txt` files are symlinks to
something in `licenses/`
- Checks that all license symlinks are valid
- Adds Tyler as a codeowner for `LICENSE`

# API and ABI breaking changes

None.

# Expected complexity level and risk

2

# Testing

- [x] new CI fails on this PR (because
https://github.com/clockworklabs/SpacetimeDB/pull/3193 isn't merged yet)
- [x] new CI passes on a test PR with
https://github.com/clockworklabs/SpacetimeDB/pull/3193 merged in
(https://github.com/clockworklabs/SpacetimeDB/pull/3198)

---------

Co-authored-by: Zeke Foppa <bfops@users.noreply.github.com>
2025-09-03 19:55:41 +00:00
Zeke Foppa b9d30991f1 Fix remaining LICENSE files (#3193)
# Description of Changes

Apparently, I missed several license files in #3002. I'm not sure what
method I was using to find them, but apparently it was insufficient.

**This replaces all empty `LICENSE` files with an explicit (symlink to)
BSL license, and all apache licenses with symlinks to the root apache
license.** This PR does not intentionally change any license terms, so
if you see one that changed, **it's a mistake**.

# API and ABI breaking changes

None

# Expected complexity level and risk

1

# Testing

```bash
$ find . -name '*LICENSE*' -type f | grep -v '\.meta$'
./crates/sqltest/standards/LICENSE # this one is an external library that we are not allowed to re-license
./LICENSE.txt # this is the root license
```

---------

Co-authored-by: Zeke Foppa <bfops@users.noreply.github.com>
2025-08-22 19:36:47 +00:00
Zeke Foppa eda20a0a1d tools/publish-crates.sh is more flexible for crate paths (#3185)
# 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
https://github.com/clockworklabs/SpacetimeDB/pull/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>
2025-08-20 18:21:54 +00:00
Zeke Foppa 2c4a933035 Reduce tools/publish-crates.sh to only publish bindings and sdk (#3180)
# Description of Changes

Fixes https://github.com/clockworklabs/SpacetimeDB/issues/3017. See that
issue for more context.

# API and ABI breaking changes

None

# Expected complexity level and risk

1

# Testing

We should do a little extra verification on the next release.

---------

Co-authored-by: Zeke Foppa <bfops@users.noreply.github.com>
2025-08-19 20:13:38 +00:00
Zeke Foppa f6f0909ea4 Update all licenses (#3002)
# Description of Changes

We recently merged several repos together. This PR clarifies the license
terms for several subdirectories, as well as the relationship between
the licenses.

The licenses in our subdirectories have become symbolic links to
licenses in our toplevel `licenses` directory. For any particular
subdirectory's license file in the diff, you can click `... -> View
file` and then click on the text that says "Symbolic Link" on that page.
This will take you to the license file that it links to.

I have also updated the `tools/upgrade-version` script to update the
change date in the new `licenses/BSL.txt` file.

# API and ABI breaking changes

None.

# Expected complexity level and risk

1

# Testing

None. Only changes to license files.

---------

Co-authored-by: Zeke Foppa <bfops@users.noreply.github.com>
2025-08-12 18:20:58 +00:00
Zeke Foppa 29a0df42f7 tools/upgrade-version updates the Change Date in LICENSE.txt (#2895)
Co-authored-by: Zeke Foppa <bfops@users.noreply.github.com>
2025-06-30 16:52:23 +00:00
Jeffrey Dallatezza ea418d524d Use the --ignore-matching-lines flag of git diff. (#2720) 2025-05-12 16:12:07 +00:00
Jeffrey Dallatezza 14ba750155 Add information about the CLI version to generated code. (#2673) 2025-05-01 21:17:30 +00:00
Zeke Foppa 99d13282df CI - Publishable crates check also checks for license file (#2681)
Co-authored-by: Zeke Foppa <bfops@users.noreply.github.com>
2025-04-29 20:20:42 +00:00