Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
hrsh7th committed May 7, 2024
1 parent fc325a9 commit 859ca87
Show file tree
Hide file tree
Showing 3 changed files with 206 additions and 145 deletions.
227 changes: 135 additions & 92 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

26 comments on commit 859ca87

@roycrippen4
Copy link

@roycrippen4 roycrippen4 commented on 859ca87 May 7, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since there isn't an issues tab I'll comment here. Something is broken with this latest commit, specifically with eslint-lsp.

Here's the specific error from .local/share/nvim/lsp.log:

[ERROR][2024-05-07 14:44:37] .../vim/lsp/rpc.lua:752	"rpc"	"/home/roy/.local/share/nvim/mason/bin/vscode-eslint-language-server"	"stderr"	"node:internal/modules/cjs/loader:1152\n  throw err;\n  ^\n\nError: Cannot find module 'semver/functions/parse'\nRequire stack:\n- /home/roy/.local/share/nvim/mason/packages/eslint-lsp/node_modules/vscode-langservers-extracted/lib/eslint-language-server/eslint.js\n- /home/roy/.local/share/nvim/mason/packages/eslint-lsp/node_modules/vscode-langservers-extracted/lib/eslint-language-server/eslintServer.js\n- /home/roy/.local/share/nvim/mason/packages/eslint-lsp/node_modules/vscode-langservers-extracted/bin/vscode-eslint-language-server\n    at Module._resolveFilename (node:internal/modules/cjs/loader:1149:15)\n    at Module._load (node:internal/modules/cjs/loader:990:27)\n    at Module.require (node:internal/modules/cjs/loader:1237:19)\n    at require (node:internal/modules/helpers:176:18)\n    at Object.<anonymous> (/home/roy/.local/share/nvim/mason/packages/eslint-lsp/node_modules/vscode-langservers-extracted/lib/eslint-language-server/eslint.js:104:19)\n    at Module._compile (node:internal/modules/cjs/loader:1378:14)\n    at Module._extensions..js (node:internal/modules/cjs/loader:1437:10)\n    at Module.load (node:internal/modules/cjs/loader:1212:32)\n    at Module._load (node:internal/modules/cjs/loader:1028:12)\n    at Module.require (node:internal/modules/cjs/loader:1237:19) {\n  code: 'MODULE_NOT_FOUND',\n  requireStack: [\n    '/home/roy/.local/share/nvim/mason/packages/eslint-lsp/node_modules/vscode-langservers-extracted/lib/eslint-language-server/eslint.js',\n    '/home/roy/.local/share/nvim/mason/packages/eslint-lsp/node_modules/vscode-langservers-extracted/lib/eslint-language-server/eslintServer.js',\n    '/home/roy/.local/share/nvim/mason/packages/eslint-lsp/node_modules/vscode-langservers-extracted/bin/vscode-eslint-language-server'\n  ]\n}\n\nNode.js v21.6.2\n"
[ERROR][2024-05-07 14:44:37] .../vim/lsp/rpc.lua:752	"rpc"	"/home/roy/.local/share/nvim/mason/bin/vscode-eslint-language-server"	"stderr"	"node:internal/modules/cjs/loader:1152\n  throw err;\n  ^\n\nError: Cannot find module 'semver/functions/parse'\nRequire stack:\n- /home/roy/.local/share/nvim/mason/packages/eslint-lsp/node_modules/vscode-langservers-extracted/lib/eslint-language-server/eslint.js\n- /home/roy/.local/share/nvim/mason/packages/eslint-lsp/node_modules/vscode-langservers-extracted/lib/eslint-language-server/eslintServer.js\n- /home/roy/.local/share/nvim/mason/packages/eslint-lsp/node_modules/vscode-langservers-extracted/bin/vscode-eslint-language-server\n    at Module._resolveFilename (node:internal/modules/cjs/loader:1149:15)\n    at Module._load (node:internal/modules/cjs/loader:990:27)\n    at Module.require (node:internal/modules/cjs/loader:1237:19)\n    at require (node:internal/modules/helpers:176:18)\n    at Object.<anonymous> (/home/roy/.local/share/nvim/mason/packages/eslint-lsp/node_modules/vscode-langservers-extracted/lib/eslint-language-server/eslint.js:104:19)\n    at Module._compile (node:internal/modules/cjs/loader:1378:14)\n    at Module._extensions..js (node:internal/modules/cjs/loader:1437:10)\n    at Module.load (node:internal/modules/cjs/loader:1212:32)\n    at Module._load (node:internal/modules/cjs/loader:1028:12)\n    at Module.require (node:internal/modules/cjs/loader:1237:19) {\n  code: 'MODULE_NOT_FOUND',\n  requireStack: [\n    '/home/roy/.local/share/nvim/mason/packages/eslint-lsp/node_modules/vscode-langservers-extracted/lib/eslint-language-server/eslint.js',\n    '/home/roy/.local/share/nvim/mason/packages/eslint-lsp/node_modules/vscode-langservers-extracted/lib/eslint-language-server/eslintServer.js',\n    '/home/roy/.local/share/nvim/mason/packages/eslint-lsp/node_modules/vscode-langservers-extracted/bin/vscode-eslint-language-server'\n  ]\n}\n\nNode.js v21.6.2\n"

The issue seems to be related to loading the semver package.

@hrsh7th
Copy link
Owner Author

@hrsh7th hrsh7th commented on 859ca87 May 8, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In my environment, I can't reproduce...

@hrsh7th
Copy link
Owner Author

@hrsh7th hrsh7th commented on 859ca87 May 8, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh... Sorry. I can reproduce!

@hrsh7th
Copy link
Owner Author

@hrsh7th hrsh7th commented on 859ca87 May 8, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed thank you!

