Disabled codegen for private tables by default#4197
Open
JasonAtClockwork wants to merge 21 commits intomasterfrom
Open
Disabled codegen for private tables by default#4197JasonAtClockwork wants to merge 21 commits intomasterfrom
JasonAtClockwork wants to merge 21 commits intomasterfrom
Conversation
…ext (#4101) # Description of Changes Makes the `sender` field on `ViewContext` private and exposes a `sender()` method. Does the same for `ReducerContext` and `ProcedureContext`. The purpose of this change: So that the host can determine if/when a view invokes or reads the `sender`. Currently, because `sender` is a field, the host assumes that it is always read. This means views must be materialized per client, even if the view doesn't actually depend on `sender`, resulting in data duplication. The initial solution for this problem was `AnonymousViewContext` which doesn't have a `sender` field. The better solution is to make `sender` a method so that it can call into the host and record when it's actually invoked. Note, this patch only updates the module API, so the current implementation does not change. `ViewContext` views are still duplicated across clients. Changing this requires a new host syscall and for `sender()` to invoke that syscall. This however is backwards compatible and can be done anytime after the module APIs for the other languages (C#, TypeScript, C++) are updated. Also note that `ReducerContext` and `ProcedureContext` were updated purely for consistency. There are currently no plans to track reads of `sender` in these contexts. # API and ABI breaking changes Breaks the rust module api. # Expected complexity level and risk 1 # Testing N/A
# Description of Changes Make `Sender` a method on [Reducer|View|Procedure|Tx]Context in C#. Equivalent changes to #4101. # API and ABI breaking changes API breaking # Expected complexity level and risk 1 # Testing Pure refactor, no additional testing.
# Description of Changes Switch Wasm module to `__describe_module_v10__` from `__describe_module__` to expose `RawModuleDefV10` # API and ABI breaking changes 2.0 breaking change. # Expected complexity level and risk 1 # Testing Exising smoketests should be enough.
… option to enable
…roke and I'm not certain why yet
…d fixed up the Unreal tests
# Description of Changes Same changes as #4101 but for `connection_id`. # API and ABI breaking changes API Breaking # Expected complexity level and risk 1 # Testing Pure refactor. Tests and docs have been updated, but no new tests added.
gefjon
approved these changes
Feb 7, 2026
Contributor
gefjon
left a comment
There was a problem hiding this comment.
This PR has somehow wound up including some changes that I don't think should be here. That said, all of the changes do look correct, both the ones related to the PR's goal and the other ones. Not required, but for extra credit: I would consider it better Rust style to use an enum, maybe named CodegenVisibility, as the argument to iter_tables, iter_table_names_and_types, &c., with variants IncludePrivate and OnlyPublic, so the call sites look like iter_tables(module, CodegenVisibility::OnlyPublic, rather than using a boolean and having the less-explicit iter_tables(module, false).
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
Updated the codegen table iteration functions to take in a parameter to include private and defaulted it false in all locations for the supported languages.
API and ABI breaking changes
Technically API breaking as the private tables will no longer be available. (GitHub labels are not working at the moment)
Expected complexity level and risk
1 - Simple change the testing took longer
Testing
Turns out when you remove private tables you invalidate most of the module_bindings across the system!