GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — C# nested submodules by lisandroct · Pull Request #6112 · clockworklabs/SpacetimeDB

Conversation

@lisandroct

@lisandroct lisandroct commented Oct 8, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

Description of Changes

This PR adds support for nested C# submodules. Multiple independent instances of the same module assembly can be mounted independently of each other (for example: submodule A can mount submodule C and submodule B can also mount it's own submodule C).

  • Route tables, indexes, reducers, procedures, and views to the correct module instance.
  • Add ctx.As for passing an instance-selected context to functions that receive context.
  • Add instance-aware ctx.From query builders.
  • Add context-aware immediate scheduling overloads for reducers and procedures.
  • Add nested namespace paths in generated C# client queries (for example ctx.Db.SubmoduleA.SubmoduleC.{...}).

API and ABI breaking changes

No breaking changes.
This PR extends what we added in #5974 but everything stays compatible. Before, if a submodule mounted a submodule, that would throw an error; now it's supported.

Rollback safety impact

n/a

Expected complexity level and risk

4/5. This PR touches a lot of things: it changes module composition, generated accessors, function dispatch, runtime context handling, SQL name generation...

Testing

I added generator diagnostics and snapshot coverage, a nested-module host integration fixture, and client regressions targeting .NET 8 and .NET 10. Coverage includes independent tables and caches, deep namespace paths, dispatch, queries and joins, context selection, transaction commit/rollback, and immediate scheduling.

  • Run C# generator tests on .NET 8 and .NET 10.
  • Run the namespace_csharp standalone integration tests.
  • Run the C# client regression harness against the updated local SDK packages.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@lisandroct
lisandroct requested review from bfops, cloutiertyler and jdetter as code owners October 8, 2026 19:18
@lisandroct
lisandroct marked this pull request as draft October 8, 2026 19:18
@lisandroct
lisandroct force-pushed the lisandro/csharp-nested-submodules branch 2 times, most recently from a2ff8ca to f58a517 Compare October 14, 2026 14:31
@lisandroct lisandroct added the asap label Oct 14, 2026
@lisandroct
lisandroct requested a review from JasonAtClockwork October 14, 2026 19:33
@lisandroct
lisandroct marked this pull request as ready for review October 14, 2026 19:33
@clockwork-labs-bot clockwork-labs-bot mentioned this pull request Oct 14, 2026
CI flake: Smoketests (Windows 2/4) #6292
Closed
@lisandroct
lisandroct force-pushed the lisandro/csharp-nested-submodules branch 2 times, most recently from 2e02ed8 to bc39554 Compare October 20, 2026 19:18
JasonAtClockwork
JasonAtClockwork approved these changes Oct 20, 2026
View reviewed changes

@JasonAtClockwork JasonAtClockwork left a comment

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

Just one comment but other wise this is solid!

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread crates/bindings-csharp/Codegen/Module.cs Resolved

Uh oh!

There was an error while loading. Please reload this page.

lisandroct and others added 13 commits October 21, 2026 08:31
@lisandroct
Allow nested submodules
6422769
@lisandroct
Implement ctx.As and ctx.From
d502404
@lisandroct
Immediate scheduling with context
ba9a55b
@lisandroct
Clean up tests
1f025a0
@lisandroct
Clean up
7c17787
@lisandroct
Improve scan performance
8e77873
@lisandroct
Clean up
0741e85
@lisandroct
Verify
5c2b20a
@lisandroct
Update .g.cs files
52070db
@clockwork-labs-bot @lisandroct
docs: document C# submodules
eed3078
@aasoni @lisandroct
Update docs
b8f2dc3
Signed-off-by: Alessandro Asoni <[email protected]>
@lisandroct
Cleanup
e464218
@lisandroct
Add documentation for nested submodules
16f2305
@lisandroct
lisandroct force-pushed the lisandro/csharp-nested-submodules branch from bc39554 to 16f2305 Compare October 21, 2026 13:43
lisandroct added 2 commits October 21, 2026 09:03
@lisandroct
Address possible overlap with user methods
1cdfae2
@lisandroct
Fix broken link to RLS docs
ffeb7fd
@lisandroct
lisandroct added this pull request to the merge queue Oct 21, 2026
Merged via the queue into master with commit 06b6390 Oct 21, 2026
124 of 126 checks passed

Uh oh!

There was an error while loading. Please reload this page.

cloutiertyler added a commit that referenced this pull request Nov 4, 2026
@cloutiertyler
docs: update C# submodule and TS view-key claims for 2.14
b89a362
C# gained ctx.As selection and nested/repeated mounts in 2.14 (#6112), so
the skills no longer say C# lacks ctx.As or that only the root can mount an
assembly once. TypeScript omits primary keys from argument-bearing view rows
instead of rejecting them, and nothing prevents mounting a TS module twice.
@cloutiertyler cloutiertyler mentioned this pull request Nov 5, 2026
Update NamespaceAttribute remarks for nested C# submodules #6496
Open
1 of 2 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@JasonAtClockwork JasonAtClockwork JasonAtClockwork approved these changes
@bfops bfops Awaiting requested review from bfops
@jdetter jdetter Awaiting requested review from jdetter
@cloutiertyler cloutiertyler Awaiting requested review from cloutiertyler

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

asap

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

4 participants

@lisandroct @JasonAtClockwork @clockwork-labs-bot @aasoni
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.
You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.