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

ruff server: Formatting a document with syntax problems no longer spams a visible error popup #11745

Merged
merged 3 commits into from
Jun 5, 2024

Conversation

snowsignal
Copy link
Contributor

Summary

Fixes astral-sh/ruff-vscode#482.

I've made adjustments to format and format_range that handle parsing errors before they become server errors. We'll still log this as a problem, but there will no longer be a visible popup.

Test Plan

Instead of seeing a visible error when formatting a document with syntax issues, you should see this warning in the LSP logs:

Screenshot 2024-06-04 at 3 38 23 PM

Similarly, if you try to format a range with syntax issues, you should see this warning in the LSP logs instead of a visible error popup:

Screenshot 2024-06-04 at 3 39 10 PM

@snowsignal snowsignal added the server Related to the LSP server label Jun 4, 2024
Copy link

codspeed-hq bot commented Jun 4, 2024

CodSpeed Performance Report

Merging #11745 will not alter performance

Comparing jane/server/error-spam (9293364) with main (d056d09)

Summary

✅ 30 untouched benchmarks

Copy link
Contributor

github-actions bot commented Jun 4, 2024

ruff-ecosystem results

Linter (stable)

✅ ecosystem check detected no linter changes.

Linter (preview)

✅ ecosystem check detected no linter changes.

Co-authored-by: Zanie Blue <contact@zanie.dev>
@snowsignal snowsignal merged commit 8338db6 into main Jun 5, 2024
20 checks passed
@snowsignal snowsignal deleted the jane/server/error-spam branch June 5, 2024 00:18
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

Successfully merging this pull request may close these issues.

Ruff Native Server spams Ruff encountered a problem. Check the logs for more details. with bad symbols.
3 participants