-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Syntax Error: expected SEMICOLON, Rust Analyzer Bug #18745
Comments
Do you have any errors in the logs (Output pane)? |
That's not what @lnicola meant; he asked if you have errors in the Output pane, under Rust Analyzer Language Server. Panics in rust-analyzer itself. |
Oh, I'm sorry I didn't read their message properly. |
That's weird... Are you sure there aren't any panics there? (before you restart r-a). |
I unfortunately restarted VSCode to continue working on my code before I saw this. The Rust Analyzer Output is empty right now, I will make a new comment if I can recreate it. |
It is unlikely you'll run into it again any time soon as the panic that likely caused that was fixed (and before easily triggerable), so I'll close this for now but if you run into it again please do open a new issue / reopen this. |
@Veykril I actually ran into it at least half a dozen times in the past week. But I understand, in case it happens again I will reopen it. |
The panic itself got fixed within the last week, so this monday's release has it fixed that's why I made that comment (sorry for leaving that info out) |
Oh! That's actually great! Thank you! |
It unfortunately happened again right now. Here's my whole RA-LS Output: The Specific error that VSCode notified me of and just looks odd compared to everything else is this:
I hope this helps. I forgot to mention in my opening comment: @Veykril @lnicola, I think I'm not allowed to reopen the issue myself. Could you please reopen it? In case you don't get notification about this I will make another issue linking to this in a day or two. |
Odd, that is missing the panic message 😕 |
Is it really a panic issue? The rust analyzer keeps working fine, it counts all the warnings and other errors correctly but it suddenly starts asking for an unnecessary semicolon. Putting a semicolon there doesn't fix the issue, it just adds a warning telling me to remove it. Is there any other log output I can send here? I unfortunately restarted my laptop since last night so it's no longer there but in case I encounter it again. |
panics don't bring down the server, they just fail a request |
Okay I figured out the issue, but not why it occurs. What we are observing here is not panic, but a Cycle unwind (hence no stracktrace). Now why that is not being caught correctly by salsa I have no idea |
Oh, I was under the impression that panics would halt the whole server. It's cool to see this being worked on in action. Wish you guys the best in finding it, in case you needed anything let me know I'll try to help as best as I can. |
Actually, maybe someone else can chime in if they know, but were cycles ever caught correctly by our request infra or have we only ever observed them via tests? If I see things right we are actually required to catch them manually? |
#4829
This is the continuation of the closed issue above.
I started having this issue a couple of weeks ago, I'm certain there is no issue with my syntax because even when I remove everything and just leave in the standard main function with the "Hello, World!" text it still gives this error.
The issue goes away if I restart VSCode as people did in the mentioned thread.
It also goes away if I make a new file and copy all my code into it again.
When I run
cargo run
for that project it builds with no errors.Although I could not exactly reproduce this error consistently, I think moving lines using
Alt+ArrowKeys
could cause this sometimes.The text was updated successfully, but these errors were encountered: