Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Typing .0 in a notebook with an IJulia kernel breaks the jupyter cell #5469

Closed
carstenbauer opened this issue May 22, 2020 · 13 comments
Closed

Comments

@carstenbauer
Copy link

carstenbauer commented May 22, 2020

Moved over from codemirror/codemirror5#6288:

When running Julia, my jupyter notebook cell stops to function properly as soon as I type .0. Concretely, as soon as I type .0 any further input isn't displayed anymore. This can also not be "undone" by trying to delete the .0 again. The cell is just completely irresponsive.

Note that 0.0 (with a prefixing zero before the decimal separator) works just fine. Also note that if I type something blindly and reload the notebook webpage, the text appears in the correct place, although without syntax highlighting.

I'm on macOS 10.15.4 Catalina, Safari 13.1 (also happens in Chrome 81.0.4044.138), Julia 1.4.1 and

➜ jupyter --version
jupyter core     : 4.6.1
jupyter-notebook : 6.0.3
qtconsole        : 4.6.0
ipython          : 7.12.0
ipykernel        : 5.1.4
jupyter client   : 5.3.4
jupyter lab      : 1.2.6
nbconvert        : 5.6.1
ipywidgets       : 7.5.1
nbformat         : 5.0.4
traitlets        : 4.3.3

I know that the issue also exists on Windows 10. With a python kernel, everything works fine.

In this severeness, only jupyter notebook is affected. In jupyter lab only the syntax highlighting breaks but the cell is still responsive:

Screenshot 2020-05-22 at 09 11 18

Over at codemirror/codemirror5#6288, @marijnh suggested that the reason might be that jupyter notebook is still using an old version of the julia code mirror mode.

  1. Would be great if this could be fixed!
  2. Is there a way for me, locally, to update the julia mode version?

Thanks in advance!

@stevengj
Copy link

Is there an easy way to find out what version of CodeMirror is being used?

@carstenbauer
Copy link
Author

carstenbauer commented May 27, 2020

This is super annoying. I just copied a URL into a jupyter notebook cell and the cell became unresponsive because the URL contained .0 somewhere.

@mvsoom
Copy link

mvsoom commented Jun 7, 2020

Can confirm the same problem here. Using Jupyter Lab, Julia 1.4.1, Chromium 83.0.4103.61 snap,
Ubuntu 20.04 LTS.

$ jupyter --version
jupyter core     : 4.6.3
jupyter-notebook : 6.0.3
qtconsole        : not installed
ipython          : 7.14.0
ipykernel        : 5.2.1
jupyter client   : 6.1.3
jupyter lab      : 2.1.2
nbconvert        : 5.6.1
ipywidgets       : 7.5.1
nbformat         : 5.0.6
traitlets        : 4.3.3

$ jupyter lab --version
2.1.2

@carstenbauer
Copy link
Author

Thanks for making this a priority, @willingc. Since we're hitting this issue repeatedly in our computational physics class at the University of Cologne, can you estimate how long fixing this will take?

@kevin-bates
Copy link
Member

Is there an easy way to find out what version of CodeMirror is being used?

A quick grep yields this... bower.json: "codemirror": "components/codemirror#~5.51.0",

I'm not qualified to make a comment on this area, just trying to move this along since it was made a high priority nearly 3 weeks ago.

@stevengj
Copy link

stevengj commented Jul 3, 2020

codemirror/codemirror5#6064 was fixed in 5.50.0, but maybe there was another fix subsequently. The current codemirror release is 5.55.0; is there a way to update Jupyter to use this?

@carstenbauer
Copy link
Author

I don't want to nag but I'm wondering why this takes so long to fix given that it only seems to be a version issue. Unfortunately I can't help fixing it since I have no expertise in this area whatsoever.

@kevin-bates
Copy link
Member

Since the currently referenced version of codemirror is 5.51.0 - and it should be fixed - could someone please give Notebook 6.1.0rc1 a spin with IJulia to ensure it will be fixed in the upcoming release?

pip install --upgrade --pre notebook

@akdor1154
Copy link
Contributor

Not sure if I was seeing this exact thing, but something was causing my Julia cells to break codemirror, and after updating to 6.1.0rc1 then they work ok.

@stevengj
Copy link

@akdor1154, can you try the example at the top, i.e. typing .0123?

@kevin-bates
Copy link
Member

Not sure if I was seeing this exact thing, but something was causing my Julia cells to break codemirror, and after updating to 6.1.0rc1 then they work ok.

I suspect this is because 6.1.0rc1 is the first carrier of codemirror >= 5.50.0. It was using 5.48 or less in the previous notebook releases.

@akdor1154
Copy link
Contributor

@akdor1154, can you try the example at the top, i.e. typing .0123?

Yep this works. Sorry :)

I did see a codemirror hang when editing a medium-level-complexity nested list code block though... will investigate further and open a separate issue if I can work out how to reproduce.

@kevin-bates
Copy link
Member

Thanks Jarrad! I'm going to close this issue since it appears to be fixed by virtue of the codemirror update.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

6 participants