C# submodules - #5974
Draft
lisandroct wants to merge 49 commits into
Draft
C# submodules#5974lisandroct wants to merge 49 commits into
lisandroct wants to merge 49 commits into
Conversation
lisandroct
requested review from
bfops,
cloutiertyler and
jdetter
as code owners
September 23, 2026 17:07
lisandroct
marked this pull request as draft
September 23, 2026 17:07
lisandroct
force-pushed
the
lisandro/csharp-submodules
branch
from
September 25, 2026 18:52
050b6d9 to
fa97ddc
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
Implements C# submodules (namespacing), following the proposal and reusing the existing V10 submodule representation.
[Namespace(typeof(AuthLib.Marker), Accessor = "MyAuth", Name = "auth_data" )]declarations.Accessorcontrols C# access; optionalNamespecifies the canonical database namespace. When omitted, the host derives it using the root module’s case-conversion policy. Dependencies without a namespace declaration register in public.ctx.Db.MyAuth.User;library helpers retainctx.Db.Userand use the caller’s context and transaction.API and ABI breaking changes
No changes to host, it uses the existing
RawSubmoduleV10for accessor namespaces and the existingExplicitNamesnamespace mappings for canonical names.On .NET 10, contexts move from generated module types into Runtime, changing their assembly identity. Existing standalone .NET 8 modules retain generated contexts.
Rollback safety impact
n/a
Expected complexity level and risk
4/5. This PR touches a lot of systems: source generation, runtime registration, NativeAOT publication, schema composition, function dispatch, client generation, subscriptions, ... possibly more.
The main risks are incorrect assembly ownership or dispatch ordering, cross-namespace lookup mistakes, NativeAOT export/trimming behavior, and regressions in existing flat modules.
Testing
MyAuth→auth_data) and default namespace case conversion (MyAuth→my_auth).