pyright icon indicating copy to clipboard operation
pyright copied to clipboard

`diagnosticMode` is no longer defaulting to "openFilesOnly"

Open erictraut opened this issue 1 year ago • 10 comments

With the latest changes in "main", I noticed that the diagnosticMode setting is no longer defaulting to "openFilesOnly". The Pyright VS Code extension is now analyzing all of the files in my projects.

erictraut avatar Aug 09 '24 18:08 erictraut

@rchiodo, looks like this is fallout from your settings change. Do you have time to look into this today, or should I?

erictraut avatar Aug 09 '24 18:08 erictraut

@rchiodo, it looks like this affects more than just diagnosticMode. A bunch of functionality is broken in the VS Code extension for pyright. It's pretty much unusable currently. I'm going to revert your change for now.

erictraut avatar Aug 09 '24 19:08 erictraut

I can look now. Was OOF for a bit.

rchiodo avatar Aug 09 '24 21:08 rchiodo

I'm not reproducing. Do you have an example layout? I only see errors for the opened files.

rchiodo avatar Aug 09 '24 21:08 rchiodo

Maybe it's a background analysis thing. As the config settings are somehow getting lost when passed to the background thread. I'm running debug bits.

rchiodo avatar Aug 09 '24 21:08 rchiodo

I'm running debug also. Did you un-revert (i.e. reapply) your commit?

erictraut avatar Aug 09 '24 21:08 erictraut

Reproing now. Not sure what the problem was.

It seems there are some settings that should always be applied. 'checkOpenFilesOnly' is one of them. I'll need to double check all of the options in 'CommandLineOptions' to make sure they're not one of the json allowed settings.

rchiodo avatar Aug 09 '24 21:08 rchiodo

Maybe it would be good to separate the parts of the CommandLineOptions into two sections. 'Json/pyproject.toml' configurable parts and those that are command line only.

rchiodo avatar Aug 09 '24 21:08 rchiodo

Yeah, sounds reasonable. Maybe move all of the Json/pyproject.toml configurable fields into a sub-structure that hangs off CommandLineOptions?

erictraut avatar Aug 09 '24 21:08 erictraut

Yeah my thoughts exactly.

rchiodo avatar Aug 09 '24 21:08 rchiodo

This is addressed in pyright 1.1.376.

erictraut avatar Aug 14 '24 02:08 erictraut