microsoft / vscode-typescript-tslint-plugin

VS Code extension that provides TSLint support using the typescript-tslint-plugin
https://marketplace.visualstudio.com/items?itemName=ms-vscode.vscode-typescript-tslint-plugin
MIT License
188 stars 35 forks source link

Tslint stops working sometimes VS Code inside of network drive #55

Closed chrants closed 1 year ago

chrants commented 5 years ago

Tslint plugin stops working sometimes VS Code inside of network drive.

I have used vscode-tslint for a while on Windows 10 inside of a network drive repository (mounted via sshfs). It has always worked with type checking and intellisense, though is sometimes a bit slow.

Upon switching to the vscode-typescript-tslint-plugin I can sometimes get it to work inside of a network drive, though it is unstable, and oftentimes stops working entirely. I'm not sure how to provide logs to debug, but with some direction I could do that.

VishalMadhvani commented 5 years ago

sounds like it could be related to https://github.com/Microsoft/typescript-tslint-plugin/issues/32

mjbvz commented 5 years ago

I don't know much about windows network drives but please try collecting the TS Server log to help investigate:

  1. Set "typescript.tsserver.log": "verbose",
  2. Restart VS Code and reproduce the problem
  3. In VS Code, run the TypeScript: Open TS Server log command
  4. This should open a folder with a tsserver.log file in it

Look through that log file for errors or stack traces. If you can share the log, I can also take a look to see if anything stands out

⚠️Warning: The TypeScript log may include information from your workspace, including file paths and source code. If you have any concerns about posting this publicly on Github, just let me know and we can arrange something else. On our side, we only use these logs to investigate issues like this

oneillsp96 commented 5 years ago

I am having the same experience locally. I thought it was just the autoFix on save feature, but I disabled that, and am still seeing the service run slow and occasionally just die, leaving me with an editor full of red squiggly errors that do not go away even after the problem is fixed (until a vscode restart). It seems to occur most often when restructuring TSX markup. For example, trying to wrap an existing div in another div. like it sees an open element, sees there is no closing element (since you haven’t typed it yet). But then when you add the closing

, it doesn’t recognize that the error is fixed, and sometimes stops working altogether requiring a vscode restart.

chrants commented 5 years ago

seeing the service run slow and occasionally just die, leaving me with an editor full of red squiggly errors that do not go away even after the problem is fixed (until a vscode restart). It seems to occur most often when restructuring TSX markup. For example, trying to wrap an existing div in another div.

@mjbvz Yes, this is the problem I'm facing. The problem seems to be hanging during linting. At least, in the few times that I've looked at the logs when it hangs, the last thing the log will record is linting, and nothing more ever again, like the process just hang or was killed.

chrants commented 5 years ago

@mjbvz I'd love to give logs, but they are not so easy to scrub. :(

mjbvz commented 5 years ago

@chrants Can you share the logs privately then?

Also, does normal TS intellisense work properly (without this plugin installed) when you work on a network drive? See https://github.com/microsoft/TypeScript/issues/31817 for example

manu-st commented 4 years ago

Although I'm not using a network drive, I have to restart VS code every 20 minutes or so when I do editing work because the linter stop working. The only thing I can see in the log is the following:

Info 13429[14:9:40.433] [typescript-tslint-plugin] "Computing tslint semantic diagnostics for 'c:/Dev/analysis/AnalysisChart.react.tsx'"
Info 13430[14:9:40.433] [typescript-tslint-plugin] "(runTsLint) start"
Info 13431[14:9:40.433] [typescript-tslint-plugin] "(runTsLint) Loaded tslint library"
Info 13432[14:9:40.433] [typescript-tslint-plugin] "(runTsLint) About to validate c:/Dev/analysis/AnalysisChart.react.tsx"
Info 13433[14:9:40.433] [typescript-tslint-plugin] "(doRun) starting validation for c:/Dev/analysis/AnalysisChart.react.tsx"
Info 13434[14:9:40.433] [typescript-tslint-plugin] "(doRun) Changed directory to c:/Dev"
Info 13435[14:9:40.434] [typescript-tslint-plugin] "(doRun) About to getConfiguration"
Info 13436[14:9:40.434] [typescript-tslint-plugin] "(getConfiguration) Starting for c:/Dev/analysis/AnalysisChart.react.tsx"
Info 13437[14:9:40.439] [typescript-tslint-plugin] "(doRun) Configuration fetched"
Info 13438[14:9:40.439] [typescript-tslint-plugin] "(doRun) Linting: start linting"

as you can see after the last entry there is nothing and my VS code shows me a bunch of errors that do not go away. IntelliSense is not working anymore at this point either (It shows a "Loading..." tooltip and nothing more).

manu-st commented 4 years ago

Is there a way to add even more logging in the typescript-tslint-plugin to figure out where it is stuck? Or while finding a solution, have a quick way to restart the tslint engine without having to restart VS Code?

mjbvz commented 1 year ago

Closing as TSLint has been deprecated in favor of ESLint and this extension is no longer being maintained

Please look into migrating to use ESLint and the ESLint VS Code extension