-
Notifications
You must be signed in to change notification settings - Fork 148
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
No provider for: @jupyter-lsp/jupyterlab-lsp:ILSPAdapterManager #977
Comments
For the JS version you may want to try something like: {
"sharedPackages": {
"@jupyter-lsp/jupyterlab-lsp": {
"bundled": false,
"singleton": true,
"strictVersion": true
}
}
} in your |
In production |
Another thing to try if the above does not help: can you require |
The way I am installing is the extension from local is:
---Ideally the above steps should have installed the extension, but the changes were not coming in the application's node_modules, so the 3rd step---
Do you think these steps might lead to any duplication of the extension installed and the token which is in my extension vs which is getting registered are different? 🤔 Basically, I think the issue might be that we are installing the extension and also, having it as a dependency to use the token it provides. |
As you correctly notice your extension ships a copy of jupyterlab-lsp but it should not. As previously mentioned, configuring |
As for the installation, I do not see why you would use This is about as much as I can help without more detailed info or reproducer. |
-- Sorry I forgot to mention before, yes, I am forking the extension - reason being that I have to export these tokens (from index.ts) which I am using in my extension:
You are right the multiple installations is causing the issue. Do you have any idea to get a local setup working with both these extensions on my local and my swb extension depending on the local version of LSP? If not |
You should not need to do that. While they are not exported from import {WidgetAdapterManager} from '@jupyter-lsp/jupyterlab-lsp/lib/adapter_manager'; This is of course not ideal, which is why it was reworked for JupyterLab 4/jupyterlab-lsp 5.0. Does this help? |
I tried that only initially, but it was leading to same issue of file duplication. The two locations:
The Putting the exports solved this issue. But the issue was solved for a specific environment of python version 3.10 and other version If I use just one of the versions, then I am unable to bypass the issue of P.S. can we export these in the Open source version of 4.x? I can raise the PR and you can help releasing a corresponding version, then I won't have to make a local copy and export these statements. |
Feel welcome to open a PR. Regarding
|
Great! I was able to resolve the issue :) Basically I was doing an additional pip install of jupyterlab-lsp. But still had to export the classes. Raised this PR: #980. Would require your help in merging it and releasing a version we can use. Also, can we change the configuration settings (like Automatic hover) while deploying? Thanks. |
Hi, I guess the PR got missed. Would need your help in getting this merged :) - #980 |
Closing as resolved, feel welcome to open any follow-up issues. |
Hi, facing a weird issue with importing an instance of ILSPAdapterManager in our extension. I have tried with LSP versions 4.2.0 and 3.10.2, both.
Steps:
import {ILSPAdapterManager} from '@jupyter-lsp/jupyterlab-lsp';
It fails saying:
index.es6.js:2289 Error: No provider for: @jupyter-lsp/jupyterlab-lsp:ILSPAdapterManager.
, similarly in the setup for 3.x version of LSP, it fails with:No provider for: @krassowski/jupyterlab-lsp:ILSPAdapterManager
.On putting a breakpoint there, I can see that a corresponding entry is present for these Tokens:
I am assuming the token its asking for and the token present are different "instances" even though the "name" of the tokens is the same. Any ideas?
....
One more thing is, I was able to get it working in a specific setup (by chance) with
pip install jupyterlab-lsp==3.10.2
and having a dependency of lsp extension 4.2.0 in my project. Basically jupyterlab extension version was 4.2.0, but the python version was 3.10.2. In this specific combination usingimport {ILSPAdapterManager} from '@jupyter-lsp/jupyterlab-lsp
, the extension comes up! But that leads to double instances of the extension, hence this is not a clean solution.The text was updated successfully, but these errors were encountered: