JuliaGizmos / WebIO.jl

A bridge between Julia and the Web.
https://juliagizmos.github.io/WebIO.jl/latest/
Other
228 stars 64 forks source link

Not Compatible with JupyterLab 2.0.0 #397

Closed xgdgsc closed 3 years ago

xgdgsc commented 4 years ago

The bug

install_jupyter_labextension() fails

Context

┌ Info: Using default Jupyter executable at `/mnt/dev/home/gsc/anaconda3/envs/jl/bin/jupyter`; to use a different executable, see the documentation by running `?WebIO.install_jupyter_labextension`.
└ @ WebIO /home/gsc/.julia/packages/WebIO/2mZPb/deps/jupyter.jl:141
An error occured.
ValueError: No linked package for @webio/webio
See the log file for details:  /tmp/jupyterlab-debug-nqubt68w.log
No labextension named "@webio/jupyter-lab-provider" installed
An error occured.
ValueError: 
"@webio/jupyter-lab-provider@0.8.11" is not compatible with the current JupyterLab
Conflicting Dependencies:
JupyterLab              Extension      Package
>=2.0.2 <2.1.0          >=1.0.1 <2.0.0 @jupyterlab/application
>=2.0.2 <2.1.0          >=1.0.1 <2.0.0 @jupyterlab/docmanager
>=2.0.2 <2.1.0          >=1.0.1 <2.0.0 @jupyterlab/notebook
>=2.0.2 <2.1.0          >=1.0.1 <2.0.0 @jupyterlab/rendermime
>=5.0.2 <5.1.0          >=4.0.1 <5.0.0 @jupyterlab/services
See the log file for details:  /tmp/jupyterlab-debug-mrq4jl6f.log
failed process: Process(`/mnt/dev/home/gsc/anaconda3/envs/jl/bin/jupyter labextension install --no-build @webio/jupyter-lab-provider@0.8.11`, ProcessExited(1)) [1]

Stacktrace:
 [1] pipeline_error at ./process.jl:525 [inlined]
 [2] #run#565(::Bool, ::typeof(run), ::Cmd) at ./process.jl:440
 [3] run at ./process.jl:438 [inlined]
 [4] #install_jupyter_labextension#66(::Bool, ::Bool, ::typeof(WebIO.install_jupyter_labextension), ::Nothing) at /home/gsc/.julia/packages/WebIO/2mZPb/deps/jupyter.jl:159
 [5] install_jupyter_labextension(::Nothing) at /home/gsc/.julia/packages/WebIO/2mZPb/deps/jupyter.jl:139 (repeats 2 times)
 [6] top-level scope at In[10]:2

Info:

JupyterLab v2.0.1
No installed extensions
[0f1e0344] WebIO v0.8.11
Julia Version 1.3.1
Commit 2d5741174c (2019-12-30 21:36 UTC)
Platform Info:
  OS: Linux (x86_64-pc-linux-gnu)
  CPU: Intel(R) Xeon(R) CPU E5-2683 v3 @ 2.00GHz
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-6.0.1 (ORCJIT, haswell)
twavv commented 4 years ago

The extension hasn't been updated for JupyterLab 2.0 yet. An immediate workaround would be to downgrade to JupyterLab v1 series.

bjornarfjelldal commented 4 years ago

Hi! Is the latest workaround still to downgrade Jupyterlab to v1 series?

twavv commented 4 years ago

Yes.

I’m not sure how much has changed for extensions between 1 and 2 and haven’t had time to look at it yet unfortunately.

isentropic commented 4 years ago

Hello, do you think this would work even if compatibility is disregarded? Many people probably need new jupyterlab for other python issues

lcontento commented 4 years ago

Hi! Looking at the migration guide https://jupyterlab.readthedocs.io/en/stable/developer/extension_migration.html, I tried making the minimum number of changes needed for WebIO to run with JupyterLab 2.x. You can see them at https://github.com/JuliaGizmos/WebIO.jl/compare/master...lcontento:master. On my machine it appears basic functionality is restored, but maybe more work is still needed... Hope it may be useful (at least as a stopgap solution).

isentropic commented 4 years ago

Great, perhaps we could expect a PR sometime soon?

bollwyvl commented 4 years ago

@lcontento I have been using your branch over in a demo binder (repo) running JupyterLab 2.2.0 (and a lot of other stuff)... from a Julia perspective, while I can't seem to get LanguageServer.jl working properly, everything else is looking pretty good!

barche commented 4 years ago

Any chance the changes from @lcontento could be distilled into a PR and merged? We are also using this to make WebIO work on a recent jupyterlab installation in jupyterhub.

lcontento commented 4 years ago

Any chance the changes from @lcontento could be distilled into a PR and merged? We are also using this to make WebIO work on a recent jupyterlab installation in jupyterhub.

I could try starting a PR with my changes, but I am not familiar enough with the code base to say whether additional changes need to be made. It would be best if after I start the PR one of the maintainers took over it.

twavv commented 4 years ago

Open a PR and I can try to find a few spare hours to look it over.

jlumpe commented 4 years ago

@lcontento what is the installation process to try out your changes?

lcontento commented 4 years ago

@lcontento what is the installation process to try out your changes?

If I remember correctly it was quite straightforward. I don't think you need to install my version through the Julia package manager (the official package should work just fine, since I did not touch the Julia code). Just cloning my repository and running jupyter-labextension install /path/to/lcontento/WebIO/packages/jupyter-lab-provider should be enough.

Krisselack commented 3 years ago

@lcontento

If I remember correctly it was quite straightforward. I don't think you need to install my version through the Julia package manager (the official package should work just fine, since I did not touch the Julia code). Just cloning my repository and running > jupyter-labextension install /path/to/lcontento/WebIO/packages/jupyter-lab-provider should be enough.

I got the following error

ValueError: "./WebIO.jl/packages/jupyter-lab-provider" is not a valid extension: Missing extension module "dist/labextension.js"

lcontento commented 3 years ago

I got the following error

ValueError: "./WebIO.jl/packages/jupyter-lab-provider" is not a valid extension: Missing extension module "dist/labextension.js"

I thought that this issue would have been closed after #430 was merged. I have not been using WebIO in a while, maybe something has changed in the extension format for the 2. series (or maybe my migration was not perfect in the beginning). I am sorry, but at the moment I don't really have the extra time to look into this. And anyway JupyterLab 3 is already out, so a new migration will be in order soon I suppose...

Krisselack commented 3 years ago

Thank you for the fast response! Yes, indeed I have Jupyterlab 3.... no wonder :-)

bollwyvl commented 3 years ago

Happy to help get any stuff up on jupyter lab 3, if my complete lack of julia knowledge isn't too big a hindrance. It's hopefully a small json change, and cutting a new release, but then will not require a julia user to run (or even need) nodejs stuff after installing the extension, much like classic notebook extensions.

If there are other extensions that depend on this one through the jupyterlab side, it's slightly more complicated, but again hopefully just json changes.

Krisselack commented 3 years ago

There is a new issue open... https://github.com/JuliaGizmos/WebIO.jl/issues/442

jlumpe commented 3 years ago

@Krisselack are you using dev=true with install_juypter_labextension? I was getting the same "Missing extension module" error as well when doing that, but it worked without that on jupyterlab 2.2.6.

Krisselack commented 3 years ago

Thank you, I tried that with the following result:

An error occured. ValueError: "/opt/julia/packages/WebIO/Fy9h1/packages/jupyter-lab-provider" is not a valid extension: Missing extension module "dist/labextension.js"