marinaglancy / vscode-bulk-problem-diagnostics

VSCode extension to open all files in a folder recursively
9 stars 0 forks source link

No longer working for recent ESLint and TS extensions #4

Open ADTC opened 1 week ago

ADTC commented 1 week ago

I made a change that should have obviously created errors in multiple files, but when I run the extension, it doesn't open the files with errors. If I open the files manually, they are showing errors.

It also seems that if I open a file with error manually and close it, then run the extension, it opens that file again, but it still doesn't open other files that I didn't open yet.

VS Code:

Version: 1.90.2 Commit: 5437499feb04f7a586f677b155b039bc2b3669eb Date: 2024-06-18T22:54:35.075Z Electron: 29.4.0 ElectronBuildId: 9728852 Chromium: 122.0.6261.156 Node.js: 20.9.0 V8: 12.2.281.27-electron.0 OS: Darwin arm64 23.5.0

marinaglancy commented 1 week ago

Hello @ADTC , thank you for reporting it. I was able to reproduce the problem. It looks like something changed in the way VSCode opens files and emits the events. I will look at it ASAP

marinaglancy commented 1 week ago

hi @ADTC , I tested it a little more and I noticed that "Bulk problem diagnostics" still reports problems raised by some extensions but it does not show problems raised by eslint extension.

If I roll back the ESLint to version 2.4.4 , then the "Bulk problem diagnostics" works again.

Can you please tell me, which problems are not detected for you? Are they from ESLint or any other extension?

ADTC commented 1 week ago

@marinaglancy I'm not sure if it is ESLint. The error (when manually checked) has a ts code which is TypeScript.

image

My ESLint version is 3.0.10 (the VS Code extension) and these are in package.json:

// Dev dependencies:
"@typescript-eslint/eslint-plugin": "^6.18.1",
"@typescript-eslint/parser": "^6.18.1",
"eslint": "^8.56.0",
"typescript": "^5.4.2"

I tried increasing delay to 500 (wow it took 4 minutes to run through 550+ files), but still nothing.

My file limit is 1000, and severity level is 3 (notices) which if I'm right, should include 1 (errors) and 2 (warnings) too.

marinaglancy commented 1 week ago

Thank you. This is a problem raised by the 'ts' extension - you can see the name of the extension in the dimmed font after the error message.

I have just released version 1.0.7 of the "Bulk problem diagnostics" extension, see CHANGELOG

I also noticed that it may be necessary to increase the delay, in my case 150ms worked fine but I changed the default to 200ms just in case.

ADTC commented 1 week ago

Hmm, I don't have any TypeScript-specific extension in VS Code, although I believe ESLint checks TS errors too? Not sure. As far as I know, TS is only configured in the project and installed as a node module.

Anyway, I'll try the update, though I'm sad that now it would take double the time to run. It was already taking almost a minute for me. :(

Rant: This entire hack would be unnecessary if VS Code just reported all problems without having to open files... Argh!

marinaglancy commented 1 week ago

I guess it's vscode.typescript - one of the built-in extensions that come with vscode. You can see all built-in extensions in you filter your extension list by "@builtin" (also there is an item in the extension filters menu).

Try to set the 'delay' setting to lower than 200, ti could work for you.

Yes, it is a hack unfortunately. But at the same time, I know from working on my other extension MDLCode that it would not be possible to constantly analyse all files. It would just take very long time and slow down everything else.

ADTC commented 1 week ago

I tried delay 100, which seems to have worked for me and it detected all the problem files. But the visual feedback of opening and closing has increased the time required to be almost double still. (And I don't like having the visual feedback anyway. There's no way to do this without it, I guess?)

marinaglancy commented 1 week ago

that's what I had to change, unfortunately. I could not find the way to make eslint/ts extensions report the problems if the file is not actually opened in the tab.

Like I said above, for problems reported by other extensions it still worked

ADTC commented 1 week ago

Understood. Maybe the visual feedback could be an option, on by default, but for those not using ESLint/ts they can choose to turn it off if they are only using other extensions. With a note saying the extension would run faster with the option turned off but it wouldn't work correctly for ESLint and TS.

This is just for your consideration.