nvuillam / vscode-groovy-lint

VSCode extension to lint , correct and format groovy and Jenkinsfile
https://nvuillam.github.io/vscode-groovy-lint/
MIT License
69 stars 18 forks source link

Latest VSCode release (1.82.0) causes linter to hang on startup #172

Closed glhfior closed 11 months ago

glhfior commented 1 year ago

Running latest release of the plugin (2.0.0) with the latest VSCode release(1.82.0)... I have seen a mixed bag or how this manifests... Occasionally codenarc won't launch... or if it does, no response is generated and the spinner goes indefinitely in the status bar When this occurs, the codenarc java task continues to run even after VSCode terminates Down-revving VSCode to 1.77.3 (haven't yet tried versions in between) resolves the issue

Not a show stopper for me... I can live without new VSCode features, but I figured I'd notify you before additional issues come in

glhfior commented 1 year ago

I was able to get a hold of additional binaries and have successfully been able to use the plugin through version 1.81.1... still trying to acquire and test with versions between 1.81.1 and 1.82.0

glhfior commented 1 year ago

tested with Today's 1.82.1 release... issue persists

nibbleswap commented 1 year ago

Can confirm issue exists here as well with 1.82.2 while on 1.82.1 it works (MacOS 13.5.2)

alexvaigm commented 1 year ago

Same issue for me

Version: 1.82.2 (user setup) Commit: abd2f3db4bdb28f9e95536dfa84d8479f1eb312d Date: 2023-09-14T05:55:25.390Z Electron: 25.8.1 ElectronBuildId: 23779380 Chromium: 114.0.5735.289 Node.js: 18.15.0 V8: 11.4.183.29-electron.0 OS: Windows_NT x64 10.0.19045

nvuillam commented 1 year ago

npm-groovy-lint / vscode-groovy-lint lacks of maintenance (I have to choose my battles and Groovy stuff is unfortunately at the bottom of my huge backlog)

Would someone like to investigate ?

ButterBetzi commented 1 year ago

same problem still in 1.82.2 & 1.83.0

Peuj commented 1 year ago

@nvuillam I've investigated a little and on my side the problem seems related with npm-groovy-lint which cannot handle correctly CodeNarcServer.

During debug => await linter.run() (from linter.ts) => callCodeNarc (from groovy-lint.js (npm-groovy-lint)) => callCodeNarcServer => await axios.request (from codenarc-caller.js (npm-groovy-lint)): I got an exception Error: connect ECONNREFUSED ::1:7484 even I could access the server 'http://localhost:7484' from my browser.

Then we go to startCodeNarcServer, everything works well excepted when testing 'http://localhost:7484/ping' using axios.get(serverPingUri) where I got the exception Error: connect ECONNREFUSED ::1:7484 even I could access the server 'http://localhost:7484/ping' from my browser I hope that help, I don't know what is the problem.

stevenh commented 1 year ago

Seeing the same behaviour here, once it kicks into action it seems good but sometimes it wont.

I have seem times where the java process has been orphaned, which then means an old version has the port causing further issues.

kikmon commented 1 year ago

Experiencing the same issue here with VSCode 1.83.1, (not working at all.) Did anyone manage to find a workaround ?

stevenh commented 1 year ago

I believe a https://github.com/nvuillam/npm-groovy-lint/pull/308 is the fix

kikmon commented 1 year ago

thanks a lot for the fix, now we only need a new official release :)

nvuillam commented 1 year ago

@kikmon once the CI jobs will be ok on https://github.com/nvuillam/npm-groovy-lint/pull/308 i'll run to release a new version of npm-groovy-lint and vscode-groovy-lint :)

kikmon commented 1 year ago

Looks like 308 was closed because the changes were already included in 309, and as far as I can see CI jobs look green :) Are we still waiting for another change to get a new official release ?

stevenh commented 1 year ago

Now we have a solid version of npm-groovy-lint, we'll be working on an update.

There's still at least one issue in vscode which is hindering this currently.

CorenTheChosen commented 1 year ago

@stevenh Thanks so much for your hard work on this. I'm not a developer by any stretch, but I do a lot in groovy scripting and this tool has been instrumental in helping clean up and standardize my code. The maintenance of extensions like this is beyond me but it means a lot and I wanted to make sure you (and other contributors that I'm sure I don't see) know that it is appreciated.

nvuillam commented 11 months ago

this is fixed in newest release v3.0.0, thanks to the great job of @stevenh :)

Please can you confirm it works well for your case now ?