With C# records - which are available since C# 9, so covers Unity requirements as well - we can use subclassing and pattern matching to get sum types that look a lot more like Rust tagged enums.
This is a breaking change but IMO worth it for the better API going forward.
* C#: rename DbEventArgs to ReducerContext
This is no longer an event type, so remove subclassing and rename to match the Rust API.
* Update ReducerContext argument name
* NFC: few more C# shorthand conversions
For some reason these automated refactoring conversions didn't get included in #1149.
* Also remove unused usings
* Restore a using that was erroneously marked as unused
* Simplify source generator csproj
Apparently custom scripts are no longer necessary, so removing to make maintenance simpler (noticed this while working on yet another source generator).
* Add smoketest based on Ingvar's comment, + run smoketests on Windows
* Whoops, don't mkdtemp outside of debugging
* Make smoketest sillier
* Finish up a print statement
* Revert "Make smoketest sillier"
This reverts commit 135b05b380.
* Resolve versioning issue in a non-silly, professional way.
---------
Co-authored-by: James Gilles <jameshgilles@gmail.com>
While looking through the large diffs while splitting out small PRs out of my refactor branch, I noticed that quite a lot of noise is from me working on a formatted code and using primary constructors while the one in master is not.
As such, I'm splitting out just those automated / non-functional changes into a separate PR to make subsequent functional diffs easier to read.
- Fixed column position in sequences (it used index after filtering instead of actual column index).
- Fixed sequence definitions conflicting with automatic sequences derived from Constraints.
- Removed constraints for columns that don't have any.
- Hid internal fields + more minor refactorings.
This is user-facing API that's used in docs & examples, so renaming the internal ColumnAttrs to ColumnDefWithAttrs and ConstraintFlags back to ColumnAttrs so that public examples & existing projects can still compile.
* Refactoring bootstrapping and adding full support for constraints & multi-column indexes
* Removed deleted code and add some comments
* Add comment for Constraints
* Update crates/core/src/db/datastore/locking_tx_datastore/mod.rs
Co-authored-by: Mazdak Farrokhzad <twingoow@gmail.com>
Signed-off-by: Mario Montoya <mamcx@elmalabarista.com>
* Update crates/core/src/db/datastore/locking_tx_datastore/mod.rs
Co-authored-by: Mazdak Farrokhzad <twingoow@gmail.com>
Signed-off-by: Mario Montoya <mamcx@elmalabarista.com>
* Addressing some PR comments & remove cloning
* Adding details for when fail to decode rows in replay
* Apply Kim's fix for replay bug
* Addressing some PR comments
* Merge
* Fix conflicts
* Fix conflicts
* Fix test
* Fix generation of code for csharp & typescript, now it generate FilterBy for all columns
* Fix for index generation
* Fixing C# index generation
* Merge
* Fix compilation on csharp bindings
---------
Signed-off-by: Mario Montoya <mamcx@elmalabarista.com>
Co-authored-by: Mazdak Farrokhzad <twingoow@gmail.com>
Co-authored-by: John Detter <no-reply@boppygames.gg>
* Move connection events to reducers
* More rebase fixups
* Avoid double-reference
* Filter out special reducers in generate cli
This updates filtering of `__init__` to exclude all special reducers, as well as moves the filtering to centralised place before calling language-specific generate command.
* Incrememted ABI version number
---------
Co-authored-by: Tyler Cloutier <cloutiertyler@aol.com>
This allows to make and test ABI-breaking changes much more easily than before.
For now moved them under crates/bindings-csharp - on one hand, it's not a crate, but on another it's the most logical place within our current project structure if we think of `crates` folder as general `projects` folder.