-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Removed dependency on Newtonsoft.Json in F# serialization and persistence #1900
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
Conversation
match Serialization.tryDeserializeJObject serializer.Serializer msg with | ||
| Some(e) -> state <- aggregate.apply mailbox state e | ||
| None -> x.Unhandled msg | ||
let serializer = UntypedActor.Context.System.Serialization.FindSerializerForType typeof<obj> |
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.
Shouldn't that be typeof<'Event>
?
I thought so too, that is should use concrete types instead of obj. But since I am new to the code base I wanted to be very conservative about changes and left the original code untouched as much as I could. But now that you pointed this out - yes I agree. It should be the actual types - 'Event, 'Command etc. |
Corrected type cast. |
It looks like we have some FAKE problems. /cc @Aaronontheweb |
@object you need to rebase with latest dev, that should fix the build problems |
Will do, thanks. |
Added some basic specs for the mailbox/actor combinations in Akka.NET. Bounded dispatcher and mailbox configurations haven't been added yet as these are not supported right now. Takes care of issue #1793
@Silv3rcircl3 @Horusiath I rebased my changes, should be OK now. |
I made the changes a bit in the blind because there don't seem to be any tests that trigger the affected code. All F# API tests pass, and I verified that the sample program PersistenceExample.FsApi work just as it worked before. Now it works with both JSON.NET and Wire serializer, before F# persistence wrapper expected only JSON.NET. But even using PersistenceExample.FsApi I was not able to test all code branches.
If you find something that doesn't work with the proposed changes, please let me know how I can reproduce the problem and I will try to fix it.