# 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>
## 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>
## 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
## Description of Changes
This updates the CI check protecting the release branch, as part of
https://github.com/clockworklabs/com.clockworklabs.spacetimedbsdk/issues/226
(see that ticket for more details).
Once this is merged, it will need to be cherrypicked into our release
branch in order to take effect there.
The check itself has also been renamed. I have already updated the
branch protection rules to look for the new name.
## API
No code changes.
## Requires SpacetimeDB PRs
None
## Testsuite
SpacetimeDB branch name: master
## Testing
The previous behavior was well-tested, and I've just changed some
strings here, so I have not done further testing. It does pass on this
branch though.
Co-authored-by: Zeke Foppa <bfops@users.noreply.github.com>
## Description of Changes
This is the companion PR for
https://github.com/clockworklabs/SpacetimeDB/pull/2184, please see the
other PR for full description.
On the client side main changes are:
- Regenerate .NET and Unity test client bindings and test snapshot.
- Remove `IDatabaseRow` since V9 multi-tables splits data types from
actual table definitions, so those "table data types" are no longer
special. Just using `IStructuralReadWrite` in its place now.
- Add base index classes as mentioned in the other PR.
- As a sub-improvement, the non-unique index class actually does
indexing instead of iterating over the entire table like we did before.
- Remove internal-but-not-really `InternalInvokeValueDeleted` and
`InternalInvokeValueInserted` methods in favour of private events.
## API
- [x] This is an API breaking change to the SDK
Removes some technically-visible but internal APIs.
## Requires SpacetimeDB PRs
https://github.com/clockworklabs/SpacetimeDB/pull/2184
## 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: ingvar/csharp-new-codegen
## Testing
*Write instructions for a test that you performed for this PR*
- [x] Manually tested Blackholio
---------
Co-authored-by: James Gilles <jameshgilles@gmail.com>
## Description of Changes
Use SpacetimeDB commit hash in the cache key and skip
rebuild/reinstallation altogether if we got an exact hit.
This saves 6-8 minutes off CI time on reruns.
## 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] CI testing forth and back until it worked correctly.
## Description of Changes
Bump the version and include the DLLs from the corresponding NuGet
packages / SpacetimeDB version.
## API
- [ ] This is an API breaking change to the SDK
I believe not?
## Requires SpacetimeDB PRs
I believe this requires tag `v1.0.0-rc3-hotfix3`
## 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-rc3-hotfix3
## Testing
Only automated testing, since this itself is just a version bump.
---------
Co-authored-by: Zeke Foppa <bfops@users.noreply.github.com>
## Description of Changes
As proposed. No upstream codegen changes needed :)
## API
- [x] This is an API breaking change to the SDK
*If the API is breaking, please state below what will break*
The subscription API is slightly different.
## Requires SpacetimeDB PRs
https://github.com/clockworklabs/SpacetimeDB/pull/2111
## Testsuite
SpacetimeDB branch name: jsdt/subscribe-sdk-3
## Testing
So far I have performed manual testing with the chat example. Working on
updating the unity and unit tests.
- [ ] Describe a test for this PR that you have completed
## Description of Changes
This unifies various CI task into a single config that checks out the
referenced SpacetimeDB branch only once and using the same PR parsing
code (previously used only in Unity), and then runs all the builds and
tests against it. That is, .NET test, server module and Unity tests are
now all consistently overridden to point to the same SpacetimeDB.
## 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
- [x] Lots of CI testing and tweaking until all of existing CI tests
started working again; ensured .NET tests are executed as expected
against the specified branch name.
## 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
(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
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
*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
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
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
*Describe what has been changed, any new features or bug fixes*
Changed logging based on [this
proposal](https://github.com/clockworklabs/SpacetimeDBPrivate/pull/981)
## API
- [x] This is an API breaking change to the SDK
*If the API is breaking, please state below what will break*
Logging interface is different now. `Logger` has been renamed to `Log`,
and its methods have been renamed as well (ex. `Logger.LogError` is now
`Log.Error`)
## Requires SpacetimeDB PRs
*List any PRs here that are required for this SDK change to work*
---------
Co-authored-by: Zeke Foppa <196249+bfops@users.noreply.github.com>
Co-authored-by: Zeke Foppa <bfops@users.noreply.github.com>
Co-authored-by: Jeremie Pelletier <jeremiep@gmail.com>
Co-authored-by: Steve Boytsun <steve@clockwokrlabs.io>
Co-authored-by: Ingvar Stepanyan <me@rreverser.com>
## Description of Changes
Currently, a push to a PR triggers our `dotnet` workflows twice: once
for the `push` event, and once for the `pull_request` event.
This PR brings the CI behavior in line with how SpacetimeDB does it.
(Someday we should reduce the number of `pull_request` events that
trigger this, but today is not that day).
---------
Co-authored-by: Zeke Foppa <github.com/bfops>
## Description of Changes
Our CI now uses the packages from SpacetimeDB's `master` branch when
applicable.
## Testing
- [x] CI passes in test PR merging in the 0.11 upgrades:
https://github.com/clockworklabs/spacetimedb-csharp-sdk/pull/109
---------
Co-authored-by: Zeke Foppa <github.com/bfops>
* Committing script for building nuget package
* Script replaced with github action workflow
* On pull requests as well
* Bump version
* Updated build config
* Ready to test
---------
Co-authored-by: John Detter <no-reply@boppygames.gg>