-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Server doesn't sync cell content if copy-pasted directly #12201
Comments
That's unfortunate. Are you able to reproduce this reliably? If so, will you be able to share the source code on which this panic occurs? Is it occurring in Python file or Jupyter Notebook or either? I suspect it might be occurring in the ruff/crates/ruff_server/src/edit/range.rs Lines 174 to 179 in e6e09ea
|
i cannot reproduce it consistently, but sometimes, when i copy ( |
So, i think this may be reproducible. If ones copies this text into a new cell in a new notebook, then copy that cell (copy the whole cell with c, not only copy the text), the new pasted cell won't have the ruff warning in it, and once one hover over that line (or maybe other lines of the copied cell), the server crushes. qidxs = [9926, 8184, 12563, 6998]
for brand, stores_vcomps_d in all_brand_stores_vcomps.items():
for store, vcomps_dict in stores_vcomps_d.items():
for qidx, vcomps in vcomps_dict.items():
if qidx in qidxs:
print(f"{brand=}, {store=}, {qidx=}")
plot_vcomps_dict(vcomps_dict, qidx, embs_all, w_h=(2, 3)) # long line so ruff complains so when i do the same copy-paste cell with a cell like this , crushes: var = 33
var2 = 55
long_string = 'ASADAADDAASADAADDAASADAADDAASADAADDAASADAADDAASADAADDAASADAADDAASADAADDAASADAADDAASADAADDA' but with a cell like this , it doesn't seem to crush: long_string = 'ASADAADDAASADAADDAASADAADDAASADAADDAASADAADDAASADAADDAASADAADDAASADAADDAASADAADDAASADAADDA' |
Thank you for providing the details. I can reproduce this. |
Ok, I think I found the root cause. It's definitely a bug. Thank you for raising this issue! |
I've been using the ruff server the last days without problems (for linting and formatting), and suddenly this message appeared in
vscode
:I'm not aware of doing any different when it happened, just editing code, notebooks and scripts (ruff is configured to recognize
.ipynb
too).I'm using
ruff 0.5.0
,vscode 1.90.2
and extensionruff-2024.30
. My Linux is6.6.32-1-MANJARO
.Then I tried to restart the server from the command palette, which worked after the second time:
The text was updated successfully, but these errors were encountered: