Add support for browser platform#353
Closed
alex47 wants to merge 220 commits into
Closed
Conversation
…i-updates Some API updates
…i-updates2 More API updates
…w updates and reducer events
…Improvements API callback improvements
…ption Add sslEnabled option to Connect function
* Fix compilation issue with master * Initial push for SATS (still WIP) * Small build fix * Small update * Updates from meeting with Tyler * Fixed issues with LayoutExplicit and added some missing functions * AlgebraicValue cleanup * Copied changes from BitCraftMini * Removed TypeDef --------- Co-authored-by: Clockwork Labs <no-reply@clockworklabs.io> Co-authored-by: Tyler Cloutier <cloutiertyler@aol.com> Co-authored-by: John Detter <no-reply@boppygames.gg>
* Upload script to help deploying to our partners * You have to specify hosts individually * Small fix * Another small fix - tested + working --------- Co-authored-by: John Detter <no-reply@boppygames.gg>
* Serialize byte arrays as hex * Fix namespace * Small fix --------- Co-authored-by: John Detter <no-reply@boppygames.gg>
* First pass * Committing meta file * Removed option type - unneeded * Implementing new some converter * Some converter updates * Tons of fixes here * Cleaned up the some/enum serialization implementation --------- Co-authored-by: John Detter <no-reply@boppygames.gg>
Co-authored-by: John <no-reply@boppygames.gg>
Co-authored-by: John Detter <no-reply@boppygames.gg>
…ckworklabs#15) Co-authored-by: John Detter <no-reply@boppygames.gg>
* Several updates to the way ClientCache + processing updates works * Client cache changes working * Removed log statements --------- Co-authored-by: John Detter <no-reply@boppygames.gg>
* Copied changes from BitCraft * Applied state diff changes * State diffs complete * Compilation fix * Fix build issues --------- Co-authored-by: John Detter <no-reply@boppygames.gg>
* Pulled SpacetimeUnitySDK from the BitCraft project * Removed unused logs * Removed primary key functionality * Fix compilation issues with older version of C# * Primary key client implementation * Another row update fix --------- Co-authored-by: John <no-reply@boppygames.gg>
* Pulled SpacetimeUnitySDK from the BitCraft project * Removed unused logs * Removed primary key functionality * Fix compilation issues with older version of C# --------- Co-authored-by: John <no-reply@boppygames.gg>
* Adding event parameter to table callbacks * Reverted a namespace change --------- Co-authored-by: Steve <steve@codefics.com> Co-authored-by: John Detter <4099508+jdetter@users.noreply.github.com>
Co-authored-by: Derek Brinkmann <dbrinkmann@citadelstudios.net>
* Add onSubscriptionUpdate callback * Remove unnecesary onTransactionComplete --------- Co-authored-by: Derek Brinkmann <dbrinkmann@citadelstudios.net>
…ed from callbacks (clockworklabs#20) Co-authored-by: Steve <steve@codefics.com>
* Deserializing reducer args before table updates so they can be accessed from callbacks * Reducer arguments in table events * Removed redundant onSubscriptionUpdate --------- Co-authored-by: Steve <steve@codefics.com> Co-authored-by: John Detter <4099508+jdetter@users.noreply.github.com> Co-authored-by: John Detter <no-reply@boppygames.gg>
Co-authored-by: Steve <steve@codefics.com>
Co-authored-by: John Detter <no-reply@boppygames.gg>
* Deserializing reducer args before table updates so they can be accessed from callbacks * Reducer arguments in table events * Adding OnBeforeDelete event to tables * Renaming ReducerCallInfo to ReducerEvent * Removed extra onSubscriptionUpdate --------- Co-authored-by: Steve <steve@codefics.com> Co-authored-by: John Detter <4099508+jdetter@users.noreply.github.com>
* Deserializing reducer args before table updates so they can be accessed from callbacks * Reducer arguments in table events * Adding OnBeforeDelete event to tables --------- Co-authored-by: Steve <steve@codefics.com> Co-authored-by: John Detter <4099508+jdetter@users.noreply.github.com>
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
## 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.
## 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
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>
Update DLLs and generated code for SpacetimeDB 74ad4a1
## Description of Changes Leverages clockworklabs/SpacetimeDB#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 clockworklabs/SpacetimeDB#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)
## Description of Changes Recreating clockworklabs#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>
## 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>
## 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>
## 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 clockworklabs/SpacetimeDB#2837 ## Testsuite SpacetimeDB branch name: release/v1.2.0 ## Testing CI only --------- 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* ## 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>
## 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
## Description of Changes Addresses https://github.com/clockworklabs/SpacetimeDBPrivate/issues/1786 and clockworklabs#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
## Description of Changes Updates the DLLs for clockworklabs/SpacetimeDB#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>
## Description of Changes These version bumps were supposed to happen in clockworklabs#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>
## Description of Changes Missed in clockworklabs#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>
## 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>
## Description of Changes This is a fix for community bug clockworklabs#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
Contributor
Author
|
Root issue: clockworklabs/SpacetimeDB#2414 |
Collaborator
|
Thank you for doing this & opening a PR! Are you willing to open it against the https://github.com/clockworklabs/SpacetimeDB/ repo in the Sorry for the confusion! |
4 tasks
Contributor
Author
|
I opened a new PR here: clockworklabs/SpacetimeDB#2975 |
Collaborator
|
I'm going to close this PR since it has been migrated over to the main repo. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description of Changes
This is a continuation of: #274
I have applied those changes to the latest codebase.
Added support for the browser platform.
This required:
Thread.Startwith aTask(Thread.Startis not supported forbrowserplatforms)PreProcessMessagesasync, in order to use Channels async methodsTaskto be allowed to run on a separate thread (ConfigureAwait(false))BlockingCollection(which is not supported on thebrowserplatform) withChannel(which is supported on all platforms)IDbConnection.Connectto run on any thread, not necessarily the caller (ConfigureAwait(false))Ws.Options.UseDefaultCredentials = true;(this is alreadytrueby default. In addition, using this setter is not being supported bybrowserplatforms.)Ws.Options.SetRequestHeaderis not supported onbrowserplatformAPI
N/A. No changes to the API.
Requires SpacetimeDB PRs
N/A
Testsuite
SpacetimeDB branch name: master
Testing
Testing was performed manually inside of a Blazor WebAssembly Standalone App, using the reference quickstart-chat code.
The test project can be found here: https://github.com/alex47/BlazorWebassemblyChat