You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Would it be plausible to add support to pickle things produced by System.Reflection.Emit, or is that inherently difficult?
My use case is that for slightly complicated reasons I want to send some code from machine A to B via a quotation, execute part of that code on B and then send a continuation to machine C via FSPickler.
A very simplified example would be
let v = <@ fun x -> x+1 @>
let w : int -> int = FSharp.Quotations.Evaluator.QuotationEvaluator.Evaluate v
let fspickler = MBrace.FsPickler.FsPickler.CreateBinarySerializer()
fspickler.Pickle(w)
which currently fails as expected because System.Reflection.Emit.DynamicMethod+RTDynamicMethod is not serializable by FsPickler:
Unhandled exception. MBrace.FsPickler.FsPicklerException: Error serializing object of type 'Microsoft.FSharp.Core.FSharpFunc`2[System.Int32,System.Int32]'.
---> MBrace.FsPickler.NonSerializableTypeException: Type 'System.Reflection.Emit.DynamicMethod+RTDynamicMethod' is not serializable: global method 'Int32 lambda_method(System.Runtime.CompilerServices.Closure, Microsoft.FSharp.Core.Unit, Int32)' in assembly 'Anonymously Hosted DynamicMethods Assembly, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null'
I'm aware of Vagabond but currently it only advertises support for .NET Core 3.1 and I also need to support .NET Framework 4. Would I be better off trying to get Vagabond to support .NET Standard?
The text was updated successfully, but these errors were encountered:
Would it be plausible to add support to pickle things produced by
System.Reflection.Emit
, or is that inherently difficult?My use case is that for slightly complicated reasons I want to send some code from machine A to B via a quotation, execute part of that code on B and then send a continuation to machine C via FSPickler.
A very simplified example would be
which currently fails as expected because
System.Reflection.Emit.DynamicMethod+RTDynamicMethod
is not serializable by FsPickler:I'm aware of Vagabond but currently it only advertises support for .NET Core 3.1 and I also need to support .NET Framework 4. Would I be better off trying to get Vagabond to support .NET Standard?
The text was updated successfully, but these errors were encountered: