## Description of Changes
Per out-of-band discussion, add
`SubscriptionBuilder.SubscribeToAllTables`, which abstracts over
`SubscriptionBuilder.Subscribe(["SELECT * FROM *"])`.
In the future, we will change the implementation of this method, so that
it uses "legacy subscriptions" while `SubscriptionBuilder.Subscribe`
moves to using "mutable subscriptions." At that time, no other interface
will be provided for using "legacy subscriptions."
`SubscribeToAllTables` may also at some point be rewritten in terms of
"mutable subscriptions" somehow.
## API
- [ ] This is an API breaking change to the SDK
*If the API is breaking, please state below what will break*
## Requires SpacetimeDB PRs
N/a
## 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] @cloutiertyler will use this in the new tutorial and report back.
---------
Co-authored-by: Ingvar Stepanyan <ingvar@clockworklabs.io>
Co-authored-by: Zeke Foppa <196249+bfops@users.noreply.github.com>
Co-authored-by: Zeke Foppa <bfops@users.noreply.github.com>
Co-authored-by: Tyler Cloutier <cloutiertyler@users.noreply.github.com>
## Description of Changes
Looks like the .meta check hard-fails on push events if
`enable_pr_comment` is `true`, instead of just ignoring it...
I hope this fix works, but hard to tell without merging first.
## 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*
- [x] This is a PR that changes CI configuration, so see CI
## Description of Changes
Adds CI check to prevent issues like #208.
## 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
## Description of Changes
`WithCredentials` was designed for our old auth model, where tokens were
always issued by the SpacetimeDB host alongside an `Identity`, and
therefore the bearer always knew their `Identity`.
In our new auth model, a client may have a valid auth-able JWT but not
know what `Identity` it will result in,
as the `Identity` is computed based on the hash of some of the token's
contents, and this hashing algorithm is not included in our client SDKs.
As such, this PR revises `WithCredentials` to `WithToken`, which just
accepts the token.
## API
- [x] This is an API breaking change to the SDK
*If the API is breaking, please state below what will break*
`WithCredentials` is renamed and its signature changes.
## 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*
- [ ] @cloutiertyler should test this with the Unity tutorial, if
possible.
---------
Co-authored-by: Zeke Foppa <196249+bfops@users.noreply.github.com>
## Description of Changes
Bump package version to `1.0.0-rc3` and do a preliminary upgrade of the
DLLs.
I believe the DLLs might need updating again once the BSATN.Runtime
package is pushed to NuGet (because then it will be fetched from NuGet).
## API
Not API breaking.
## Requires SpacetimeDB PRs
https://github.com/clockworklabs/SpacetimeDB/pull/2094
## Testsuite
SpacetimeDB branch name: release/v1.0.0-rc3
## Testing
- [x] Existing CI is successful (pointed at the RC3 SpacetimeDB branch).
---------
Co-authored-by: Zeke Foppa <bfops@users.noreply.github.com>
## Description of Changes
This is a requested DX improvement to make sure that IDE shows
reasonable argument names instead of `arg0`...`argN`.
Fixes
https://github.com/clockworklabs/com.clockworklabs.spacetimedbsdk/issues/200.
## API
- [x] This is an API breaking change to the SDK
*If the API is breaking, please state below what will break*
Potentially breaking in obscure edge cases, if someone already had
`Action<...> myCallback;` that they passed to those APIs as C# won't
cast it automatically to our custom delegate type.
## Requires SpacetimeDB PRs
*List any PRs here that are required for this SDK change to work*
## Testsuite
*If you would like to run against a specific SpacetimeDB branch in the
testsuite, 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] `dotnet test`
## Description of Changes
Updates Unity tests to include fix from
https://github.com/clockworklabs/SpacetimeDBCircleGame/pull/10.
## 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
Fixes#202.
Because SELECT * is ambiguous if the query is a join
## Description of Changes
Bug Fix
Previously `RemoteQuery` would implicitly `SELECT *`. This was wrong
because you can use `RemoteQuery` to issue join queries.
## 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: v1.0.0-rc1
## Testing
*Write instructions for a test that you performed for this PR*
- [ ] Describe a test for this PR that you have completed
## Description of Changes
(this is a reopening of #204 which targeted wrong branch)
I don't know when or why this broke (or, rather, how it worked before),
but we're installing .NET 7 but packing BSATN.Runtime that multi-targets
.NET Standard 2.1 + .NET 8. The latter part, as you'd expect, fails on
CI.
~~This change tells `dotnet pack` to only pack for .NET Standard 2.1
since that's the one we're interested in on the client - .NET 8 support
is only for C# server modules.~~ _Narrator: that didn't work out._
This change bumps .NET SDK to 8.0 because I still don't know how it
worked before with .NET 7, and this seems like the more sensible
solution anyway.
## 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
## Description of Changes
This bumps the unity-test submodule
## API
No API Change
## Requires SpacetimeDB PRs
No special PRs, should work with latest master of SpacetimeDB.
## 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
I opened up this commit of CircleGame in Unity on my own machine and ran
the tests. They seemed to work fine.
## Description of Changes
Counterpart to https://github.com/clockworklabs/SpacetimeDB/pull/2033.
Also updated test settings to make sure that sum type variants
implemented via subclassing are shown as expected.
## 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 against a specific SpacetimeDB branch in the
testsuite, 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
## Description of Changes
Just bump `package.json` to `1.0.0-rc1` instead of `1.0.0`.
## API
No breaking changes
## Requires SpacetimeDB PRs
None
## Testing
Co-authored-by: Zeke Foppa <bfops@users.noreply.github.com>
## Description of Changes
Fix the quickstart client program, also removes the rust server program (it lives in the stdb main repo under modules/quickstart-chat)
## Testing
Second subscription resets the first one without the fix
## Testsuite
SpacetimeDB branch name: master
## Description of Changes
*Describe what has been changed, any new features or bug fixes*
- switched our "already connected" logic to using a reference to a
`MonoBehaviour` instead of just a bool. `MonoBehaviour`s are typically
destroyed when a scene reload happens and in this case we'll want to
allow developers to spawn a new `SpacetimeDBNetworkManager` if the
previous one has been destroyed.
## API
This is *not* an API break.
- [ ] 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*
- https://github.com/clockworklabs/SpacetimeDB/pull/1869
## Testsuite
SpacetimeDB branch name: master
## Testing
*Write instructions for a test that you performed for this PR*
- [x] I have added in several new tests here, one of which is a
reconnection test. Also, the reason why we couldn't have more than 1
test before this is that it was required for reconnections to be working
in order to have multiple tests running in the testsuite. Now that we
have fixed reconnections I have enabled all of the tests.
Testsuite passes

---------
Co-authored-by: John Detter <no-reply@boppygames.gg>
Co-authored-by: Mazdak Farrokhzad <twingoow@gmail.com>
Co-authored-by: Jeremie Pelletier <jeremiep@gmail.com>
Co-authored-by: Zeke Foppa <bfops@users.noreply.github.com>
**Please do not rebase this PR**
## Description of Changes
*Describe what has been changed, any new features or bug fixes*
This is very similar to
https://github.com/clockworklabs/com.clockworklabs.spacetimedbsdk/pull/176
except it imports the circle game as a submodule instead of copying the
code over into this repo. This is the SpacetimeDBCircleGame PR that
we're dependent on right now:
https://github.com/clockworklabs/SpacetimeDBCircleGame/pull/3
- This PR introduces a testsuite which runs in Unity. Right now it just
spawns in a circle, eats some food and verifies the decay logic is
working correctly. I've also written some reconnection tests but they
don't work because reconnections are currently broken. There are also
one-off tests but those don't work either because they also require
reconnections to be working.
Update: reconnections have been fixed via
https://github.com/clockworklabs/com.clockworklabs.spacetimedbsdk/pull/168.
I've used the built-in unity testsuite framework to achieve this, along
with the UnityCI tool from GameCI. The documentation for this docker
container can be found here:
https://game.ci/docs/github/getting-started/
## API
- [ ] This is an API breaking change to the SDK
*If the API is breaking, please state below what will break*
Not breaking
## Requires SpacetimeDB PRs
*List any PRs here that are required for this SDK change to work*
None
## Testsuite
SpacetimeDB branch name: 0935b7346b
## Testing
*Write instructions for a test that you performed for this PR*
- [x] The testsuite is passing:
https://github.com/clockworklabs/com.clockworklabs.spacetimedbsdk/actions/runs/11604456943/job/32313229775
You can follow test instructions here to double check my work:
https://github.com/clockworklabs/SpacetimeDBCircleGame/pull/3
## Follow-up Actions
- [ ] Rebase the reconnection logic PR onto this PR and re-enable the
reconnection tests
---------
Co-authored-by: John Detter <no-reply@boppygames.gg>
## Description of Changes
This PR edits the handling of errors related to websocket connections
and disconnections. In particular, clients and users would often run
into the dreaded `Connection Error: Success` message which was confusing
and frustrating. This PR better addresses the error by providing more
guidance and debug info for the user. It is unfortunately still
suboptimal because the `HttpStatusCode` is not available in the .NET
core version that Unity supports. We try to be as helpful as possible in
this scenario.
## API
- [x] This is an API breaking change to the SDK, because it changes the
returned values from the `OnDisconnect` and `OnConnectError` callbacks
to implement the API specification:
https://github.com/clockworklabs/SpacetimeDBPrivate/pull/866/files#diff-be533cc04817c33605a68d717c6ec320c4449904266ee8e1096971e9e17e8d31R424
## Requires SpacetimeDB PRs
No changes to SpacetimeDB required.
## Testing
I, Tyler, have tested this and confirmed it to be working with
CircleGame. Here is a sample of the output in the case of `Connection
Error: Success`:
<img width="1324" alt="image"
src="https://github.com/user-attachments/assets/2b98c69f-07e2-4d0b-a61f-0ae4f84d62f6">
---------
Co-authored-by: John Detter <no-reply@boppygames.gg>
Co-authored-by: Tyler Cloutier <cloutiertyler@aol.com>
Co-authored-by: Zeke Foppa <bfops@users.noreply.github.com>
## Description of Changes
*Describe what has been changed, any new features or bug fixes*
Context:
https://discord.com/channels/568217153853980682/669989878955638785/1301132060878049332
Currently, when we receive subscription updates, a table will only be
diffed if subscription has any rows for that table. If, however, there
are no subscribed values, that table will NOT be diffed, and therefore
will not get cleared. Values from previous subscription will still be
there, so the table is in incorrect state.
This PR fixes that by making sure that ALL tables are checked in state
diff
## 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*
## Testing
*Write instructions for a test that you performed for this PR*
- [ ] Create a table A with an `val: i32` field
- [ ] Generate rows for table A with field values in the range (0..100)
- [ ] Connect client and subscribe to `SELECT * FROM A WHERE val > 0`
(will have all rows from table A)
- [ ] Change your subscription to `SELECT * FROM A WHERE val > 1000`
(should have no rows)
- [ ] Note that after subscription is applied, table A will have no
values
Co-authored-by: Steve Boytsun <steve@clockwokrlabs.io>
## Description of Changes
Update the SpacetimeDB C# DLLs to be up to date with `master` in
SpacetimeDB (now that C# bindings have been bumped to `v1.0.0-rc1`).
We will need a followup PR
## API
Not a breaking change.
## Requires SpacetimeDB PRs
`master`
## Testing
Only automated tests
---------
Co-authored-by: Zeke Foppa <bfops@users.noreply.github.com>
## Description of Changes
*Describe what has been changed, any new features or bug fixes*
PR 155 introduced a build issue in Unity:

This PR reverts back to a known working commit. I have tested after
reverting the commit and the branch is back to working properly.
## API
- [ ] This is an API breaking change to the SDK
*If the API is breaking, please state below what will break*
Not breaking
## Requires SpacetimeDB PRs
*List any PRs here that are required for this SDK change to work*
## Testing
*Write instructions for a test that you performed for this PR*
- [x] Tested circle game against this commit and it builds + works
Co-authored-by: John Detter <no-reply@boppygames.gg>
## 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*
---------
Co-authored-by: John Detter <no-reply@boppygames.gg>
## Description of Changes
Update with the latest DLLs from the current 0.12.0 branch.
## 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*
---------
Co-authored-by: Zeke Foppa <bfops@users.noreply.github.com>
## 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*
## 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*
Co-authored-by: John Detter <no-reply@boppygames.gg>
## Description of Changes
*Describe what has been changed, any new features or bug fixes*
- Upgrade version to 0.12.
## 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*
Co-authored-by: John Detter <no-reply@boppygames.gg>
This got broken when we switched to a new DbConnection API.
Keep track of all the active connections and update/destroy them from a
singleton game object. Fixes#134.
Marked as a draft for now, because it's untested and because we're not
yet sure that singleton for all connections as requested is the right
approach.
## 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*
---------
Co-authored-by: John Detter <4099508+jdetter@users.noreply.github.com>
Co-authored-by: John Detter <no-reply@boppygames.gg>
## Description of Changes
Turns out, we're not ready for single Subscribe per query, so bringing
back this ability.
## 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*
Co-authored-by: John Detter <4099508+jdetter@users.noreply.github.com>
## Description of Changes
Updated the DLLs for 0.12.0 from the PR:
```
commit 0a7512d2a8db0dcff05aaee92f260e53d71cdc80 (HEAD -> release/v0.12.0-beta, origin/release/v0.12.0-beta)
Author: Zeke Foppa <bfops@users.noreply.github.com>
Date: Thu Oct 3 09:35:27 2024 -0700
[release/v0.12.0-beta]: Manually apply open PR #1707: c# client generate
```
## 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*
---------
Co-authored-by: Zeke Foppa <bfops@users.noreply.github.com>
Co-authored-by: John Detter <4099508+jdetter@users.noreply.github.com>
## 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*
## Description of Changes
We have some flaky bug where Events are getting modified while we're
already iterating over them in the snapshot.
I think this might've been fixed by #144, but add extra checks just in
case so that the exception is thrown in a concrete event that causes it,
and not inside snapshot serialization.
## 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*
## Description of Changes
Not sure when or how this was added (it's not on master), but this
folder shouldn't be here - we have `tools~` instead.
## 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*
## Description of Changes
Adds a utility script to generate `nuget.config` given a path to the
`SpacetimeDB` repo.
## API
No
## Requires SpacetimeDB PRs
None
## Testing
- [x] CI
- [x] Ran locally
---------
Co-authored-by: Zeke Foppa <bfops@users.noreply.github.com>
## 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*
## Description of Changes
*Describe what has been changed, any new features or bug fixes*
## API
- [x] 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*
## Description of Changes
Same as https://github.com/clockworklabs/SpacetimeDB/pull/1735 but for
this repo.
## 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*
## Description of Changes
Without explicit reference these result in
> error CS0119: 'UnityDebugLogger.Debug(string)' is a method, which is
not valid in the given context
## 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*
## Description of Changes
Removing unstable APIs that are not used by BitCraft; marking others
with [Obsolete] and renaming few others to match the proposal.
One exception is InternalCallReducer - it would need some further
changes to codegen; marking it as Obsolete right now would cause all
generated clients to show noisy warnings.
## API
- [x] 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*
## 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*
## Description of Changes
Merges cache into the table handle as suggested on the original PR +
hides most table methods that shouldn't be part of the stable API.
Few remaining methods will need a codegen change to be available only to
subclasses, so for now that's out of scope.
Same for merging ClientCache into RemoteTables - we shouldn't need a
separate collection, and instead could autogenerate a switch expression
over table name.
## 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*
## Description of Changes
Implements the subscription builder (at least, the parts that are
possible to implement).
## 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*