Skip to content

C# nested submodules - #6112

Open
lisandroct wants to merge 13 commits into
masterfrom
lisandro/csharp-nested-submodules
Open

lisandroct wants to merge 13 commits into
masterfrom
lisandro/csharp-nested-submodules

Conversation

@lisandroct

@lisandroct lisandroct commented Oct 8, 2026 •

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.

@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 marked this pull request as ready for review October 14, 2026 19:33
@lisandroct
lisandroct force-pushed the lisandro/csharp-nested-submodules branch from 4f11f16 to 2e02ed8 Compare October 16, 2026 13:52

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants