Skip to content

Force WithViewStore to be a view. #1910

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Feb 17, 2023
Merged

Force WithViewStore to be a view. #1910

merged 1 commit into from
Feb 17, 2023

Conversation

mbrandonw
Copy link
Member

The various initializers on WithViewStore for dealing with scenes, toolbars, etc. have been deprecated for over 5 months now. We did that because they can cause strain on the compiler, and we are seeing that more and more, so we think it's finally time to delete them.

And once that is done we can now make WithViewStore always be a View rather than conditionally. We have found this helps type checking and compiling performance quite a bit, especially for previews where I guess due to the dynamic replacement mechanism type checking can be even slower.

@tgrapperon
Copy link
Contributor

tgrapperon commented Feb 15, 2023

Indeed, this is a huge improvement. I remember #1204 where locking Content to a View in a fork did allow a failing build to succeed.

@mbrandonw mbrandonw merged commit df92841 into main Feb 17, 2023
@mbrandonw mbrandonw deleted the make-wvs-view branch February 17, 2023 17:21
@DandyLyons
Copy link
Contributor

What if we had a WithSceneStore that always returns a Scene?

(I didn't know WithViewStore used to work with Scenes until after I wrote this proposal.)

#2170

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.

4 participants