Skip to content
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

Log entries are not cleaned up when using "Restart server" #12469

Closed
hasali19 opened this issue Jun 5, 2022 · 7 comments · Fixed by #12470
Closed

Log entries are not cleaned up when using "Restart server" #12469

hasali19 opened this issue Jun 5, 2022 · 7 comments · Fixed by #12470
Labels
A-vscode vscode plugin issues C-bug Category: bug

Comments

@hasali19
Copy link
Contributor

hasali19 commented Jun 5, 2022

I often use the "Restart server" command to reload rust analyzer when switching between build targets. I noticed that rust analyzer seems to create a new entry in the vscode output view every time the server is restarted. Is something not being cleaned up properly?

image

@Veykril
Copy link
Member

Veykril commented Jun 5, 2022

Given you said you use this often and you are only reporting this now I assume this is a recent regression? And if that's the case are you using the nightly r-a? Wanna make sure whether this might be the request retry PR or not

Edit: Doesn't seem to a recent regression, latest stable triggers this as well so its not the rety PR (I also noticed sem highlighting erroring when restarting the server while its initializing)

@Veykril Veykril added A-vscode vscode plugin issues C-bug Category: bug labels Jun 5, 2022
@lnicola
Copy link
Member

lnicola commented Jun 5, 2022

Not a regression, but make sure to disable tracing if you have it enabled.

@Veykril
Copy link
Member

Veykril commented Jun 5, 2022

This also duplicates the rust analyzer language server log, not just the trace

@hasali19
Copy link
Contributor Author

hasali19 commented Jun 5, 2022

Given you said you use this often and you are only reporting this now I assume this is a recent regression? And if that's the case are you using the nightly r-a? Wanna make sure whether this might be the request retry PR or not

I use the restart command often, but I don't look at the logs very often so I only noticed it today. I am indeed using nightly.

Not a regression, but make sure to disable tracing if you have it enabled.

I disabled tracing which stops any output from being shown, but it seems that the entries in the menu are still duplicated.

@Veykril
Copy link
Member

Veykril commented Jun 5, 2022

Ye it seems we don't dispose of/reuse the channels when restarting

@hasali19
Copy link
Contributor Author

hasali19 commented Jun 5, 2022

Tangentially, when changing the build target (rust-analyzer.cargo.target) vscode shows a notification that r-a needs to reload but the button reloads the whole window. That's kind of annoying so I've been manually using "Restart server" which works fine - it seems like the notification should also do that instead.

@Veykril
Copy link
Member

Veykril commented Jun 5, 2022

Ye I think we can downgrade that to a server restart instead

@bors bors closed this as completed in 6667061 Jun 5, 2022
bors added a commit that referenced this issue Jun 5, 2022
fix: Restart the server instead of reloading the window when config changes

 cc #12469 (comment)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-vscode vscode plugin issues C-bug Category: bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants