-
Notifications
You must be signed in to change notification settings - Fork 57
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
Does not work multiroot workspace with remote development #654
Comments
Note: I've connected to new server where Ruff is not installed at all, and it's not in |
Hmm interesting. Would you be able to share some logs with us? See the troubleshooting section for how you can enable logging |
I've set
|
Hmm interesting. An older Ruff version had a bug where it got stuck after the using interpreter message but I assume you're using a recent version of the Ruff extension? Can you try pinning the Ruff status in the VS code toolbar. Does it show |
I seem to have this issue as well. Pinning Ruff leads to a spinning icon next to it. I've found a workaround for now: select the interpreter at the workspace level. That seems to do the trick instead of doing it for a specific folder. |
Thanks. That's interesting. It suggests that Ruff gets stuck during startup. @dhruvmanila do you have an idea why this is happening? |
Thanks. That's helpful because it means we can narrow it down to Ruff getting stuck during startup. |
I tried reproducing the bug using GitHub code spaces but ruff works as expected, even with multiple workspaces. Which is disappointing in this case. Could someone open and share the output of the
|
I also encountered this issue. From the logs, it looks like it's using the python interpreter from one of the folders in my workspace, just not the one that I want it to use. I tried doing Python: Select Interpreter > Select at workspace level but that seemed to have no effect. One workaround is to explicitly set the interpreter in the workspace settings, e.g.: "ruff.interpreter": [
"${workspaceFolder:desired-folder-name}/path/to/python"
] |
@chazmo03 Apologies for the late reply, can you share a minimal directory structure which I can use to reproduce this issue?
For context, the extension will try to get the Python interpreter details from the Python extension if not provided via ruff-vscode/src/common/python.ts Lines 49 to 58 in b6a7b2d
|
Can confirm that setting this in my workspace config fixed the issue, even tho this was the interpreter being detected by ruff (according to logs) before applying this setting:
|
@kdkavanagh If you don't mind, I'd love to get the logs for the scenario where it's not working along with the directory structure and VS Code settings :) |
@dhruvmanila, I'm not doing anything special, just 3 folders - 1 with my main python project and 2 other non-python projects. In the above |
For me, a similar problem went away after I copied my vscode settings from my code workspace root into the workspace folder: {
"[python]": {
"editor.formatOnSave": true,
"editor.defaultFormatter": "charliermarsh.ruff"
}
} as if the extension wasn't able to properly make sense of the root-level settings. |
I had the same problem, related to multi-root, and I believe it's related to the Python extension caching things in a bad way. If you do |
PS: this was impossible to debug using Troubleshooting because it was hanging before, apparently, it read my |
Following #652 here's the problem: f I open multiroot workspace on remote server Ruff does not work, however if I just open folder(root folder where .code-workspace is) Ruff starts working.
Setting this one does not help:
Might also be related to #653
The text was updated successfully, but these errors were encountered: