symmetryinvestments / jupyter-wire

Jupyter wire protocol implementation enabling D plugins to be jupyter kernels
Boost Software License 1.0
13 stars 4 forks source link

Purpose of IoPubMessageSender in Examples #23

Closed m3m0ry closed 4 years ago

m3m0ry commented 4 years ago

In all of the examples, the individual backend has scope IoPubMessageSender sender as a parameter for the execute function. It is never used.

In the README example, no such parameter exists.

Is it necessary? If yes, what is it purpose?

(I have also copy-pasted the basic example, and it did not compile, because the definition of IoPubMessageSender was missing. However this might not be true, as I was toying around with this package, and I might miss something.)

skoppe commented 4 years ago

It is used in the widget example though.

The reason for the IoPubMessageSender is that widgets need to send messages out of band of the normal request-reply cycle. I am not liking the design very much, but it was the best I could come up with.

m3m0ry commented 4 years ago

Thank you for clarifying.

My problem was, that dub gets the 0.0.8 version of the package and not the 0.1.0-beta.1. Cloning the repo directly solved the problem.