@roycrippen4
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for maintaining this project!

@codePassion-dot
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

since there's no issues page I will leave this one here:

  • updating to 4.9.0 from 4.8.0 some eslint diagnostics are not showing up anymore, for example auto-completion for react useeffect/usememo hooks is not working anymore

@hrsh7th
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't manage server code.
If you have real issue, you should report it to upstream.

@mguellsegarra
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hello,

I realized I mistakenly opened issue #3146 in the wrong repository. @hrsh7th, could you kindly guide me to the appropriate repository for this issue? Additionally, I am currently reviewing the details and am eager to contribute to resolving it.

Thank you for your exceptional work in maintaining this project; it's greatly appreciated.

@9mm
Copy link

@9mm 9mm commented on 859ca87 May 13, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, I just realized the discussion was here instead of in lsp-config repo. Ill repaste my comment:

Im also encountering this, and vscode-langservers-extracted has no issues enabled to even report the issue.

@jackpinto @mguellsegarra what behavior are you experiencing? For me, the diagnostics just dont show at all, however if i run EslintFixAll it DOES work, so i know lspconfig/eslint is reading the proper project eslintrc file etc, it just simply will not show any diagnostics. theres also no errors in LspLog, and all of that is working properly it seems

@9mm
Copy link

@9mm 9mm commented on 859ca87 May 13, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Im using 4.10.0 btw, same issue

@9mm
Copy link

@9mm 9mm commented on 859ca87 May 14, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@hrsh7th so if the problem isnt here where do we report it to? LSP config said it's not there either.

@heygarrett
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm also seeing this issue with 4.10.0

@hrsh7th
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This package is just extract VSCode's language servers.

If you have problem with latest version, you must rollback with npm i -g vscode-langservers-extracted@%YOUR_SUITABLE_VERSION%.

@9mm
Copy link

@9mm 9mm commented on 859ca87 May 17, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@hrsh7th I'm trying to track down what broke upstream, or what issue there are. Considering eslint 100% broke entirely it is weird I can't find any issues.

can you explain how you are pulling the versions? I looked up the diff between eslint-lsp@4.8.0 and 4.10.0 but it seems there are no locked versions of vscode-eslint... so how is it that I can install 4.8.0 and it works? Isn't it just pulling the latest version any time you install it?

Really im just trying to see which version of vscode-eslint its installing

@mguellsegarra
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@hrsh7th

After reviewing the build process for the LSP of vscode-eslint, I've identified a critical issue: the script currently pulls the latest commit from the default branch (main), which does not necessarily correspond to the latest released version of the extension. As of today, the most recent release in the VSCode Marketplace is version 2.4.4, and the pre-release version is 3.0.5. However, the latest commit on main does not align with either of these versions. This discrepancy unfortunately breaks the eslint-lsp integration with Neovim.

To address this, I propose that we lock the version of vscode-eslint used in the script to a specific commit SHA1 that corresponds to a stable release. This will ensure consistency and stability for those integrating it with Neovim.

I've already submitted a PR with this change, setting the script to checkout from the commit associated with version 2.4.4. Moving forward, we can update the SHA1 as needed when new stable versions are released. I am also volunteering to monitor and test subsequent stable releases to keep this script updated.

Thank you for considering this proposal! If it aligns with your vision for the project, feel free to review and merge at your convenience. Thank you once again for your dedication and hard work.

@mguellsegarra
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

After some investigation, I found out that starting from version 3.0.1 of vscode-eslint (as detailed in their changelog), the method of handling diagnostics has changed. They have transitioned to an LSP diagnostics pull model. I fear this change is likely responsible for the issues we're encountering.

@mguellsegarra
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

More: seems like LSP diagnostic pull is now supported in Neovim 0.10, we'll have to check it out

@mguellsegarra
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can confirm. Neovim 0.10 + eslint-lsp 4.10.0 works with diagnostics.

@9mm
Copy link

@9mm 9mm commented on 859ca87 May 18, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mguellsegarra ugh, you are right. I've literally been using 0.10 and i re-installed 4.10. maybe i needed to recompile neovide which I only did this morning. ffs

@hrsh7th
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mguellsegarra Thank you for your investigation. very helpful. :)

Based on your PR, I will make changes to release the latest version and stable version separately.
Because I think neovim users should also be able to use the latest version.

@9mm Please refrain from writing phrases like 'FFS' in other people's repositories.

@evanleck
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FWIW 4.10.0 breaks in Helix editor as well but 4.8.0 works just fine. I'm sure it's related to the upstream changes, but a way to pin the extension version seems like it'd help.

@bezerra-lucas
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can confirm. Neovim 0.10 + eslint-lsp 4.10.0 works with diagnostics.

Updating Neovim to 0.10 solved eslint for me

@kujohn
Copy link

@kujohn kujohn commented on 859ca87 Sep 11, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FWIW 4.10.0 breaks in Helix editor as well but 4.8.0 works just fine. I'm sure it's related to the upstream changes, but a way to pin the extension version seems like it'd help.

4.8.0 works now with helix! Thank you for saving me!

@Duclearc
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FWIW 4.10.0 breaks in Helix editor as well but 4.8.0 works just fine. I'm sure it's related to the upstream changes, but a way to pin the extension version seems like it'd help.

@evanleck @kujohn
is there a issue tracking when it'll be solved for helix so we can use the latest version again?

@shortc
Copy link

@shortc shortc commented on 859ca87 Oct 1, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Duclearc I think the merging of this PR should fix using eslint 4.10.0 with Helix: helix-editor/helix#11315

@Rudxain
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it possible to lock the version globally? I have other packs installed globally, so I only want to update those

Please sign in to comment.