If an alice instance unpickles and calls a proxy function it will sometimes fail with a Hole.Hole exception. To reproduce, in alice instance A do:
val f = Remote.proxy (fn s => print (s ^ "\n"));
Pickle.save ("/tmp/a.pickle", pack (val it = f) : (val it : string -> unit));
In alice instance B do:
structure H = unpack Pickle.load "/tmp/a.pickle" : (val it : string -> unit);
H.it "foo";
The exception gets raised in instance B:
Uncaught exception
Hole.Hole
If the Remote structure is used in instance B before calling the deserialized proxy function then it works fine:
await Remote.port;
H.it "foo";
This can be any use of Remote. Opening it, calling a function in it, etc. It seems like something in Remote needs to be initialized that doesn't occur when just deserializing and calling the proxy function.
If an alice instance unpickles and calls a proxy function it will sometimes fail with a
Hole.Hole
exception. To reproduce, in alice instance A do:In alice instance B do:
The exception gets raised in instance B:
If the
Remote
structure is used in instance B before calling the deserialized proxy function then it works fine:This can be any use of
Remote
. Opening it, calling a function in it, etc. It seems like something inRemote
needs to be initialized that doesn't occur when just deserializing and calling the proxy function.