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

Send response when lookup IDE request fails. #3189

Closed
wants to merge 4 commits into from

Conversation

gebner
Copy link
Contributor

@gebner gebner commented Jan 12, 2024

The lookup request is the only one which does not return any response if the request failed. This makes it hard to support it in a generic API for IDE requests. See discussion at FStarLang/fstar-vscode-assistant#27 (comment)

The history of the failure response for this request is interesting: it has flipped several times over the last year. I have summarized the responses for the different editors in the table below. I could not find any justification for the changes, the current vscode extension seems to work just fine with the change. This PR effectively reverts the behavior to how it was in 2022. 

time vscode emacs
2022 NOK NOK
after 754a6d8 OK OK
after 6f979fb nothing NOK
after this PR NOK NOK

@gebner
Copy link
Contributor Author

gebner commented Jan 13, 2024

So apparently the lookup query is used internally by full-buffer.

@gebner
Copy link
Contributor Author

gebner commented Jan 16, 2024

So apparently the lookup query is used internally by full-buffer.

I've added a new internal query type to ignore errors. The full-buffer command now uses this to suppress error messages when generating the internal lookup queries, while keeping the 2022 semantics of lookup. (Though I don't think the error messages broke anything except for the tests.)

@gebner
Copy link
Contributor Author

gebner commented Apr 26, 2024

The vscode extension now avoids the awkward version of the lookup query, and no longer uses the internal lookup queries either.

The right choice is probably to just remove the internal lookup queries entirely.

@gebner gebner closed this Apr 26, 2024
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.

1 participant