Commit Graph

3186 Commits

Author SHA1 Message Date
joshua-spacetime 7a6d59c988 Do not double compress subscribe messages (#2665) 2025-04-23 23:37:34 +00:00
james gilles eeb3333f1f Implement OnUnhandledReducerError in C# (#2636) 2025-04-23 22:38:58 +00: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
Aaron Matthis a70339488c rls docs self-join example: undefined 'u' sql name -> 'a' (#330)
fix: undefined 'u' sql name -> 'a'
2025-04-23 17:41:36 +00: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 118e59de14 CI - Do some basic checks that crates are publishable (#2660)
Co-authored-by: Zeke Foppa <bfops@users.noreply.github.com>
2025-04-23 17:08:43 +00:00
Jeffrey Dallatezza 1eb2dbd370 Subscribe to all the subscriptions together in the quickstart example. (#173) 2025-04-23 07:59:19 -07:00
Loki McKay b27ed08baa Fix typo in quickstart.md (#331) 2025-04-23 13:49:25 +00: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
Jeffrey Dallatezza 69ec80331f Typescript Generation: Wrap union types in parens if for arrays (#2615) 2025-04-22 19:32:18 +00:00
Zeke Foppa 3083c1b83e Bump versions to 1.1.1 (#2658)
Co-authored-by: Zeke Foppa <bfops@users.noreply.github.com>
2025-04-22 19:20:17 +00: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
Bastian Ganze be38694dec Make ws connection fail when token is invalid (#176)
* Make ws connection fail when token is not verified

* add changeset

---------

Co-authored-by: Jeffrey Dallatezza <jeffreydallatezza@gmail.com>
2025-04-22 11:36:17 -07:00
Mario Montoya 4bc618f467 Return the query text with subscription errors (#2609) 2025-04-21 20:57:49 +00:00
joshua-spacetime f69113f536 Fix filter pushdowns in the presence of rls (#2653) 2025-04-21 19:33:22 +00:00
joshua-spacetime 304b4881ff Do not publish RLS rules on private tables (#2645) 2025-04-21 19:32:57 +00:00
Zeke Foppa 6ebb2abe34 spacetimedb-update self-install fails if the install fails. (#2642)
Co-authored-by: Zeke Foppa <bfops@users.noreply.github.com>
2025-04-21 18:47:25 +00:00
Zeke Foppa 9565b2fc43 Remove .changeset/pre.json (#177)
Co-authored-by: Zeke Foppa <bfops@users.noreply.github.com>
2025-04-21 11:41:01 -07:00
Jeffrey Dallatezza 9f09e8ac53 Use camel case for typescript unique indexes (#2628) 2025-04-21 17:58:02 +00:00
Jeffrey Dallatezza 81ef6a0adc Update docs links to remove index.md (#316)
These links are broken in the live docs, but removing index.md from the links fixes them for me.

Co-authored-by: Zeke Foppa <196249+bfops@users.noreply.github.com>
2025-04-21 17:44:41 +00:00
Tamaro Skaljic 4b48e003b1 fix links from rls docs to sql docs on website (#323)
Co-authored-by: Zeke Foppa <196249+bfops@users.noreply.github.com>
2025-04-21 09:35:53 -07:00
torjusik 11aeb5efea Fixed typo (#320)
multple -> multiple
2025-04-21 09:26:15 -07:00
Zeke Foppa 2d0b4127c2 CI - Test spacetimedb-update self-install (#2637)
Co-authored-by: Zeke Foppa <bfops@users.noreply.github.com>
2025-04-19 01:44:20 +00:00
John Detter ae85f64bcb Fix error with the install script (#2635)
Co-authored-by: John Detter <no-reply@boppygames.gg>
2025-04-18 18:51:48 +00: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
Mazdak Farrokhzad 65e12b994b datastore: fix two inserts in tx state with unique idx (#2610) 2025-04-17 19:20:47 +00:00
Zeke Foppa c0334498de CI - Check the CLI docs (#318)
* [bfops/cli-ci]: CI - Check the CLI docs

* [bfops/cli-ci]: fix

* [bfops/cli-ci]: fix permission warnings

* [bfops/cli-ci]: review

* [bfops/cli-ci]: review

---------

Co-authored-by: Zeke Foppa <bfops@users.noreply.github.com>
2025-04-17 10:57:11 -07:00
Zeke Foppa c7f89fa82d Revert CLI reference to match what the CLI outputs (#317)
[bfops/revert-docs]: revert

Co-authored-by: Zeke Foppa <bfops@users.noreply.github.com>
2025-04-17 10:36:54 -07:00
Noa 1963cd8e98 Monotonic timestamps (#2618) 2025-04-17 17:19:52 +00:00
Tamaro Skaljic 66561205f5 rename http/index.md to "Authorization" #235 (#308) 2025-04-16 13:48:59 -07:00
Tamaro Skaljic b1b4724a04 Remove experimental label of C# #246 (#305) 2025-04-16 16:10:08 -04:00
Tamaro Skaljic 31c9ee5116 Rename module to database where appropriate (#277)
* clients connect to databases, not modules

* the name is for the database, not the module

* reducers are exposed by databases, not modules

* don't name clients "modules" too

* Modules have no state, the database has it

* more database instead of client connection

* databases are hosted, not modules

* users interact with databases, not modules

* fix typo

* Apply suggestions from code review

Co-authored-by: Tyler Cloutier <cloutiertyler@users.noreply.github.com>

* Apply suggestions from code review

Co-authored-by: Tyler Cloutier <cloutiertyler@users.noreply.github.com>

---------

Co-authored-by: Tyler Cloutier <cloutiertyler@users.noreply.github.com>
2025-04-16 16:09:48 -04:00
Tamaro Skaljic b74b5a6323 fix sql identifier casing in c# quickstart test query #220 (#309) 2025-04-16 10:26:28 -07:00
Tamaro Skaljic 1cb61db0a5 remove specific programming lang for server module code (#312)
in unity tutorial text. There was confusion: https://discord.com/channels/1037340874172014652/1037343189339742298/1361811650713227285
2025-04-16 10:22:22 -07:00
Jeffrey Dallatezza 1aad021869 Count bytes_written for updates (#2616) 2025-04-16 17:11:51 +00:00
Zeke Foppa 6da76ed14e Fix building and publishing the auth crate (#2622)
Co-authored-by: Zeke Foppa <bfops@users.noreply.github.com>
2025-04-16 14:58:05 +00:00
Zeke Foppa 9064c0b8ed tools/publish-crates.sh - Automatically find list of dependencies (#2595)
Co-authored-by: Zeke Foppa <bfops@users.noreply.github.com>
2025-04-16 14:35:29 +00:00
Phoebe Goldman e7cb1ee00f Add docs for indexable types to C# (#285)
Includes references to changes made by
https://github.com/clockworklabs/SpacetimeDB/pull/2506 ,
which as of writing has not merged.
We should not push this commit live until after that PR is released.
2025-04-16 09:58:40 -04:00
Kim Altintop a3614cee45 core: Restore calling the on_panic hook when a reducer call panics (#2624) 2025-04-16 13:09:36 +00:00
Zeke Foppa edc68cba4e 1.1.0 release (#170)
Co-authored-by: Zeke Foppa <bfops@users.noreply.github.com>
2025-04-15 18:52:15 -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 4ec9d11e7a CI - Fix job that packages the CLI for release (#2617)
Co-authored-by: Zeke Foppa <bfops@users.noreply.github.com>
2025-04-15 22:00:52 +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
Zeke Foppa 228436cfa8 Deploying: Maincloud: add section for connecting via SDKs (#311)
* [bfops/maincloud-sdks]: wIP

* [bfops/maincloud-sdks]: WIP

* [bfops/maincloud-sdks]: do thing

* [bfops/maincloud-sdks]: review

---------

Co-authored-by: Zeke Foppa <bfops@users.noreply.github.com>
2025-04-15 13:30:40 -07:00
Noa a98e44dc8a Allocate fewer vecs in eval_updates (#2567) 2025-04-15 17:23:39 +00:00
Michael Nadeau 0ba2b78442 Fix typo in unity/part-2.md (#298) 2025-04-15 09:03:02 -07:00
Phoebe Goldman 57fa739c6d Add docs for FilterableValue to rust bindings crate (#2547)
Co-authored-by: Mazdak Farrokhzad <twingoow@gmail.com>
2025-04-15 01:56:35 +00:00
Phoebe Goldman 289396f7b5 Add convention for table names to style guide (#300) 2025-04-14 20:33:08 -04:00