Skip to content

Eagerly prepare dependencies in preview trait - #471

Merged
stephencelis merged 4 commits into
mainfrom
eager-preview-trait-fix
Aug 24, 2026
Merged

Eagerly prepare dependencies in preview trait#471
stephencelis merged 4 commits into
mainfrom
eager-preview-trait-fix

Conversation

@mbrandonw

Copy link
Copy Markdown
Member

The preview trait from #465 works for the most part, but if you ever use @Dependency in a view (even indirectly such as with @FetchAll from SQLiteData), then technically dependencies get accessed before they are prepared because the view is eagerly created. So let's start eagerly preparing dependencies as soon as the trait is constructed rather than waiting for the view body to be computed.

@mbrandonw
mbrandonw requested a review from stephencelis August 22, 2026 18:24
@stephencelis
stephencelis merged commit 5e08157 into main Aug 24, 2026
7 checks passed
@stephencelis
stephencelis deleted the eager-preview-trait-fix branch August 24, 2026 19:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants