fix(memo): preserve runtime typing for unannotated params#6659
fix(memo): preserve runtime typing for unannotated params#6659harsh21234i wants to merge 5 commits into
Conversation
Greptile SummaryFixes a regression introduced in 0.9.4 where
Confidence Score: 5/5Safe to merge; the change is narrowly scoped to unannotated-parameter handling and only affects the first lazy-body materialization. The mutation of No files require special attention; both changed files are straightforward. Important Files Changed
Reviews (5): Last reviewed commit: "Merge branch 'main' into fix/memo-untype..." | Re-trigger Greptile |
Merging this PR will not alter performance
Comparing Footnotes
|
|
any update? @masenf |
Summary
Fixes #6631.
@rx.memocomponent bodies with unannotated parameters were regressing toVar[Any]in 0.9.4, which caused downstreamUntypedVarErrorfailures when the memo bodytried to access object fields or call var methods.
This change preserves the legacy behavior for missing annotations by seeding the memo body with the first call’s runtime value type before the component is
materialized. That keeps the deprecation warning in place, but avoids the confusing compile-time failure for existing call sites.
Testing
uv run pytest -o addopts='' tests/units/components/test_memo.py -q