[C#] Adding RawModuleDefV10 to C# Module Bindings#4262
[C#] Adding RawModuleDefV10 to C# Module Bindings#4262rekhoff wants to merge 22 commits intotyler/impl-event-tablesfrom
RawModuleDefV10 to C# Module Bindings#4262Conversation
Each validated schema type (TableDef, IndexDef, ReducerDef, etc.) now has its own From impl for the corresponding V10 raw type, mirroring the existing V9 conversions. The main From<ModuleDef> for RawModuleDefV10 is simplified to use .into() calls.
- Split Table trait: independent EventTable (insert-only) and Table (insert + delete) traits in the Rust client SDK - Codegen generates EventTable impl for event tables, Table impl for persistent tables; skips TableWithPrimaryKey, unique accessors, and cache diff for event tables - Event table inserts fire on_insert callbacks without persisting to the client cache via into_event_diff() - Filter event tables from V1 SELECT * FROM * subscriptions - Reject event tables as lookup table in subscription semi-joins - Disallow event tables in view definitions - Switch extract_schema to V10 output format - Regenerate test client bindings with V10 codegen
…t tables - Add sdk-test-event-table module and event-table-client test harness - Add three integration tests: basic event table, multiple events in one reducer, and events-don't-persist-across-transactions - Add compile-time tests for CanBeLookupTable enforcement on event tables - Add returns_event_table() to SubscriptionPlan and Plan - Reject v1 WebSocket subscriptions to event tables with a clear error message directing developers to upgrade to v2
- Add exec_v1_rejects_event_table test verifying v1 clients get a clear error when subscribing to event tables - Mark the 3 event table integration tests as #[ignore] since they require v2 WebSocket support in the Rust SDK (not yet implemented) - Add docs/event-tables-status.md tracking what's implemented vs remaining from the event tables proposal
The client can synthesize on_delete from the insert since every event table row is a noop. Implementers may defer on_delete generation.
- Replace on_<reducer>() callbacks with _then() invocation pattern - Replace Status::Failed/OutOfEnergy with Status::Err/Panic - Remove CallReducerFlags, set_reducer_flags, Event::UnknownTransaction - Remove ReducerEvent.caller_identity/caller_connection_id field access - Use noop_then() instead of on_noop() in event-table-client
- Pass the generated request_id into CallReducer message instead of hardcoded 0, matching the procedure code pattern - Remove #[ignore] from event table tests now that SDK uses v2 - Remove v1_rejects_event_table test (SDK no longer uses v1)
Move completed items (v2 subscription path, Rust SDK v2, reducer callback deprecation, active integration tests) from "Not Yet Implemented" to "Implemented". Add "Deferred" section for well-defined but postponed work (on_delete codegen, joins, views). Add "Known Issues" section documenting v2 test stability and the fixed request_id bug. Fix proposal link path.
…tion, and current state
…on-v10 Signed-off-by: Ryan <r.ekhoff@clockworklabs.io>
…tion-v10 Signed-off-by: Ryan <r.ekhoff@clockworklabs.io>
| // phrase (e.g. "502 Bad Gateway"). | ||
| if err.is_empty() { | ||
| err = format!("{status}"); | ||
| } |
There was a problem hiding this comment.
I think this is a change from a different PR? I guess maybe master was merged in but it's not merged into the base branch?
There was a problem hiding this comment.
I think all these changes must have been from the rebasing from phoebe/rust-sdk-ws-v2 to tyler/impl-event-tables. It looks like the rebase made quite a mess of things.
Basically what was done here was:
Before:
master <- jsdt/ws-v2 <- phoebe/rust-sdk-ws-v2 <- rekhoff/csharp-raw-definition-v10
master <- jsdt/ws-v2 <- phoebe/rust-sdk-ws-v2 <- tyler/impl-event-tables
After:
master <- jsdt/ws-v2 <- phoebe/rust-sdk-ws-v2 <- tyler/impl-event-tables <- rekhoff/csharp-raw-definition-v10
They should have shared a base branch tree, so I'm not sure why it went sideways just yet.
|
I will be cancelling/closing this PR, in favor of #4284 , since this one has it's change list thoroughly messed up from that rebase. 4284 is built on |
c167f07 to
ce22900
Compare
|
Closing in favor of #4288, which does the same operation but based on |
#4288) # Description of Changes This is the implementation of #4255 This is a rebuild of #4262 after a rebase throughly messed up that PR's changelog, this time under `master` branch. * Refactored `Module` so all V10 builder state and registration helpers now live on `partial class RawModuleDefV10`. The static `Module` class simply registers components against that builder and serializes via `moduleDef.BuildModuleDefinition()` * Removed the deprecated `__describe_module__` export. Only `__describe_module_v10__` is emitted now across the runtime, native shim, generated bindings, and snapshots * Mirrored the Rust TODO that future V10 sections will cover Event tables and Case-conversion policy so we don't lose track of those items Event Tables will be added once they are finished being implemented. # API and ABI breaking changes Modules built with these bindings now expose only `__describe_module_v10__` The legacy `__describe_module__` symbol is gone from both managed and native layers. Hosts expecting the old export must switch to the V10 entry point (which is already the canonical ABI for 2.0). # Expected complexity level and risk 2 - Low. The refactor keeps the previous builder logic but relocates it, and the export removal matches the already-supported V10 host path. # Testing - [X] Successfully built CLI and DLLs without errors. - [X] Ran `dotnet build crates/bindings-csharp/Runtime/Runtime.csproj` without errors. - [X] Ran `dotnet test crates/bindings-csharp/Codegen.Tests/Codegen.Tests.csproj` without errors. - [X] Ran `bash run-regression-tests.sh` without errors. --------- Co-authored-by: clockwork-labs-bot <clockwork-labs-bot@users.noreply.github.com>
Description of Changes
This is the implementation of #4255
Moduleso all V10 builder state and registration helpers now live onpartial class RawModuleDefV10. The staticModuleclass simply registers components against that builder and serializes viamoduleDef.BuildModuleDefinition()__describe_module__export. Only__describe_module_v10__is emitted now across the runtime, native shim, generated bindings, and snapshotsAPI and ABI breaking changes
Modules built with these bindings now expose only
__describe_module_v10__The legacy
__describe_module__symbol is gone from both managed and native layers. Hosts expecting the old export must switch to the V10 entry point (which is already the canonical ABI for 2.0).Expected complexity level and risk
2 - Low. The refactor keeps the previous builder logic but relocates it, and the export removal matches the already-supported V10 host path.
Testing
dotnet build crates/bindings-csharp/Runtime/Runtime.csprojwithout errors.dotnet test crates/bindings-csharp/Codegen.Tests/Codegen.Tests.csprojwithout errors.bash run-regression-tests.shwithout errors.