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

No feedback when an error occurs in the server in certain cases #12572

Open
dhruvmanila opened this issue Jul 30, 2024 · 1 comment
Open

No feedback when an error occurs in the server in certain cases #12572

dhruvmanila opened this issue Jul 30, 2024 · 1 comment
Labels
server Related to the LSP server

Comments

@dhruvmanila
Copy link
Member

With the way the tracing system is set in the server, there's no feedback provided to the user if an error occurs in certain cases. This is the case because for every tracing::error expression, we also require to send a request to display the message like:

tracing::error!("Failed to apply workspace edit: {reason}");
show_err_msg!("Ruff was unable to apply edits: {reason}");

But, it's missing in a few cases. For example, if the path specified in ruff.configuration is invalid, the user won't know that:

Err(err) => {
tracing::error!("Unable to find editor-specified configuration file: {err}");
editor_configuration
}

Related to #12523

@dhruvmanila dhruvmanila added the server Related to the LSP server label Jul 30, 2024
@dhruvmanila
Copy link
Member Author

I looked at this and I think the reason this error message isn't displayed is because this code gets executed many number of times while building the settings index. We could either introduce a macro like show_err_msg_once but the logs would still contain multiple entries.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
server Related to the LSP server
Projects
None yet
Development

No branches or pull requests

1 participant