mbraceproject / FsPickler

A fast multi-format message serializer for .NET
http://mbraceproject.github.io/FsPickler/
MIT License
326 stars 51 forks source link

Fix struct record/union serialization for code generated picklers #91

Closed eiriktsarpalis closed 7 years ago

eiriktsarpalis commented 7 years ago

cc @varon @dsyme

dsyme commented 7 years ago

Looks good but there's a CI failure?

eiriktsarpalis commented 7 years ago

@dsyme seems to be failing in mono

dsyme commented 7 years ago

Yes. " ----> System.ArgumentException : method arguments are incompatible"

I think the Mono 5.0.x has all the right F# bits, so this feels like either a Mono bug or an FsPickler bug. But I might be wrong - perhaps there is an F# fix missing from Mono 5.0.x

1) Test Error : MBrace.FsPickler.Tests.Generic Tests.1. Correctly resolve finite types
   MBrace.FsPickler.PicklerGenerationException : Error generating pickler for type 'MBrace.FsPickler.Tests.TestTypes+StructDU'.
  ----> System.ArgumentException : method arguments are incompatible
  at MBrace.FsPickler.PicklerResolution.resolvePickler (MBrace.FsPickler.IPicklerResolver resolver, Microsoft.FSharp.Core.FSharpFunc`2[T,TResult] mkEarlyBinding, Microsoft.FSharp.Core.FSharpFunc`2[T,TResult] isPicklerReferenced, System.Type t) [0x00194] in <5945b0535ec56bbba745038353b04559>:0 
dsyme commented 7 years ago

@eiriktsarpalis What was the cause of the Mono bug?

eiriktsarpalis commented 7 years ago

@dsyme apparently the reflection-based pickler for unions didn't work with structs in mono