raku-jupyter-kernel icon indicating copy to clipboard operation
raku-jupyter-kernel copied to clipboard

Completion not working in recent Jupyter Lab and Jupyter Notebook

Open rcmlz opened this issue 1 year ago • 4 comments

I am using recent JupyterLab/Notebook and can not get the completion get to work. One of the test cases is failing

($pos,$end,$completions) = $r.completions('if "hello world".WHA');
is-deeply $completions, $("WHAT", ), 'WHAT method';

but appart from that there are no errors I can identify. The Binder demo also has no working TAB completion.

rcmlz avatar Feb 09 '24 17:02 rcmlz

Interesting. For the bug, perhaps this will address it: 54163f422c5caa7fcd3199cd07b0e033a9896ef3 since there appears to be duplicate WHATs in the output. I can confirm that Tab completion is not working in Binder, though the kernel does seem to be sending the responses, yet they are being ignored. Completion does work on a local notebook. cc @sumanstats for any thoughts

bduggan avatar Feb 10 '24 15:02 bduggan

applying 54163f4 did not solve the problem in JupyterLab.

I started it with jupyter lab --debug but do not see any erros when typing TAB on any object.

rcmlz avatar Feb 11 '24 08:02 rcmlz

Oh, I see it is not just binder, but JupyterLab. Yes, I am able to reproduce this. There seems to have been some sort of backwards-incompatible change to the protocol; I don't see any documentation about this here so it may take some investigation to see what has changed.

bduggan avatar Feb 11 '24 14:02 bduggan

Interestingly, this seems specific to JupyterLab -- completions work fine in a regular notebook or a terminal console (and the kernel is sending the same response in all those cases).

bduggan avatar Feb 11 '24 14:02 bduggan