-
Notifications
You must be signed in to change notification settings - Fork 164
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
Failing sealed class list encoding / decoding tests #365
Conversation
Can you fix the build failure please. |
@Reedyuk should work now 🙌🏽 |
I approved, it's on @nbransby |
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.
there should be separate tests for encode and decode that use nativeAssertEquals and nativeMapOf like the existing tests - this is because you should be testing that it encodes/decodes to the format expected by firebase native libraries
uses native assert
great stuff! |
@brahyam - does this work for you locally? the ci is getting stuck on the ios tests, |
I ran it locally and it works |
Hi!,
Thanks a lot for the huge effort of making available this library.
While using the SDK to store a list of sealed classes I ran into the following error on decoding.
NullPointerException: null cannot be cast to non-null type kotlin.collections.Map<*, *>
I managed to track it to
firebase-common/androidMain/_decoders.kt
FirebaseDecoder.structureDecoder
function. (and also its iOS equivalent)It happens because the descriptor is expecting a
value
property that was not encoded. I managed to fix it with the followingAnd similar for the iOS but maybe there is a more elegant way?
I will open an issue with the same comment and link this PR