astral-sh / ruff-vscode

A Visual Studio Code extension with support for the Ruff linter.
Other
1.06k stars 53 forks source link

Better error message for unsupported Ruff version #512

Closed dhruvmanila closed 3 months ago

dhruvmanila commented 3 months ago

Summary

This PR adds back the message to suggest the user that the current Ruff binary doesn't support the native server.

This was removed from the Python script in #511.

fixes: #476

Test Plan

Install an older Ruff version to test this out using pipx install --force "ruff==0.3.3".

Screenshot 2024-07-03 at 14 50 41

And, we've another log message which displays the Ruff version similar to ruff-lsp:

2024-07-03 16:00:03.089 [info] Using the Ruff binary: /Users/dhruv/work/astral/ruff-lsp/.venv/bin/ruff
2024-07-03 16:00:03.094 [info] Found Ruff 0.4.10 at /Users/dhruv/work/astral/ruff-lsp/.venv/bin/ruff
2024-07-03 16:00:03.095 [info] Server run command: /Users/dhruv/work/astral/ruff-lsp/.venv/bin/ruff server --preview