Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Changing error messages - differences in reported errors between VS and pyright cli #7274

Open
excubo-jg opened this issue Dec 16, 2022 · 2 comments
Assignees
Labels
needs investigation Could be an issue - needs investigation

Comments

@excubo-jg
Copy link

Describe the bug
After starting n (1<= n <= 10) debug sessions, the reported errors change. Usually at this point in time, the Output-Pylance entry in the drop-down menu disappears

Steps to Reproduce
Open project - Errors reported:
image

Start debug sessions. After a couple of runs, error reporting will change:
image
(this has nothing to do with the current problems with flask, another project not using flask exhibits the same behavior)
The change in error reporting always happens, surprisingly this time the output-pylance entry did not disappear:

image
Notable difference is the line saying "no source files found"

Editing code yields new error messages but only on the new baseline. The initially reported errors are still there but do not get reported.
image

Expected behavior
Stable and reliable reporting of errors

Additional context and screenshots
I have not been able to force output-pylance to disappear, after some debug sessions it is gone.

Configuration information (If you are providing a diagnostics file (see below), skip this section)
`
image

@excubo-jg
Copy link
Author

Some more observations.
Step 1: I did run pyright from the command line which yielded numerous errors none of which were being reported when I did close the project in VS.

Step 2: Opening the project in VS yielded no errors although the one py file which got opened had an error reported in step 1.

Step 3: Opening other py-files with errors being reported in step 1 caused the very same errors to be reported for the newly opened files (but not for the one opened in step 1). Close files.

Step 4: Starting some debug sessions until pylance-entry disappears from Output

Step 5: Re-Opening the files from step 3 or other files reported in step 1 does not cause any errors to be reported

The error reporting in VS is not in sync with pylance. Also, I did notice that VS only checks py-files opened in VS but not files never opened. Running pylance gives a full report of the project, VS error reporting does not and this is quite misleading if files are being edited by different users using different environments.

@excubo-jg excubo-jg changed the title Changing error messages Changing error messages - differences in reported errors between VS and pyright cli Dec 28, 2022
@excubo-jg
Copy link
Author

fwiw I forgot to mention as this happens really seldom. I just had an instance of a git commit removing pylance from the output drop-down

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs investigation Could be an issue - needs investigation
Projects
None yet
Development

No branches or pull requests

3 participants