plugin looks for the ruff binaries in the wrong directory or misconfig?
ar4hc opened this issue · 1 comments
Describe the bug
i see log entries like this:
INFO - #c.i.p.l.i.LspServerImpl - RuffLspServerDescriptor@classifier-api(Running;6): window/logMessage Log: Interpreter executable (/opt/homebrew/Cellar/ruff-lsp/0.0.53/libexec/bin/ruff) not found
running on a mac with brew installed ruff.
The error seems valid as /opt/homebrew/Cellar/ruff-lsp/0.0.53/libexec/bin/ruff
isn't there and i suspect it should be
/opt/homebrew/Cellar/ruff-lsp/0.0.53/libexec/bin/ruff-lsp
(with -lsp at the end) which exists, and is the only binary in this dir.
Autodetect in the plugin config finds '/opt/homebrew/bin/ruff' and ...'-lsp', both links to the existing binaries.
It still seems to work though...
i created a link in the ruff-lsp dir to the ruff bin, like
ln -s ../../../../ruff/0.4.8/bin/ruff
and then see logs like
INFO - #c.i.p.l.i.LspServerImpl - RuffLspServerDescriptor@classifier-api(Running;6): window/logMessage Log: Using interpreter executable: /opt/homebrew/Cellar/ruff-lsp/0.0.53/libexec/bin/ruff
INFO - #c.i.p.l.i.LspServerImpl - RuffLspServerDescriptor@classifier-api(Running;6): window/logMessage Log: Found ruff 0.4.8 at /opt/homebrew/Cellar/ruff-lsp/0.0.53/libexec/bin/ruff
INFO - #c.i.p.l.i.LspServerImpl - RuffLspServerDescriptor@classifier-api(Running;6): window/logMessage Log: Running Ruff with: /opt/homebrew/Cellar/ruff-lsp/0.0.53/libexec/bin/ruff ['check', '--force-exclude', '--no-cache', '--no-fix', '--quiet', '--output-format', 'json', '-', '--stdin-filename', '/Users/...py']
Which means the plugin is still using cli ruff
to format...?
To Reproduce
Steps to reproduce the behavior:
- Configure ruff plugin with everything checked.
- open logs
- wait...
Expected behavior
plugin should find the correct binary for rust-lsp.
Environments (please complete the following information):
- IDE: Ultimate
- OS: macOS Version 14.5 (23F79)
- Ruff Version 0.4.8
- ruff-lsp 0.0.53
- Plugin version 0.0.33
Additional context
Probably a misconfig here... not sure...
today i get an infinit loop of those log entries:
INFO - #c.i.p.l.i.LspServerImpl - RuffLspServerDescriptor@classifier-api(Running;9): window/logMessage Log: []
INFO - #c.i.p.l.i.LspServerImpl - RuffLspServerDescriptor@classifier-api(Running;9): window/logMessage Log: Using interpreter executable: /opt/homebrew/Cellar/ruff-lsp/0.0.53/libexec/bin/ruff
INFO - #c.i.p.l.i.LspServerImpl - RuffLspServerDescriptor@classifier-api(Running;9): window/logMessage Log: Found ruff 0.4.8 at /opt/homebrew/Cellar/ruff-lsp/0.0.53/libexec/bin/ruff
INFO - #c.i.p.l.i.LspServerImpl - RuffLspServerDescriptor@classifier-api(Running;9): window/logMessage Log: Running Ruff with: /opt/homebrew/Cellar/ruff-lsp/0.0.53/libexec/bin/ruff ['check', '--force-exclude', '--no-cache', '--no-fix', '--quiet', '--output-format', 'json', '-', '--fix', '--stdin-filename', 'foo.py']
INFO - #c.i.p.l.i.LspServerImpl - RuffLspServerDescriptor@classifier-api(Running;9): window/logMessage Log: Using interpreter executable: /opt/homebrew/Cellar/ruff-lsp/0.0.53/libexec/bin/ruff
INFO - #c.i.p.l.i.LspServerImpl - RuffLspServerDescriptor@classifier-api(Running;9): window/logMessage Log: Found ruff 0.4.8 at /opt/homebrew/Cellar/ruff-lsp/0.0.53/libexec/bin/ruff
INFO - #c.i.p.l.i.LspServerImpl - RuffLspServerDescriptor@classifier-api(Running;9): window/logMessage Log: Running Ruff with: /opt/homebrew/Cellar/ruff-lsp/0.0.53/libexec/bin/ruff ['check', '--force-exclude', '--no-cache', '--no-fix', '--quiet', '--output-format', 'json', '-', '--fix', '--select', 'I001', '--select', 'I002', '--stdin-filename', 'foo.py']
INFO - #c.i.p.l.i.LspServerImpl - RuffLspServerDescriptor@classifier-api(Running;9): window/logMessage Log: Using interpreter executable: /opt/homebrew/Cellar/ruff-lsp/0.0.53/libexec/bin/ruff
INFO - #c.i.p.l.i.LspServerImpl - RuffLspServerDescriptor@classifier-api(Running;9): window/logMessage Log: Found ruff 0.4.8 at /opt/homebrew/Cellar/ruff-lsp/0.0.53/libexec/bin/ruff
INFO - #c.i.p.l.i.LspServerImpl - RuffLspServerDescriptor@classifier-api(Running;9): window/logMessage Log: Running Ruff with: /opt/homebrew/Cellar/ruff-lsp/0.0.53/libexec/bin/ruff ['check', '--force-exclude', '--no-cache', '--no-fix', '--quiet', '--output-format', 'json', '-', '--fix', '--select', 'I001', '--select', 'I002', '--stdin-filename', 'foo.py']
INFO - #c.i.p.l.i.LspServerImpl - RuffLspServerDescriptor@classifier-api(Running;9): window/logMessage Log: []
foo.py
was a real absolute path...