Current starter kit is giving warnings on Thespian use
Things are working smoothly with Thespian but I am getting some warnings:
>
WARNING : Could not serialize data dependencies: Microsoft.FSharp.Core.FSharpOption`1[MBrace.Thespian.ThespianCluster] thespian@, MBrace.Thespian.ThespianCluster cluster@
INFO : Posted CloudProcess<string> '8ccb2655-087a-4c87-8220-719679ad83c0'.
This is normal. It's a notification that the thespian and cluster top-level fsi values failed to be serialized by Vagabond. Referencing these values from cloud code will cause a null reference exception.
On Fri, 9 Oct 2015 at 15:13 Don Syme [email protected] wrote:
Things are working smoothly with Thespian but I am getting some warnings:
WARNING : Could not serialize data dependencies: Microsoft.FSharp.Core.FSharpOption`1[MBrace.Thespian.ThespianCluster] thespian@, MBrace.Thespian.ThespianCluster cluster@ INFO : Posted CloudProcess
'8ccb2655-087a-4c87-8220-719679ad83c0'. — Reply to this email directly or view it on GitHub https://github.com/mbraceproject/MBrace.StarterKit/issues/47.
Hi Eirik, we were getting them on every interaction, would there be anyway to avoid this? Thanks
Yes, you could set the cluster.LogLevel property to LogLevel.Error or disable disable logging altogether in the client object.
In general, these warnings are useful because they give you a good indication of what FSI top-level bindings cannot be accessed from the cloud.
Perhaps the message could be relegated to LogLevel.Info, because it almost always occurs.
The message is definitely useful to have at a fairly high log level. I'm just wondering if there is some way to disable it for the "let thespian" binding in particular (or to stop it showing repeatedly). It's not a big deal though
The trouble is that you can still reference that "thespian" binding in cloud workflows. This will almost always result in NullReferenceExn's, so I believe it's good to at least try to warn the user about it.
Ultimately, the only good solution to this problem is to improve code generation in fsi. As long as top level fsi value bindings are represented using static fields we will be facing this type of problem. C# interactive (partially) solves the problem by emitting Submission objects. These are caught in the object graph whenever referenced, hence any non-serializable reference will be detected on the client side.