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

JLab 4.0 side-effect: Class 'RenderedCommon' incorrectly implements interface 'IRenderer'. #260

Closed
jhgoebbert opened this issue May 19, 2023 · 12 comments

Comments

@jhgoebbert
Copy link

jhgoebbert commented May 19, 2023

dask-labextension fails to build for JupyterLab 3.6.3

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("<..>/dask_labextension/dask_labextension-6.1.0/node_modules/@lumino/widgets/types/layout").Layout' is not assignable to type 'import("<..>/dask_labextension/dask_labextension-6.1.0/node_modules/@jupyterlab/rendermime-interfaces/node_modules/@lumino/widgets/types/layout").Layout'.
            Property '[Symbol.iterator]' is missing in type 'import("<..>/dask_labextension/dask_labextension-6.1.0/node_modules/@lumino/widgets/types/layout").Layout' but required in type 'import("<..>/dask_labextension/dask_labextension-6.1.0/node_modules/@jupyterlab/rendermime-interfaces/node_modules/@lumino/widgets/types/layout").Layout'.
      error Command failed with exit code 1.

I was assuming that this is the case because "@jupyterlab/rendermime-interfaces": "^3.0.0", is missing in package.json
and dask-labextension is not yet ready for JLab 4.x but uses here a too modern node-modules of it. But just adding this to package.json results in the same error.

@jhgoebbert
Copy link
Author

@jupyterlab/rendermime-interfaces version 3.8 was released 4 days ago and pulls @lumino/widgets in version 2.1.1 -> https://github.com/jupyterlab/jupyterlab/blob/v4.0.0/packages/rendermime-interfaces/package.json#L35
This results in two different versions of lumino and the mismatch described above.

@jupyterlab/rendermime-interfaces new version nummer should have better be choosen to be 4.0
But a simple workaround could be to limit @jupyterlab/rendermime-interfaces in package.json to a max of 3.6.3

@jhgoebbert
Copy link
Author

jhgoebbert commented May 19, 2023

This seems to be recognized as a bug in JupyterLab here jupyterlab/jupyterlab#14335 (comment)
Until this is fixed dask-labextension cannot be installed from source anymore.

@jimdigriz
Copy link

jimdigriz commented May 24, 2023

I had the same problem in our own private and public extensions, I was able to use the following to break out of the ghetto...

"resolutions": {
  "@jupyterlab/rendermime-interfaces": "^3.0.0 <=3.6.3"
}

Hope it works for you.

jimdigriz added a commit to corememltd/jupyterlab-reveal that referenced this issue May 24, 2023
@jhgoebbert
Copy link
Author

Hi @jimdigriz ,
I tried the same patch but it failed for me because then I was stuck in jupyterlab 3.6.3 here: https://github.com/jupyterlab/jupyterlab/blob/v3.6.3/packages/docregistry/package.json#L52

@jimdigriz
Copy link

Hi @jimdigriz , I tried the same patch but it failed for me because then I was stuck in jupyterlab 3.6.3 here: https://github.com/jupyterlab/jupyterlab/blob/v3.6.3/packages/docregistry/package.json#L52

We are using JupyterLab 3.4.6...

@jhgoebbert
Copy link
Author

jhgoebbert commented Jun 5, 2023

It got fixed with jupyterlab/jupyterlab@5b33469 and will be part of the upcoming JupyterLab 3.6.5.
Hence, I close the issue now.

@mrocklin
Copy link
Member

mrocklin commented Jun 5, 2023 via email

psychemedia added a commit to innovationOUtside/jupyterlab_empinken_extension that referenced this issue Jun 7, 2023
@jhgoebbert
Copy link
Author

@jupyterlab/rendermime-interfaces 3.8.2 was released yesterday including this patch jupyterlab/jupyterlab#14618 . But it seems that this does not fix it, yet.
jupyterlab/jupyterlab#14335 (comment)

@jhgoebbert jhgoebbert reopened this Jun 9, 2023
@jhgoebbert
Copy link
Author

jhgoebbert commented Jun 28, 2023

I still cannot install the latest dask-labextension for the latest JupyterLab 3 (3.6.4, 3.6.5).
Can anyone confirm that? ... or can confirm that dask-labextension works with the latest JupyterLab 3

      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("dask_labextension-6.1.0/node_modules/@lumino/widgets/types/layout").Layout' is not assignable to type 'import("dask_labextension-6.1.0/node_modules/@jupyterlab/rendermime-interfaces/node_modules/@lumino/widgets/types/layout").Layout'.
            Property '[Symbol.iterator]' is missing in type 'import("dask_labextension-6.1.0/node_modules/@lumino/widgets/types/layout").Layout' but required in type 'import("dask_labextension-6.1.0/node_modules/@jupyterlab/rendermime-interfaces/node_modules/@lumino/widgets/types/layout").Layout'.

more details: jupyterlab/jupyterlab#14335 (comment)

@jhgoebbert
Copy link
Author

Here is the reason why: jupyterlab/jupyterlab#14335 (comment)

@ian-r-rose
Copy link
Collaborator

@jhgoebbert Apologies for the slow reply, and thank you for all your detective work here. We've just cut another release for JupyterLab 3 that should fix this issue, can you confirm that it resolves it for you?

Another release supporting JupyterLab 4 will be forthcoming.

@jhgoebbert
Copy link
Author

Hi @ian-r-rose
these are great news. I have build our environment with the latest dask and can confirm that this resolves the issue.
Thank you

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