Skip to content

[C#] Adding RawModuleDefV10 to C# Module Bindings#4262

Closed
rekhoff wants to merge 22 commits intotyler/impl-event-tablesfrom
rekhoff/csharp-raw-definition-v10
Closed

[C#] Adding RawModuleDefV10 to C# Module Bindings#4262
rekhoff wants to merge 22 commits intotyler/impl-event-tablesfrom
rekhoff/csharp-raw-definition-v10

Conversation

@rekhoff
Copy link
Contributor

@rekhoff rekhoff commented Feb 11, 2026

Description of Changes

This is the implementation of #4255

  • 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

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

  • Successfully built CLI and DLLs without errors.
  • Ran dotnet build crates/bindings-csharp/Runtime/Runtime.csproj without errors.
  • Ran dotnet test crates/bindings-csharp/Codegen.Tests/Codegen.Tests.csproj without errors.
  • Ran bash run-regression-tests.sh without errors.

cloutiertyler and others added 17 commits February 10, 2026 16:35
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.
@rekhoff rekhoff self-assigned this Feb 11, 2026
@rekhoff rekhoff marked this pull request as ready for review February 11, 2026 21:23
@rekhoff rekhoff requested a review from gefjon February 11, 2026 22:23
@rekhoff rekhoff added the api-break A PR that makes an API breaking change label Feb 11, 2026
…on-v10

Signed-off-by: Ryan <r.ekhoff@clockworklabs.io>
@rekhoff rekhoff changed the base branch from phoebe/rust-sdk-ws-v2 to tyler/impl-event-tables February 12, 2026 15:38
…tion-v10

Signed-off-by: Ryan <r.ekhoff@clockworklabs.io>
@joshua-spacetime joshua-spacetime linked an issue Feb 12, 2026 that may be closed by this pull request
// phrase (e.g. "502 Bad Gateway").
if err.is_empty() {
err = format!("{status}");
}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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?

Copy link
Contributor Author

@rekhoff rekhoff Feb 12, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

…w-definition-v10"

This reverts commit df7e103, reversing
changes made to debffa0.
@rekhoff
Copy link
Contributor Author

rekhoff commented Feb 12, 2026

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 tyler/impl-event-tables from the start and should allow for implementation of Event Tables in this C# module bindings PR.

@cloutiertyler cloutiertyler force-pushed the tyler/impl-event-tables branch from c167f07 to ce22900 Compare February 12, 2026 23:51
@rekhoff
Copy link
Contributor Author

rekhoff commented Feb 13, 2026

Closing in favor of #4288, which does the same operation but based on master

@rekhoff rekhoff closed this Feb 13, 2026
github-merge-queue bot pushed a commit that referenced this pull request Feb 13, 2026
#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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

api-break A PR that makes an API breaking change release-2.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Export RawModuleDefV10 from C# modules

3 participants