Repository navigation
C# nested submodules - #6112
Open
lisandroct wants to merge 13 commits into
Open
C# nested submodules#6112lisandroct wants to merge 13 commits into
lisandroct wants to merge 13 commits into
Conversation
lisandroct
requested review from
bfops,
cloutiertyler and
jdetter
as code owners
October 8, 2026 19:18
lisandroct
marked this pull request as draft
October 8, 2026 19:18
lisandroct
force-pushed
the
lisandro/csharp-nested-submodules
branch
2 times, most recently
from
October 14, 2026 14:31
a2ff8ca to
f58a517
Compare
lisandroct
marked this pull request as ready for review
October 14, 2026 19:33
Signed-off-by: Alessandro Asoni <alessandro@clockworklabs.io>
lisandroct
force-pushed
the
lisandro/csharp-nested-submodules
branch
from
October 16, 2026 13:52
4f11f16 to
2e02ed8
Compare
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
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
Acan mount submoduleCand submoduleBcan also mount it's own submoduleC).ctx.Asfor passing an instance-selected context to functions that receive context.ctx.Fromquery builders.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.