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

Change upstream language server #7

Open
bollwyvl opened this issue Oct 14, 2021 · 2 comments
Open

Change upstream language server #7

bollwyvl opened this issue Oct 14, 2021 · 2 comments

Comments

@bollwyvl
Copy link

Thanks for getting this going!

It looks like the current language server [email protected], probably originally chosen in jupyterlab-lsp because it was a single .js file, might never get updated again, and isn't very well documented. It's somewhat hard to know what behavior quirks are due to already-fixed-upstream bugs or (sheepishly) my use of it in environments with jupyterlab-lsp.

The upstream's upstream has been getting updates (currently [email protected], but does not have a single-file distribution.

Perhaps ncc could be used at build time of this package to generate an equivalent single-file distribution, such that no node_modules would be included, only a single json-language-server-bin.

Will do some investigating...

Semi-related: it's probably now appropriate to start dreaming how we'd get high-value language servers like this into jupyterlite... jupyterlite/jupyterlite#390 (comment)

@martinRenou
Copy link
Member

Thanks for bringing this up!

Yeah we should totally update this. We might also want to move this repo outside of my personal account. Maybe under https://github.com/jupyter-lsp, I am opening another issue for that.

@bollwyvl
Copy link
Author

Of note: initial ncc says:

[D 2021-10-14 12:24:54.238 ServerApp] 101 GET /lsp/ws/json-language-server (127.0.0.1) 0.95ms
[D 2021-10-14 12:24:54.246 ServerApp] <LspStdIoWriter(parent=<LanguageServerSession(language_server=json-language-server, argv=['json-lsp'])>)> initialized
[D 2021-10-14 12:24:54.247 ServerApp] <LspStdIoReader(parent=<LanguageServerSession(language_server=json-language-server, argv=['json-lsp'])>)> initialized
[D 2021-10-14 12:24:54.247 ServerApp] [json-language-server] Opened a handler
[D 2021-10-14 12:24:54.247 ServerApp] Opening websocket /lsp/ws/json-language-server
[D 2021-10-14 12:24:54.248 ServerApp] [json-language-server] Handling a message
internal/modules/cjs/loader.js:892
  throw err;
  ^

Error: Cannot find module './services/jsonCompletion'
Require stack:
- 👻/json-lsp/json_lsp/dist/index.js
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:889:15)
    at Function.Module._load (internal/modules/cjs/loader.js:745:27)
    at Module.require (internal/modules/cjs/loader.js:961:19)
    at require (internal/modules/cjs/helpers.js:92:18)
    at 👻/json-lsp/json_lsp/dist/index.js:4515:28
    at 👻/json-lsp/json_lsp/dist/index.js:4505:17
    at Object.8994 (👻/json-lsp/json_lsp/dist/index.js:4511:3)
    at __nccwpck_require__ (👻/json-lsp/json_lsp/dist/index.js:14119:43)
    at Object.7226 (👻/json-lsp/json_lsp/dist/index.js:3810:39)
    at __nccwpck_require__ (👻/json-lsp/json_lsp/dist/index.js:14119:43) {
  code: 'MODULE_NOT_FOUND',
  requireStack: [ '👻/json-lsp/json_lsp/dist/index.js' ]
}

👻

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

2 participants