bduggan / raku-jupyter-kernel

Raku Kernel for Jupyter notebooks
Artistic License 2.0
74 stars 18 forks source link

Completion not working in recent Jupyter Lab and Jupyter Notebook #112

Open rcmlz opened 9 months ago

rcmlz commented 9 months ago

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.

bduggan commented 9 months ago

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

rcmlz commented 9 months ago

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.

bduggan commented 9 months ago

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 commented 9 months ago

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).