Forum

Issue with serialization

Hallo the attached patch gives no error in Gamma 2019 1.0 but thros the following error in 2019 2.0

Serialize.zip (2.7 KB)

Type ‘serialize.Main.DT_R’ is not serializable.
at MBrace.FsPickler.Utils.Exn1.get_Value() in C:\Users\eirik.tsarpalis\devel\mbrace\FsPickler\src\FsPickler\Utils\Utils.fs:line 59 at MBrace.FsPickler.PicklerCache.MBrace-FsPickler-IPicklerResolver-Resolve[T]() in C:\Users\eirik.tsarpalis\devel\mbrace\FsPickler\src\FsPickler\PicklerGeneration\PicklerCache.fs:line 75 at MBrace.FsPickler.FsPicklerSerializer.Serialize[T](Stream stream, T value, FSharpOption1 pickler, FSharpOption1 streamingContext, FSharpOption1 encoding, FSharpOption1 leaveOpen) in C:\Users\eirik.tsarpalis\devel\mbrace\FsPickler\src\FsPickler\FsPickler\Serializer.fs:line 60 at <StartupCode$FsPickler>.$Serializer.Pickle@155.Invoke(T v) in C:\Users\eirik.tsarpalis\devel\mbrace\FsPickler\src\FsPickler\FsPickler\Serializer.fs:line 155 at MBrace.FsPickler.FsPicklerSerializer.Pickle[T](T value, FSharpOption1 pickler, FSharpOption1 streamingContext, FSharpOption1 encoding) in C:\Users\eirik.tsarpalis\devel\mbrace\FsPickler\src\FsPickler\FsPickler\Serializer.fs:line 155
at MBrace.CsPickler.CsPicklerSerializer.Pickle[T](T value, Object streamingContext, Encoding encoding) in C:\Users\eirik.tsarpalis\devel\mbrace\FsPickler\src\FsPickler.CSharp\Serializer.cs:line 94
at VL.Lib.Runtime.Serialization.SerializeBson[T](T value) in C:\BuildAgent\work\7f1c37452bc222ab\public-vl\VL.CoreLib\src\Runtime\Serialization.cs:line 36
at serialize.Main.serializeApplication_HYYHtADBXhHOnu4UwOpVxY.g____TRACE__|3_0(<>c__DisplayClass3_0& ) in C:\Users\io\Desktop\Serialize\serialize.vl.cs:line 244
at serialize.Main.serializeApplication_HYYHtADBXhHOnu4UwOpVxY.Update() in C:\Users\io\Desktop\Serialize\serialize.vl.cs:line 232
at serialize.Main.serializeApplication_HYYHtADBXhHOnu4UwOpVxY.__RunserializeApplication(serializeApplication_HYYHtADBXhHOnu4UwOpVxY Input_In) in C:\Users\io\Desktop\Serialize\serialize.vl.cs:line 294

for both 2019.1 and 2019.2 please tell us which preview exactly you’re using to test this.

2019.2 both 015 and 026 throws the error
2019.1 975 and backwards no error

Indeed, the necessary attribute wasn’t set by new backend. Fixed in upcoming preview. Thanks for the report.