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

lsp server: fix response sending order #64

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

umutdural
Copy link
Collaborator

When a timeout occurs the "timeout" message becomes visible before the remaining procs are marked with "unknown" results. This PR fixes this bug by reordering the response order.

before, "timeout" was being shown before "unknown" results in the vscode extension. Now, the "unknown" results are sent before the server responds to the verify request with "timeout" or "interrupt"
@Philipp15b
Copy link
Collaborator

Could you explain why that's correct? The code looks a bit weird to me. Why are we doing two match statements on res? In case of an error, it looks like we're sending two server errors to the client now?

Could you maybe just refactor that code to have just one match statements that handles everything explicitly?

server.lock().unwrap().add_diagnostic(diagnostic)?;
}
VerifyError::Interrupted | VerifyError::LimitError(_) => {
// If the verification is interrupted or a limit is reached before the verification starts, no verification statuses are published yet.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why handle that case here? Why don't we just immediately publish_verify_statuses() after registering them?

Also, isn't this case about publishing those that are now timeouts, not Todo anymore?

…e todo-to-timeout transformation to lsp server
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants