Skip to content

Support refreshing single files in diagnostic pull #1669

@rchiodo

Description

@rchiodo

In this code here, workspace diagnostics is repolling every 2 seconds:

This makes Pylance continuously do analysis. At least for items that don't seem to save the fact that there are no errors. (Previous result ids don't exist for files that aren't open, but workspace mode asks for all files).

I'm not sure if the polling is as design (might be) but missing the previous result id seems like a bug?

For example, in the issue where we found this:
microsoft/pylance-release#7499

The user has a single file open.

Our result contains all files though. The next poll request only has a previous result id for the file that's open. If all previous results were passed, we would mark the next request as unchanged, but we can't because of the missing result ids for the unopened files.

Metadata

Metadata

Assignees

No one assigned

    Labels

    feature-requestRequest for new features or functionality

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions