Commit Graph

251 Commits

Author SHA1 Message Date
Zeke Foppa 21684636cb [release/v1.7.0]: Update DLLs to 1.7.0 2025-11-03 07:59:36 -08:00
Zeke Foppa cda34bcc55 [bfops/bump-versions]: Bump versions to 1.7.0 2025-10-31 11:48:00 -07:00
Piotr Sarnacki 7c135e2737 New command: spacetime dev (#3469)
# Description of Changes

This PR implements a new command for the CLI: `spacetime dev`. If run
from outside of a project directory, it will call `init` in interactive
mode to allow user to create a project. If run from a project directory,
it will ask for a module to conect to and it will:

* subscribe to logs
* observe files in the `spacetimedb` directory and automatically publish
to SpacetimeDB

One caveat is that instead of reusing the `logs` code I did some
repetition cause currently the logs code acquires a lock that lives
through await points. It is fixable, but due to limited time I decided
to go with a bit of code duplication. It shouldn't be very hard to fix
later, though.

---------

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 21:04:29 +00:00
Piotr Sarnacki 8ba2ed8fb9 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
rekhoff 912cbf970c Add a SpacetimeDBException to C# SDK to aid in debugging (#3386)
# Description of Changes

This implements a fix to an issue with debugging using the C# SDK, by
adding new exception types:
* `SpacetimeDBException`, 
* `SpacetimeDBArgumentException`,
* `SpacetimeDBEmptyReducerNameException`

Additional, regenerating bindings will now allow clients to report an
`SpacetimeDBEmptyReducerNameException` rather than an
`ArgumentOutOfRangeException` when the client receives an empty reducer
name from the server.

An example of the generated code currently, that results in the
exception:
https://github.com/clockworklabs/SpacetimeDB/blob/544e2edc2d1f7d1dd118832a815b6dbd7a6c1d82/sdks/csharp/examples~/quickstart-chat/client/module_bindings/SpacetimeDBClient.g.cs#L475

Note: Normally this is not an issue for a client, because the
`SpacetimeDBEmptyReducerNameException` would be caught by the
[Try/Catch](https://github.com/clockworklabs/SpacetimeDB/blob/9f59118e24449cdd2d3e182bd44fdb26078e921b/sdks/csharp/src/SpacetimeDBClient.cs#L421C25-L421C42)
statement, but a debugger will still catch the exception and halt
operation. This can be annoying to a developer when debugging.

By separating out the exception into a custom `Exception` type, we allow
a developer to flag the new exception type as something it can ignore,
without ignoring other relevant exceptions.

# API and ABI breaking changes

Not a breaking change.
Clients will need to regenerate bindings to get the new exceptions

# Expected complexity level and risk

1

# Testing

- [X] Tested regenerating bindings and confirmed intended output.
- [X] Tested debugging and receiving
`SpacetimeDBEmptyReducerNameException` when expected.

---------

Co-authored-by: Zeke Foppa <bfops@users.noreply.github.com>
2025-10-24 20:59:19 +00:00
Zeke Foppa 63c353be88 Bump versions to 1.6.0 (#3413)
# Description of Changes

Bumping versions to 1.6.0 in preparation for upcoming release.

# API and ABI breaking changes

None

# Expected complexity level and risk

1
# Testing

- [x] Existing CI only

---------

Co-authored-by: Zeke Foppa <bfops@users.noreply.github.com>
2025-10-16 01:26:35 +00:00
Zeke Foppa e968bee895 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
rekhoff 4989ba9012 Rekhoff/csharp default field values (#3235)
# Description of Changes

This is the implementation of issue #3191. This adds a Default attribute
to C# module fields.

**Note**: In C#, attribute arguments must be compile-time constants,
which means you can't directly use non-constant expressions like new
expressions, method calls, or dynamic values in attribute constructors.
(Ref:
https://learn.microsoft.com/en-us/dotnet/csharp/language-reference/language-specification/attributes#2324-attribute-parameter-types)

For this reason, these default values are limited to primitive types,
enums, and strings.
This includes (shown as `C# Type` (`BSATN type`):

* `bool` (`Bool`)
* `sbyte` (`I8`)
* `byte` (`U8`)
* `short` (`I16`)
* `ushort` (`U16`)
* `int` (`I32`)
* `unit` (`U32`)
* `long` (`I64`)
* `ulong` (`U64`)
* `float` (`F32`)
* `double` (`F64`)
* `enum` (`Enum`)
* `string` (`String`)
* `null` (`RefOption`) <- Nullable type

Because of C# limitations, for nullable and complex data types, such as
a struct, can take use `[Default(null)]` to populate values with null
defaults. This allows things like structs to workaround the non-constant
expressions in attribute constructors limitation by allowing these
complex types to still be able to be added as new column tables.

The `int` type can also be in the form of Hex or Binary literals, such
as `[Default(0x2A)]` or `[Default(0b00101010)]`

Both Decimal (like `[Default(3.14m)]`) and Char (like `[Default('A')]`)
are unsupported types in BSATN and will still return `BSATN0001` errors.

# API and ABI breaking changes

Not API breaking.
This change only adds the `[Default(value)]` attribute logic.
Using the `[Default(value)]` attribute with older versions SpacetimeDB
C# modules will result in an error.

# Expected complexity level and risk

2

# Testing

Local testing of this requires use of CLI changes in #3278 

- [x] Regression test of functionality added.
2025-10-06 16:56:37 +00:00
Zeke Foppa 50e8183304 C# tests - update snapshots (#3321)
# Description of Changes

I chose to regenerate all of the bindings in
https://github.com/clockworklabs/SpacetimeDB/pull/3310, but that caused
the snapshots to change. This PR follows up to update them.

I also updated the outdated script `tools~/gen-quickstart-chat.sh`
(which was generating from a different module than the CI was), and
updated the CI to use it instead of manually running a similar command.

# API and ABI breaking changes

Test-only changes.

# Expected complexity level and risk

1

# Testing

- [x] unity-testsuite passes on this PR (which it does not on `master`).

---------

Co-authored-by: Zeke Foppa <bfops@users.noreply.github.com>
2025-10-01 04:01:46 +00:00
Zeke Foppa 9a4390e014 Bump versions to 1.5.0, update DLLs, and regenerate files (#3310)
# Description of Changes

Bumping versions to 1.5.0 since we have merged some new features (at the
very least, https://github.com/clockworklabs/SpacetimeDB/pull/3292)

# API and ABI breaking changes

None

# Expected complexity level and risk

1

# Testing
None

---------

Co-authored-by: Zeke Foppa <bfops@users.noreply.github.com>
2025-09-30 18:18:47 +00:00
Kim Altintop b0388bc775 Make the .NET global.json file global (#3297)
Move the global.json file to the repo root, which should make `dotnet`
resolve the correct SDK regardless of the directory it is run in.

Where a copy of the global.json file is needed, symlink it to the one at
the root.

Should fix "C#/Unity - Test Suite".
2025-09-30 16:39:21 +00:00
Zeke Foppa d071eb6174 Update C# DLLs to 1.4.0 (#3270)
# Description of Changes

I forgot to do this in
https://github.com/clockworklabs/SpacetimeDB/pull/3267.

# API and ABI breaking changes

None

# Expected complexity level and risk

1

# Testing
Unity tests passed on the release branch 🤷

---------

Co-authored-by: Zeke Foppa <bfops@users.noreply.github.com>
2025-09-23 18:27:52 +00:00
Zeke Foppa 747e12f758 Bump remaining versions to 1.4.0 (#3267)
# Description of Changes

Bumping remaining files so that everything is at 1.4.0.

# API and ABI breaking changes

None.

# Expected complexity level and risk

1

# Testing

None

---------

Co-authored-by: Zeke Foppa <bfops@users.noreply.github.com>
2025-09-23 00:35:19 +00:00
Tyler Cloutier 3eef388b6d Remove version number and git commit from all but one file in codegen (#3216)
# Description of Changes

Closes https://github.com/clockworklabs/SpacetimeDBPrivate/issues/1987

# API and ABI breaking changes

This does not affect any APIs but it does affect the code generated

# Expected complexity level and risk

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! -->

- [ ] Snap tests
2025-09-05 00:44:20 +00:00
rekhoff 451ac3d333 Updated C# quickstart-chat to pattern match variable assignment (#3173)
# Description of Changes

To address user issue
https://github.com/clockworklabs/SpacetimeDB/issues/2647 , the C#
implementation of quickstart-chat files and documentation have been
updated to pattern match the variable assignment of User.

This has the benefit of the variables never being perceived by the
analyzers as a nullable types.

# API and ABI breaking changes

Not API breaking

# Expected complexity level and risk

1

# Testing

- [X] Tested updated module code locally, following instructions from
the documentation.

Co-authored-by: John Detter <4099508+jdetter@users.noreply.github.com>
2025-08-26 21:19:01 +00:00
rekhoff 1f2d6f2eaa Add a RemoteQuery regression test to C# SDK (#3163)
# Description of Changes

Add a RemoteQuery regression test to C# SDK to address issue:
https://github.com/clockworklabs/SpacetimeDB/issues/3064
This adds on to existing regression tests, creating a rather small
change.

# API and ABI breaking changes

Not breaking change

# Expected complexity level and risk

1

# Testing

- [X] Ran `dotnet test`, all tests pass
2025-08-22 17:43:00 +00:00
Zeke Foppa 4da001e615 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 350752a817 C#/Unity SDK - Add some developer docs (#3140)
# Description of Changes

Migrating
https://github.com/clockworklabs/com.clockworklabs.spacetimedbsdk/pull/349
since we are merging that repo into this one.

> Add some developer docs.

# API and ABI breaking changes

None

# Expected complexity level and risk

1

# Testing

None. Docs only.

---------

Co-authored-by: James Gilles <jameshgilles@gmail.com>
Co-authored-by: Phoebe Goldman <phoebe@goldman-tribe.org>
Co-authored-by: Zeke Foppa <bfops@users.noreply.github.com>
2025-08-11 16:52:20 +00:00
Zeke Foppa a916977cba Add repo migration notice workflows (#3127)
# Description of Changes

Added a repo migration notice workflow to each repository that we've
merged into SpacetimeDB.

These need to be mirrored back to the actual repos with a process like:
```bash
git subtree split --prefix=sdks/typescript -b release/typescript
git push -f git@github.com:clockworklabs/spacetimedb-typescript-sdk.git release/typescript:main
git branch -D release/typescript
```

Once they're migrated there, the bot will automatically comment on any
PR or issue opened in those repos.

# API and ABI breaking changes

None. CI-only changes.

# Expected complexity level and risk

2

# Testing

- [x] In a demo repo, it properly commented and closed a PR:
https://github.com/clockworklabs/github-tooling-test/pull/42
- [x] In a demo repo, it properly commented and closed an issue:
https://github.com/clockworklabs/github-tooling-test/issues/43

---------

Co-authored-by: Zeke Foppa <bfops@users.noreply.github.com>
2025-08-05 20:30:42 +00:00
rekhoff 261145c874 Implement reduced coupling between SpacetimeDBClient.cs and Table.cs (#3122)
## Description of Changes
Moves table-specific operations out of `SpacetimeDBClient.cs` and into
`Table.cs` in order to reduce coupling between the two files.

This is the implementation of
https://github.com/clockworklabs/SpacetimeDB/issues/3047

This is a PR being duplicated/migrated from
https://github.com/clockworklabs/com.clockworklabs.spacetimedbsdk/pull/346,
which contains prior discussion/review/approval.

## API

 - [ ] This is an API breaking change to the SDK

## Requires SpacetimeDB PRs
No PRs needed, works with latest master

## Testsuite
SpacetimeDB branch name: master

## Testing
- [X] Opened and ran Blackhol.io within Unity Editor and successfully
connecting to a locally running server
- [X] Compiled a WebGL build of Blackhol.io and successfully connecting
to a locally running server
- [x] Opened and ran BitCraft within Unity Editor and successfully
connecting to a locally running server
2025-08-05 16:59:58 +00:00
Zeke Foppa 4936ac985f Update DLLs to 1.3.0 (#3018)
# Description of Changes

I forgot to do this in the original version bump PR... I just ran
`dotnet pack` and then moved the meta files.

# API and ABI breaking changes

None

# Expected complexity level and risk

1

# Testing

None.

---------

Co-authored-by: Zeke Foppa <bfops@users.noreply.github.com>
2025-08-01 20:03:55 +00:00
Zeke Foppa 0370fcb324 Bump versions to 1.3.0 (#3005)
# Description of Changes

Bumped all versions to 1.3.0 in preparation for an upcoming minor
release.

# API and ABI breaking changes

No breaking changes.

# Expected complexity level and risk

1

# Testing

None

---------

Co-authored-by: Zeke Foppa <bfops@users.noreply.github.com>
2025-07-30 19:16:16 +00:00
Zeke Foppa 924f718949 Bump C#/Unity Client SDK versions to 1.2.2 (#2994)
# Description of Changes

I ran `python3 tools~/upgrade-version.py 1.2.2` in preparation for an
upcoming release.

# API and ABI breaking changes

None

# Expected complexity level and risk

1
# Testing

None, just a version bump.

Co-authored-by: Zeke Foppa <bfops@users.noreply.github.com>
2025-07-28 17:35:37 +00:00
Tuan Tran ac5e5edd10 Generate Websocket token from auth in Unity WebGL build (#2988)
# Description of Changes

This is a fix for community bug which auth token is not used to create
Websocket connection in Unity WebGL build.
The issue here:
https://github.com/clockworklabs/com.clockworklabs.spacetimedbsdk/issues/352

# API and ABI breaking changes

None

# Expected complexity level and risk

1

# Testing

- [ ] Using OAuth2.0 tokens, you should get the same `Identity` even
when the token is refreshed in the WebGL build
2025-07-28 08:42:13 +00:00
Zeke Foppa 3908157c3a CI - Check C# quickstart-chat bindings are up to date (#2979)
Co-authored-by: Zeke Foppa <bfops@users.noreply.github.com>
2025-07-25 17:49:27 +00:00
Alex Nemeth 6bbc9971e4 Update quickstart-chat client module bindings from server (#2976)
Co-authored-by: rekhoff <r.ekhoff@clockworklabs.io>
Co-authored-by: Zeke Foppa <196249+bfops@users.noreply.github.com>
2025-07-24 23:38:24 +00:00
rekhoff f52da8d24b Moved Remove operation to start of Table.Apply (#2967)
Co-authored-by: John Detter <4099508+jdetter@users.noreply.github.com>
2025-07-24 17:11:10 +00:00
Zeke Foppa dae6f177cb Update GitHub files for C#/Unity SDK (#2952)
Co-authored-by: Zeke Foppa <bfops@users.noreply.github.com>
2025-07-21 14:44:47 +00:00
rekhoff 7dbe03c5d2 Update WebGL message queue to 1.2.1 format (#342)
## Description of Changes
This is a fix for community bug
https://github.com/clockworklabs/com.clockworklabs.spacetimedbsdk/issues/340
that was the result of changes to SpacetimeDBClient code that missed
changes to the WebGL build.

## API

 - [ ] This is an API breaking change to the SDK

## Requires SpacetimeDB PRs
- None

## Testsuite
SpacetimeDB branch name: master

## Testing

- [X] Tested changes against Blackholio running under a Unity WebGL
build
2025-07-07 10:36:20 -04:00
Zeke Foppa 830b23d22b Add tools~/upgrade-version.py (#335)
## Description of Changes
I'm tired of messing up version updates. I "vibecoded" a script to do
it.

## API

 - [ ] This is an API breaking change to the SDK

No. No changes to runtime code.

## Requires SpacetimeDB PRs
None

## Testsuite
SpacetimeDB branch name: master

## Testing
```
$ python3 tools~/update-version.py 1.1.1
Updated: ./SpacetimeDB.ClientSDK.csproj
Updated: ./tests~/tests.csproj
Updated: ./examples~/regression-tests/server/StdbModule.csproj
Updated: ./examples~/regression-tests/client/client.csproj
Updated: ./examples~/quickstart-chat/server/StdbModule.csproj
Updated: ./examples~/quickstart-chat/client/client.csproj
Updated version in package.json to 1.1.1

$ git diff -U1
diff --git a/SpacetimeDB.ClientSDK.csproj b/SpacetimeDB.ClientSDK.csproj
index 5248df6..b3ca7e8 100644
--- a/SpacetimeDB.ClientSDK.csproj
+++ b/SpacetimeDB.ClientSDK.csproj
@@ -18,4 +18,4 @@
     <RepositoryUrl>https://github.com/clockworklabs/com.clockworklabs.spacetimedbsdk</RepositoryUrl>
-    <AssemblyVersion>1.2.1</AssemblyVersion>
-    <Version>1.2.1</Version>
+    <AssemblyVersion>1.1.1</AssemblyVersion>
+    <Version>1.1.1</Version>
     <DefaultItemExcludes>$(DefaultItemExcludes);*~/**</DefaultItemExcludes>
@@ -27,3 +27,3 @@
   <ItemGroup>
-    <PackageReference Include="SpacetimeDB.BSATN.Runtime" Version="1.2.*" />
+    <PackageReference Include="SpacetimeDB.BSATN.Runtime" Version="1.1.*" />
 
diff --git a/examples~/quickstart-chat/server/StdbModule.csproj b/examples~/quickstart-chat/server/StdbModule.csproj
index 0513a81..f290d22 100644
--- a/examples~/quickstart-chat/server/StdbModule.csproj
+++ b/examples~/quickstart-chat/server/StdbModule.csproj
@@ -16,3 +16,3 @@
   <ItemGroup>
-    <PackageReference Include="SpacetimeDB.Runtime" Version="1.2.*" />
+    <PackageReference Include="SpacetimeDB.Runtime" Version="1.1.*" />
   </ItemGroup>
diff --git a/examples~/regression-tests/server/StdbModule.csproj b/examples~/regression-tests/server/StdbModule.csproj
index c6b1cba..3284863 100644
--- a/examples~/regression-tests/server/StdbModule.csproj
+++ b/examples~/regression-tests/server/StdbModule.csproj
@@ -10,3 +10,3 @@
   <ItemGroup>
-    <PackageReference Include="SpacetimeDB.Runtime" Version="1.2.*" />
+    <PackageReference Include="SpacetimeDB.Runtime" Version="1.1.*" />
   </ItemGroup>
diff --git a/package.json b/package.json
index 7839151..a627246 100644
--- a/package.json
+++ b/package.json
@@ -3,3 +3,3 @@
   "displayName": "SpacetimeDB SDK",
-  "version": "1.2.1",
+  "version": "1.1.1",
   "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-06-25 11:57:53 -04:00
Zeke Foppa da4751c42e Bump Unity package version to 1.2.1 (#334)
## Description of Changes
Missed in
https://github.com/clockworklabs/com.clockworklabs.spacetimedbsdk/pull/333.

We should update the 1.2.1 tag and the `release/latest` branch after
this.

## API

 - [ ] This is an API breaking change to the SDK

Nope

## Requires SpacetimeDB PRs
None

## Testsuite
SpacetimeDB branch name: master

## Testing
CI only

Co-authored-by: Zeke Foppa <bfops@users.noreply.github.com>
2025-06-23 16:57:33 -07:00
Zeke Foppa 32211d38d0 Bump versions to 1.2.1 (#333)
## Description of Changes
These version bumps were supposed to happen in
https://github.com/clockworklabs/com.clockworklabs.spacetimedbsdk/pull/332,
but apparently I messed something up while I was switching branches.

## API

 - [ ] This is an API breaking change to the SDK

No breaking changes

## Requires SpacetimeDB PRs
None.

## Testsuite
SpacetimeDB branch name: master

## Testing
CI only

Co-authored-by: Zeke Foppa <bfops@users.noreply.github.com>
2025-06-23 20:18:28 +00:00
Zeke Foppa 29800191a0 Bump to 1.2.1 (#332)
## Description of Changes
Updates the DLLs for
https://github.com/clockworklabs/SpacetimeDB/pull/2762, and bumps our
version numbers as well.

## API

 - [ ] This is an API breaking change to the SDK

Not a breaking change

## Requires SpacetimeDB PRs
None afaik

## Testsuite
SpacetimeDB branch name: master

## Testing
*Write instructions for a test that you performed for this PR*

- [x] Ran through Bitcraft tutorial
- [x] Blackholio on CI

---------

Co-authored-by: James Gilles <jameshgilles@gmail.com>
Co-authored-by: Zeke Foppa <bfops@users.noreply.github.com>
2025-06-23 18:39:43 +00:00
james gilles 863812aadb More granular request process tracking (#330)
## Description of Changes
Addresses
https://github.com/clockworklabs/SpacetimeDBPrivate/issues/1786 and
https://github.com/clockworklabs/com.clockworklabs.spacetimedbsdk/issues/329.
Marks messages as parsed from the background parsing thread, and then
marks them as applied using a separate tracker once they are applied.

## API

 - [ ] This is an API breaking change to the SDK

*If the API is breaking, please state below what will break*

## Requires SpacetimeDB PRs

## Testsuite

SpacetimeDB branch name: master

## Testing

- [x] Testing against Bitcraft
2025-06-18 13:37:52 -04:00
james gilles 4050cea8a3 Faster Stats.cs (#326)
## Description of Changes
`NetworkRequestTracker` previously was keeping all historical reducer
request data, and searching through this every frame to get statistics.
I've modified it to throw out much more data -- it's much faster now,
but only updates every few seconds.

## API

Not an API break, but deprecates an argument of one of
NetworkRequestTracker's methods to no longer do anything.

Adds new APIs.

## Requires SpacetimeDB PRs
N/A

## Testsuite

SpacetimeDB branch name: master

## Testing

- [x] Tested Bitcraft. **Their F9 debug menu will require an update,
since we now only keep one time window of request data, rather than
being able to give information about multiple windows.** But it works.
- [x] Blackholio CI
2025-06-06 17:02:30 -04:00
Lisandro Crespo e3dae5b071 Example of custom event handling (#327)
## Description of Changes
*Describe what has been changed, any new features or bug fixes*

## API

 - [ ] This is an API breaking change to the SDK

*If the API is breaking, please state below what will break*

## Requires SpacetimeDB PRs
*List any PRs here that are required for this SDK change to work*

## Testsuite
*If you would like to run the your SDK changes in this PR against a
specific SpacetimeDB branch, specify that here. This can be a branch
name or a link to a PR.*

SpacetimeDB branch name: master

## Testing
*Write instructions for a test that you performed for this PR*

- [ ] Describe a test for this PR that you have completed

---------

Co-authored-by: Alessandro Asoni <alessandro@clockworklabs.io>
Co-authored-by: James Gilles <jameshgilles@gmail.com>
2025-06-06 18:28:17 +00:00
Zeke Foppa e17bf5ba64 Bump versions to 1.2.0 (#328)
## Description of Changes
Bump versions to 1.2.0, as well as update the DLLs from SpacetimeDB
(commit `fc8f7dcc8`). They don't have any changes, but the versions
needed bumping.

## API

This itself is not a breaking changes.

## Requires SpacetimeDB PRs
https://github.com/clockworklabs/SpacetimeDB/pull/2837

## Testsuite
SpacetimeDB branch name: release/v1.2.0

## Testing
CI only

---------

Co-authored-by: Zeke Foppa <bfops@users.noreply.github.com>
2025-06-06 18:07:24 +00:00
Zeke Foppa cc70c3731a Update DLLs to 1.1.2 (#322)
## Description of Changes
Update DLLs to the 1.1.2 versions that have been pushed to NuGet.

The SpacetimeDB tag that they were built from is
`v1.1.2-csharp-release`.

## API

 - [ ] This is an API breaking change to the SDK

*If the API is breaking, please state below what will break*

## Requires SpacetimeDB PRs
None, because we're updating the DLLs to essentially include SpacetimeDB
PRs.

## Testsuite
SpacetimeDB branch name: master

## Testing
CI I guess?

Co-authored-by: Zeke Foppa <bfops@users.noreply.github.com>
2025-05-22 15:40:54 -04:00
Zeke Foppa fbebfa7115 Bump versions to 1.1.5 (#320)
## Description of Changes
Just bumping version numbers in preparation for a release.

The Unity SDK and C# SDK had different version numbers. That seems
confusing, so I bumped them both to 1.1.5.

## API

No breaking changes

## Requires SpacetimeDB PRs
None, afaik

## Testsuite
SpacetimeDB branch name: master

## Testing
None

Co-authored-by: Zeke Foppa <bfops@users.noreply.github.com>
2025-05-21 19:35:23 +00:00
james gilles 0771e3e32c Recreate #311 (#317)
## Description of Changes
Recreating #311 using a branch in this repo in the hope of fixing the
Unity build.

## API

 - [ ] This is an API breaking change to the SDK


## Requires SpacetimeDB PRs

## Testsuite

SpacetimeDB branch name: master

## Testing

- [x] blackholio
- [ ] bitcraft

---------

Co-authored-by: Guribo <guribovr@gmail.com>
2025-05-15 22:41:37 +00:00
james gilles e842a6030d Faster deserialization (#315)
## Description of Changes
Leverages https://github.com/clockworklabs/SpacetimeDB/pull/2725 to
speed up row deserialization. Also updates DLLs for recent upstream
fixes.

Changes:
- Uses much simpler code when deserializing enums, avoiding the use of
reflection
- Uses manually monomorphized row deserialization methods, which again
avoid the use of reflection when constructing row objects

## API

 - [ ] This is an API breaking change to the SDK

*If the API is breaking, please state below what will break*

## Requires SpacetimeDB PRs
https://github.com/clockworklabs/SpacetimeDB/pull/2725

## Testsuite

SpacetimeDB branch name: jgilles/perf/faster-allocation

## Testing
*Write instructions for a test that you performed for this PR*

- [x] Blackholio
- [x] Bitcraft (have done a basic test but no in-depth testing)
2025-05-15 18:15:56 -04:00
james gilles 9508440073 Fix list equals (#316)
Update DLLs and generated code for SpacetimeDB 74ad4a14c
2025-05-12 20:55:15 +00:00
joshua-spacetime 1e9ff08fe0 Add comment on the performance of LINQ for reading BSATN (#309) 2025-04-28 17:13:28 +00:00
james gilles bee52daa56 Significantly reduce small byte array allocations (#305)
This purges the DbValue type, instead using row instances themselves as
primary key for rows without primary keys. In addition, it instantiates
only a single BinaryReader when reading updates for a table, rather than
instantiating a BinaryReader and performing an array copy per-row of the
table.

Addresses
https://github.com/clockworklabs/SpacetimeDBPrivate/issues/1633

## API

 - [ ] This is an API breaking change to the SDK

*If the API is breaking, please state below what will break*

## Requires SpacetimeDB PRs

## Testsuite

SpacetimeDB branch name: master

## Testing
*Write instructions for a test that you performed for this PR*

- [ ] CI

---------

Co-authored-by: rekhoff <r.ekhoff@clockworklabs.io>
2025-04-26 09:08:44 -07:00
John Detter a182e70e31 Bump version to 1.1.4 (#307)
## Description of Changes
*Describe what has been changed, any new features or bug fixes*

- Bumps version to 1.1.4

## API

Not breaking

 - [ ] This is an API breaking change to the SDK

*If the API is breaking, please state below what will break*

## Requires SpacetimeDB PRs
*List any PRs here that are required for this SDK change to work*

## Testsuite
*If you would like to run the your SDK changes in this PR against a
specific SpacetimeDB branch, specify that here. This can be a branch
name or a link to a PR.*

SpacetimeDB branch name: master

## Testing
*Write instructions for a test that you performed for this PR*

This is just a version bump
2025-04-25 09:53:04 -07:00
John Detter 4548c58def Version Bump 1.1.3 (#303)
## Description of Changes
*Describe what has been changed, any new features or bug fixes*

- Bumps version to 1.1.3

## API

This is not an API breaking change

 - [ ] This is an API breaking change to the SDK

*If the API is breaking, please state below what will break*

## Requires SpacetimeDB PRs
*List any PRs here that are required for this SDK change to work*

- None

## Testsuite
*If you would like to run the your SDK changes in this PR against a
specific SpacetimeDB branch, specify that here. This can be a branch
name or a link to a PR.*

SpacetimeDB branch name: master

## Testing
*Write instructions for a test that you performed for this PR*

This is just a version bump, CI is sufficient.
2025-04-24 15:58:41 +00:00
james gilles 81c5c76170 Pre-decompress query updates (#302)
This dramatically improves performance by avoiding the default
implementation of BrotliStream.ReadByte() inherited from Stream, which
allocates an array per byte read.

## API

 - [ ] This is an API breaking change to the SDK

*If the API is breaking, please state below what will break*

## Requires SpacetimeDB PRs

## Testsuite

SpacetimeDB branch name: master

## Testing
*Write instructions for a test that you performed for this PR*

- [ ] Describe a test for this PR that you have completed
2025-04-23 20:44:16 -07:00
james gilles 299181a9fa Implement OnUnhandledReducerError (#295)
## Description of Changes
SDK side of https://github.com/clockworklabs/SpacetimeDB/pull/2636
Addresses
https://github.com/clockworklabs/com.clockworklabs.spacetimedbsdk/issues/281

## API

 - [ ] This is an API breaking change to the SDK

## Requires SpacetimeDB PRs
https://github.com/clockworklabs/SpacetimeDB/pull/2636

## Testsuite
*If you would like to run the your SDK changes in this PR against a
specific SpacetimeDB branch, specify that here. This can be a branch
name or a link to a PR.*

SpacetimeDB branch name: jgilles/on-unhandled-reducer-error

## Testing

- [ ] Add a test that this works to the regression-tests example module
2025-04-23 13:50:53 -07:00
Zeke Foppa 4409d317ce Bump version to 1.1.2 (#301)
## Description of Changes
Bumping the version since 1.1.1 has been released.

## API

No breaking changes

## Requires SpacetimeDB PRs
None

## Testsuite
SpacetimeDB branch name: master

## Testing
None, just a version bump.

Co-authored-by: Zeke Foppa <bfops@users.noreply.github.com>
2025-04-23 10:36:30 -07:00
Zeke Foppa 2ad2cb27bc Update DLLs to 1.1.1 (#300)
## Description of Changes
Just bumping the DLLs for a version number update. No actual changes.

## API

No breaking changes

## Requires SpacetimeDB PRs


## Testsuite
SpacetimeDB branch name: master

## Testing
Just existing CI. This only bumps versions.

---------

Co-authored-by: Zeke Foppa <bfops@users.noreply.github.com>
2025-04-22 20:43:28 +00:00