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

Diagnostics reported remains after branch change where file doesn't exist #857

Open
anderseknert opened this issue Jun 20, 2024 · 6 comments
Labels
bug Something isn't working language server protocol

Comments

@anderseknert
Copy link
Member

Creating "foo.rego" and deleting it doesn't seem to remove the diagnostics reported for that file.

Screenshot 2024-06-20 at 07 05 42
@anderseknert anderseknert added bug Something isn't working language server protocol labels Jun 20, 2024
@charlieegan3
Copy link
Member

I was able to replicate this but now I can't. Do you remember anything you had in this env to make it happen?

@anderseknert
Copy link
Member Author

No, seems to have been accidentally fixed somehow 😅 But I'll take it! Let's close and re-open if we encounter this again.

@charlieegan3
Copy link
Member

yeah I am unsure what that would have been, 👍 we can keep an eye out.

@anderseknert
Copy link
Member Author

While I'm not sure it counts as deletion, this can be triggered by having issues reported on one branch, then switching branch to one where that file doesn't exist. The errors reported remains.

@anderseknert anderseknert reopened this Jul 1, 2024
@charlieegan3
Copy link
Member

Hmm, this is hard as in this case the client didn't delete the file. (aka right click, delete).

I'd be interested to know what other language servers do here, but doing a full reload on branch change seems reasonable.

@anderseknert
Copy link
Member Author

Yeah... there's probably a branch change listener somewhere in the client already, but ideally we'd be able to catch this without relying on client code 🤔 we could perhaps just check periodically, but if there's a better way, that'd be good.

@anderseknert anderseknert changed the title Diagnostics reported remains after file is deleted Diagnostics reported remains after branch change where file doesn't exist Jul 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working language server protocol
Projects
Status: TODO
Development

No branches or pull requests

2 participants