[2.0 Breaking]: Remove sender field from [Reducer|View|Procedure]Context#4208
Merged
joshua-spacetime merged 3 commits intomasterfrom Feb 5, 2026
Merged
[2.0 Breaking]: Remove sender field from [Reducer|View|Procedure]Context#4208joshua-spacetime merged 3 commits intomasterfrom
joshua-spacetime merged 3 commits intomasterfrom
Conversation
5720eb1 to
feab78f
Compare
Shubham8287
approved these changes
Feb 5, 2026
c03927b to
d771a00
Compare
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
Makes the
senderfield onViewContextprivate and exposes asender()method. Does the same forReducerContextandProcedureContext.The purpose of this change: So that the host can determine if/when a view invokes or reads the
sender.Currently, because
senderis 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 onsender, resulting in data duplication.The initial solution for this problem was
AnonymousViewContextwhich doesn't have asenderfield. The better solution is to makesendera 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.
ViewContextviews are still duplicated across clients. Changing this requires a new host syscall and forsender()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
ReducerContextandProcedureContextwere updated purely for consistency. There are currently no plans to track reads ofsenderin these contexts.API and ABI breaking changes
Breaks the rust module api.
Expected complexity level and risk
1
Testing
N/A