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

status with jupyterlab 4? #65

Open
dylex opened this issue May 14, 2024 · 6 comments
Open

status with jupyterlab 4? #65

dylex opened this issue May 14, 2024 · 6 comments

Comments

@dylex
Copy link

dylex commented May 14, 2024

I wanted to try this out and added it to our spack build, but it's failing, maybe because it doesn't support jupyterlab 4, or maybe some other dependency is missing? I presume this is something I'm doing wrong, but just wanted to make sure.

  INFO:hatch_jupyter_builder.utils:> /mnt/sw/nix/store/cc3zrlzd1r55wd1z4la6zkmz3s83b2ys-py-jupyterlab-4.0.13/bin/jlpm run build:prod
  .yarn/cache/@jupyterlab-rendermime-npm-3.6.7-9734a84bd8-038f920296.zip/node_modules/@jupyterlab/rendermime/lib/widgets.d.ts(8,31): error TS2420: Class 'RenderedCommon' incorrectly implements interface 'IRenderer'.
    The types of 'title.owner.layout' are incompatible between these types.
      Type 'import("/dev/shm/nix-build-py-jupyterlmod-4.0.3.drv-3/nixbld1/spack-stage-py-jupyterlmod-4.0.3-ciiqf83w5cb2bxjs63vp4wdx4pd1q5cg/spack-src/labextension/.yarn/cache/@lumino-widgets-npm-1.37.2-89db812cb6-3193f8cca4.zip/node_modules/@lumino/widgets/types/layout").Layout' is not assignable to type 'import("/dev/shm/nix-build-py-jupyterlmod-4.0.3.drv-3/nixbld1/spack-stage-py-jupyterlmod-4.0.3-ciiqf83w5cb2bxjs63vp4wdx4pd1q5cg/spack-src/labextension/.yarn/cache/@lumino-widgets-npm-2.3.2-8f9bc29834-954fe066b0.zip/node_modules/@lumino/widgets/types/layout").Layout'.
        Property '[Symbol.iterator]' is missing in type 'import("/dev/shm/nix-build-py-jupyterlmod-4.0.3.drv-3/nixbld1/spack-stage-py-jupyterlmod-4.0.3-ciiqf83w5cb2bxjs63vp4wdx4pd1q5cg/spack-src/labextension/.yarn/cache/@lumino-widgets-npm-1.37.2-89db812cb6-3193f8cca4.zip/node_modules/@lumino/widgets/types/layout").Layout' but required in type 'import("/dev/shm/nix-build-py-jupyterlmod-4.0.3.drv-3/nixbld1/spack-stage-py-jupyterlmod-4.0.3-ciiqf83w5cb2bxjs63vp4wdx4pd1q5cg/spack-src/labextension/.yarn/cache/@lumino-widgets-npm-2.3.2-8f9bc29834-954fe066b0.zip/node_modules/@lumino/widgets/types/layout").Layout'.
  src/index.ts(7,8): error TS2307: Cannot find module '@jupyterlab/apputils' or its corresponding type declarations.
  src/index.ts(11,8): error TS2307: Cannot find module '@lumino/widgets' or its corresponding type declarations.
  src/index.ts(14,28): error TS2307: Cannot find module '@jupyterlab/coreutils' or its corresponding type declarations.
  src/index.ts(121,10): error TS2339: Property 'id' does not exist on type 'LmodWidget'.
  src/index.ts(122,10): error TS2339: Property 'title' does not exist on type 'LmodWidget'.
  src/index.ts(123,10): error TS2339: Property 'title' does not exist on type 'LmodWidget'.
  src/index.ts(124,10): error TS2339: Property 'addClass' does not exist on type 'LmodWidget'.
  src/index.ts(136,10): error TS2339: Property 'node' does not exist on type 'LmodWidget'.
  src/index.ts(138,10): error TS2339: Property 'node' does not exist on type 'LmodWidget'.
  src/index.ts(174,29): error TS2339: Property 'node' does not exist on type 'LmodWidget'.
  src/index.ts(175,28): error TS2339: Property 'node' does not exist on type 'LmodWidget'.
  src/index.ts(176,29): error TS2339: Property 'node' does not exist on type 'LmodWidget'.
  src/index.ts(181,26): error TS2339: Property 'node' does not exist on type 'LmodWidget'.
  src/index.ts(307,15): error TS2345: Argument of type 'LmodWidget' is not assignable to parameter of type 'Widget'.
    Type 'LmodWidget' is missing the following properties from type 'Widget': dispose, disposed, node, isDisposed, and 47 more.
  src/index.ts(308,17): error TS2345: Argument of type 'LmodWidget' is not assignable to parameter of type 'Widget'.
  src/index.ts(335,18): error TS2339: Property 'node' does not exist on type 'SaveWidget'.
  src/index.ts(362,18): error TS2339: Property 'node' does not exist on type 'RestoreWidget'.
@cmd-ntrf
Copy link
Owner

Hi! Yes, you are correct, the package does not support jupyterlab 4 for now.

It will try to update it in the coming month and also merge PR #62 and #64. Stay tuned, and thank you for your interest!

@lexming
Copy link
Contributor

lexming commented May 16, 2024

I'm also interested in getting support for JupyterLab 4 and JupyterHub 4.1+.

I'm testing JupyterLab 4.2.0 + JupyterHub 4.1.5 and the main issue are the more strict requirements on API calls imposed by JupyterHub. Now all calls to non-static resources must be authenticated. This includes all GET calls to the lmod API as well.

The internal API calls can be fixed with #66. However, there is one more failure related to the external @jupyterlab/server-proxy, which is old and does an unauthenticated call to activate the labextension with server-proxy.

In theory, replacing @jupyterlab/server-proxy with recent versions of @jupyterhub/jupyter-server-proxy (it changed name with version 4.0) should fix the issue. But it is not as simple as a single module change, as then the build fails with several typescript errors. Probably, all dependencies need a version bump.

@cmd-ntrf
Copy link
Owner

cmd-ntrf commented May 16, 2024

I started some draft work to make it work with JupyterLab 4 in branch jupyterlab4. So far it compiles, I have to figure out if it still works. PR #70

@ysagon
Copy link

ysagon commented Nov 8, 2024

Hello, if I understood well what was said in #70 the release 5.2.1 should work with JupyterLab4? I give a try but it seems it isn't.

By the way, it seems the tag 5.2.1 isn't set correctly as github says it doesn't exist in this repo.

Thanks for all, best

@cmd-ntrf
Copy link
Owner

cmd-ntrf commented Nov 8, 2024

@ysagon : Can you provide more details what isn't working for you? Both build and execution work fine for me with JupyterLab 4.3.0.

The tag 5.2.1 was correctly set, but it was refering to a commit that was yet pushed. It is now fixed.

@ysagon
Copy link

ysagon commented Nov 20, 2024

Hello @cmd-ntrf : I've tried with JupyterLab/4.0.5 and the lmod icon doesn't appear. I've tried with JupyterLab/4.2.0 and it works, maybe this is a know issue? We are using EasyBuild to built JupyterLab, I just saw they released an update for the same JupyterLab version, maybe this will fix something. I'll let you know.
Thanks for the Tag.

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

No branches or pull requests

4 participants