Commit Graph

233 Commits

Author SHA1 Message Date
Zeke Foppa b53f998941 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 40ec970d17 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 12fb5d423b 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 e107144998 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 81ba753f53 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 5f75c9d4d9 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 e0ae18c99e 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 ce90583f6b 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 62a1378153 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 ccc4d06ddb 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 533c14bea3 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 6c419ccaa5 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 4b1cce2527 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 d62d85afbd 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 79de507dee 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 e168ec6f90 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 e3b392ad81 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 544085caf0 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 5baf66b628 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 a198faddd5 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 c03b962c07 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 8bde94af32 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 b46a894d31 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 c813fb321d Fix list equals (#316)
Update DLLs and generated code for SpacetimeDB 74ad4a14c
2025-05-12 20:55:15 +00:00
joshua-spacetime 3dabd47bc8 Add comment on the performance of LINQ for reading BSATN (#309) 2025-04-28 17:13:28 +00:00
james gilles 590e873a50 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 78f5000740 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 875605878b 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 5ad9baa304 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 b6f8362b75 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 3ed21c4910 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 c99c4cb376 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
Daniel Kierkegaard Andersen 20ed2dc067 SpacetimeDB working in Unity WebGL Builds (#286)
## Description of Changes
As it stands today, Unity WebGL doesn't work. Partially the reason for
this is Multi-Threading, and the other reason is the use of
`ClientWebSocket`. In order to fix this (specifically in the case of
Unity), here's some changes that _can_ be made. Note that this is mostly
a suggestion and does come with a few flaws, though arguably it might
still be better than it not working at all? Up to you!

The Tl;Dr of how it works, is to:
- **MultiThreading Problem**: simply invoke the `Task.Run` functions on
main thread instead, and use a coroutine in place of where the two
simultaneous threads was expected.
- **ClientWebSocket**: Use a `.jslib` to create the WebSocket directly
within Javascript, and then have JS call the corresponding correct
functions.

DISCLAIMER: currently OnClose doesn't quite work correctly as
`__allocate` isn't invoked correctly.

## API

Not a breaking change to the API, should be internal implementation
details

## Requires SpacetimeDB PRs
None

## Testsuite
????

SpacetimeDB branch name: master

## Testing
Open the Blackholeio project, try building it for WebGL

- [X] Made a game using the feature:
https://daxode.itch.io/eat-to-the-deep

---------

Co-authored-by: rekhoff <r.ekhoff@clockworklabs.io>
Co-authored-by: John Detter <no-reply@boppygames.gg>
Co-authored-by: John Detter <4099508+jdetter@users.noreply.github.com>
Co-authored-by: James Gilles <jameshgilles@gmail.com>
2025-04-22 12:59:23 -07:00
Zeke Foppa 0fa4cf9da1 CI - Release branch check auto-changes base branch (#298)
## Description of Changes
Instead of our CI failing and telling the user that a PR should be based
on `master`, we automatically change the base branch to `master`.

## API

No code changes.

## Requires SpacetimeDB PRs
None

## Testsuite
SpacetimeDB branch name: master

## Testing
- [x] See below, where the new CI changed the base branch of this PR!
- [x] On this test PR, the base branch was not changed:
https://github.com/clockworklabs/com.clockworklabs.spacetimedbsdk/pull/299

---------

Co-authored-by: Zeke Foppa <bfops@users.noreply.github.com>
2025-04-22 19:12:33 +00:00
Zeke Foppa ce7828e4fe Bump versions to 1.1.1 (#297)
## Description of Changes
Just bumping version numbers in preparation for an upcoming release.

I also relaxed the version constraints in the `.csproj` files to be
flexible in their patch versions.

## API

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

No breaking changes.

## Requires SpacetimeDB PRs
None

## Testsuite
SpacetimeDB branch name: master

## Testing
Just existing CI, since this just bumps version numbers.

Co-authored-by: Zeke Foppa <bfops@users.noreply.github.com>
2025-04-22 12:01:57 -07:00
james gilles f32754b3c7 Fix row deduplication issues (#294)
## Description of Changes
Addresses
https://github.com/clockworklabs/SpacetimeDBPrivate/issues/1585

There was an issue with row deduplication when a TransactionUpdate of
the form:

```
+ k1: v1
- k1: v1
- k1: v1
+ k1: v2
```
appeared, where `k1` is the primary key of a row and `v1`, `v2` are the
full values of that row. The old manner of processing updates would see
this as a no-op. I've updated the logic to handle this case correctly,
at the cost of an extra equality comparison per row in an update.
(Actually it's slightly cheaper than this, it skips the equality
comparison if there is only row with a particular primary key in an
update. This may help speed up processing of large updates e.g. chunk
data in BitCraft.)

## 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] Added a failing test, then fixed it
2025-04-18 08:59:08 -07:00
Zeke Foppa 47e9638a9c Bump version in package.json (#293)
## Description of Changes
Bump yet another version number.

## 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
None

---------

Co-authored-by: Zeke Foppa <bfops@users.noreply.github.com>
2025-04-15 23:09:43 +00:00
Zeke Foppa f24b0e8f86 Update DLLs to 1.1.0 (#288)
## Description of Changes
Update DLLs to 1.1.0.

## API

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

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

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

## Testing
We tested this with some bots

---------

Co-authored-by: Zeke Foppa <bfops@users.noreply.github.com>
2025-04-15 14:48:05 -07:00
james gilles 7d25b033e8 Switch to a better index data structure (#291)
## Description of Changes
This should fix
https://github.com/clockworklabs/com.clockworklabs.spacetimedbsdk/issues/290

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

- [ ] CI Tests
- [ ] Double-check bitcraft perf regression

Co-authored-by: John Detter <4099508+jdetter@users.noreply.github.com>
2025-04-14 14:28:55 -07:00
John Detter 468a6f142b Fix warning message for failed to track reducer call (#280)
## Description of Changes
*Describe what has been changed, any new features or bug fixes*

- Fixes an issue that was reported in the discord where a user was
connecting 2 clients to the same SpacetimeDB module with the same
identity but different connection IDs.

## API

- This is not breaking.

## Requires SpacetimeDB PRs

None

## Testsuite

SpacetimeDB branch name: master

## Testing

- [x] Build blackholio as a player build and launch it twice. You can
play on both clients without seeing this warning in Player.log.

---------

Co-authored-by: John Detter <no-reply@boppygames.gg>
Co-authored-by: Zeke Foppa <bfops@users.noreply.github.com>
2025-04-12 01:24:41 +01:00
james gilles 3543132c7d Fix for unsubscribe bug + regression tests (#264)
## Description of Changes

This PR fixes one issue and adds regression tests for it, plus another
issue. These regression tests are run on CI. You can also run them
locally -- run a local spacetime instance and then
`tools~/run-regression-tests.sh ../SpacetimeDB`).

### Issue 1: Unsubscribe is non-functional

See
https://github.com/clockworklabs/com.clockworklabs.spacetimedbsdk/issues/279.
This was a coding mistake made during the rush to 1.0. It was easily
fixed.

### Issue 2: Indexes not tracking deletes

This was recently discovered by the BitCraft team.

The problem was introduced in
https://github.com/clockworklabs/com.clockworklabs.spacetimedbsdk/commit/cefc727b7693fe97e3dd848fef2bb17bf20c8be6
which introduced `RemoteTableHandle<EventContext,
Row>.IndexBase<Column>`. This class stores a `Dictionary<Column,
List<Row>>` to allow fast filtering. It relies on `List<Row>.Remove` to
remove elements from a list when a row delete is received.
`List<Row>.Remove` relies on `Row.Equals` to determine when elements are
equal.

`Row.Equals` formerly was not implemented for `[SpacetimeDB.Type]`s or
for generated Row types. So, this didn't work.

Now it does: it was fixed by
https://github.com/clockworklabs/SpacetimeDB/pull/239 . So all this PR
does to address this issue is add a regression test.

## API

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

The interface IDbConnection was changed; however, this changed part of
the interface is `internal`, so this should be entirely invisible to
users.

## Requires SpacetimeDB PRs
https://github.com/clockworklabs/SpacetimeDB/pull/239 (merged)

## 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*

- [x] Added a repro for both issues
- [x] Added the repro to CI
- [x] Fixed both issues
2025-03-28 20:15:51 +00:00
Zeke Foppa d4267b3904 Bump versions to 1.1.0 (#282)
## Description of Changes
Bumped version numbers to 1.1.0.

## API

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

No, this just updates to the latest version.

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

## Testsuite
SpacetimeDB branch name: bfops/bump-version

## Testing
- [x] Existing CI passes (when pointed at the corresponding SpacetimeDB
branch)

Co-authored-by: Zeke Foppa <bfops@users.noreply.github.com>
2025-03-28 00:04:47 +00:00
rekhoff 89c019c14f Bump package version to 1.0.1 (#272)
Updates package version to 1.0.1

## API

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

## Requires SpacetimeDB PRs
No specific PR needed

## Testsuite

SpacetimeDB branch name: release/v1.0.1

## Testing

- [X] Confirmed Unity sees version as 1.0.1 after change
2025-03-14 16:38:42 -05:00
Zeke Foppa 23c2dc083f Update DLLs to 1.0.1 (#269)
## Description of Changes
I don't know if the DLLs need updating, but updated the DLLs just in
case.

## API

Incorporate any chances in SpacetimeDB 1.0.1. There should be no
breaking changes.

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

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

## Testing
None. Will test in release.

---------

Co-authored-by: Zeke Foppa <bfops@users.noreply.github.com>
2025-03-14 04:18:02 +00:00
rekhoff 4d3f0a0edc Resolved 404 and references to deprecated tutorial repos. (#268)
## Description of Changes
Updated two README docs:
* README.md - Updated links to point to Blackholio repo and tutorial
docs.
* README.dotnet.md - Updated to point to new URL paths for C# SDK
Quickstart and Reference docs.

## API

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

## Requires SpacetimeDB PRs
N/A - Docs only change

## Testsuite
N/A - Docs only change

SpacetimeDB branch name: master

## Testing

- [X] Clicked on each new link and confirm the browser can locate the
new locations.

---------

Co-authored-by: Zeke Foppa <bfops@users.noreply.github.com>
Co-authored-by: John Detter <no-reply@boppygames.gg>
2025-03-13 18:53:03 -07:00
rekhoff 9523ba3d27 Adds tests of GenericEqualityComparer (#271)
Adds an additional test of the `GenericEqualityComparer` function for
`Integer`, `String`, `Byte Array`, `Identity`, `User` and `TaggedEnum` type
comparisons.

This PR resolves additional checks as reported in by [Issue
230](https://github.com/clockworklabs/com.clockworklabs.spacetimedbsdk/issues/230)
that where not-yet covered elsewhere.

## API

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

## Requires SpacetimeDB PRs
No other PR are needed for this to work.

## Testsuite
SpacetimeDB branch name: master

## Testing
- [X] Locally ran `dotnet test` against the `tests.csproj` project and
it passed all tests
2025-03-13 16:50:18 -07:00
John Detter bbdb0fd6d8 Minor Version Bump to 1.0.1 (#261)
## Description of Changes
*Describe what has been changed, any new features or bug fixes*

I've already pushed this out to nuget here:
<https://www.nuget.org/packages/SpacetimeDB.ClientSDK>

- We want to update our REAME on nuget.org because the README that we
released as part of 1.0.1 was very much out of date.

## 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*

NA

## 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*

- [x] The README is updated.

Co-authored-by: John Detter <no-reply@boppygames.gg>
2025-03-12 04:15:32 +00:00
Zeke Foppa 421256a77f Relax the version constraint on SpacetimeDB nuget package (#270)
## Description of Changes
Relaxed this version number from `1.0.0` to `1.0.*`

## API
No breaking changes.

## Requires SpacetimeDB PRs
None

## Testsuite

SpacetimeDB branch name: master

## Testing
Existing CI should run `dotnet test` and confirm that this is not
broken.

---------

Co-authored-by: Zeke Foppa <bfops@users.noreply.github.com>
2025-03-11 20:57:10 -07:00
james gilles e21566a4e2 Update README (#260)
## Description of Changes
Just link to the existing docs.

## 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
2025-03-03 23:39:37 -06:00
rekhoff 25689c14bd Update C# server and client quickstart examples to match tutorial document. (#258)
# Description of Changes
Update the C# server and client SDK quickstart-chat example to match the
code presented in the tutorial, as of
https://github.com/clockworklabs/spacetime-docs/pull/170 .
Also renamed the directory from `quickstart` to `quickstart-chat` in
order to be more specific.

# 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

## Requires SpacetimeDB PRs
SpacetimeDB branch name: master
com.clockworklabs.spacetimedbsdk: master

# 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] Ran `quickstart-chat` C# server and C# client locally and:
  - Set my name.
  - Sent a message.
  - Restarted and viewed the message backlog.
  - Sent a few more messages.
- Exited, deleted my local token, restarted and connected as a new
identity.
  - Set my new identity's name.
  - Sent a message as my new identity.

---------

Co-authored-by: Zeke Foppa <bfops@users.noreply.github.com>
Co-authored-by: John Detter <no-reply@boppygames.gg>
Co-authored-by: james gilles <jameshgilles@gmail.com>
2025-03-03 13:35:30 -08:00