-
-
Notifications
You must be signed in to change notification settings - Fork 112
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
Fix rootEnvironment
not merged with .defaultEnvironment
#461
Conversation
…ack to `.defaultEnvironment`
Good catch. I think you may still need to add in the values |
Let me know if you'd rather have the merging logic as a private implementation detail. I figured since effectively every backend/renderer implementation would need it it might be worth providing a canonical method for it. Providing both |
Since this isn't part of SwiftUI, may be best to make it internal with |
rootEnvironment
passed into functions, falling back to .defaultEnvironment
rootEnvironment
not merged with .defaultEnvironment
Absolutely! Fixed. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you still need to add @_spi(TokamakCore)
to some imports to fix the builds. Once that's fixed this LGTM!
c6b7bd9
to
7e37634
Compare
Fixed! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks!
While spelunking through the implementation of
EnvironmentValues
and its uses in Tokamak I noticed that a couple of functions were accepting arootEnvironment: EnvironmentValues? = nil
argument but then discarding whatever value you pass to it in favor of.defaultEnvironment
.This seems wrong to me? 🤔