-
Notifications
You must be signed in to change notification settings - Fork 56
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 in VSCode repteadly crashing on hover: The Ruff language server exited with a panic #644
Comments
I changed the source of ruff from bundled to environment and now it's not crashing. I don't get it. |
This sounds similar to #607
Oh, that's interesting. What ruff version do you use locally (non bundled)? Do you have a notebook that you could share that we can use for reproduction? |
I just tried creating a notebook with the code above and I can't get Ruff to crash when hovering. Can you tell me a bit more about your setup? What extensions are you using? What VS code version are you using? Can you share a video where you hover over a name and Ruff crashes. I wonder what I do wrong that I'm unable to reproduce. |
I am unable to reproduce the bug myself. it was present all day yesterday, despite various usual interventions like restarting code, the system etc.It stopped when I switched to useenv, but it's still using the bundled ruff. should i mark this closed since i cant reproduce it? |
I don't mind keeping the issue open for a little longer. Maybe you'll be able to reproduce the bug in the coming days. I do think there's a bug in Ruff or VS Code (or in combination with some other extension), but we just have never been able to reproduce it, which makes it hard to fix. |
Thanks for the issue. As per the panic message, it should only occur when a hover request is being made by the client for the entire notebook instead of a single text document (Python file) or a notebook cell. But, the method through which is panics ( I think we can update the return type of |
## Summary Ref: astral-sh/ruff-vscode#644 (comment) ## Test Plan Not sure how to test this as this is mainly to get more context on the panic that the server is raising.
@aflip Hi, I've added the new message and the latest Ruff release contains it. If possible, can you upgrade your Ruff version to the latest version and provide us the new messages whenever the panic occurs? That would really help in understanding the root cause of this and allow us to fix this quickly. |
@dhruvmanila have upgraded, so far no more panic. will upload if anything happens. thank you |
@dhruvmanila @MichaReiser Unfortunately I observe these crashes too, see the logfile I have mailed you and my identical comment here. Thanks for any help in this matter. |
Thanks for sharing the logs, I'll look at that today. |
I would just like to add that I'm starting to notice this quite often, and I think I am able to reproduce the panic. It happens if I'm editing a Python jupyter notebook (with interactive execution). Let's say I write code in 3 jupyter cells, A B and C, then execute the cells one by one. After, I move say cell B to before where cell A was, Ruff does two things:
What I do to solve this is to disable Ruff in the extension error, and then re-enable and restart it. Ruff then functions again. I hope this is of use to you. |
@Quemoy Thank you! I'm able to get a panic based on the steps that you've mentioned. |
Thank you all for the patience. This issue has been fixed and will be released in Ruff 0.9.1. If you encounter this issue again after upgrading to the mentioned Ruff version, please feel free to comment here or open a new issue for that. |
I am working in vscode on a .ipynb notebook, and everytime my cursor hovers over any code, i get the ruff panic message as above
example of the code it crashed over
settins.json
Ruff.log is here: It's the same message repeated.
The text was updated successfully, but these errors were encountered: