State conformance to ObservableState
store runtime diagnostics
#2682
Closed
maximkrouk
started this conversation in
Beta
Replies: 1 comment 3 replies
-
Hi @maximkrouk, thanks for reporting this. Unfortunately this is due to Swift bug in key paths. We filed this yesterday and I just pushed a fix (60b5fe4) for the part that you were running into. I was also able to verify that marking |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Just got
SIGABRT
crash while playing withobservation-beta
Can be reproduced in Example project here.
Steps to reprocuce:
Console error output:
Some notes from the callstack:
I already solved it by accidentally finding that I didn't mark
ProfileTabFeature.State
asObservableState
, but none of errors were helpful for finding whats wrong...I think the MVP for the fix could be just a simple comment in
PartialToState.keyPath.callAsFunction(_:)
that "if you got a SIGABRT crash here, probably you forgot to add@ObservableState
to one of your features"Ideally it would be cool to use some failure with a message containing specific type that needs to conform to
ObservableState
, but I don't see how to do that without a bunch on reflection (which will probably drain performance, but probably it's ok for debug builds)Beta Was this translation helpful? Give feedback.
All reactions