-
Notifications
You must be signed in to change notification settings - Fork 677
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
C# syntax error hints disappear after a few seconds #883
Comments
From @rebornix on November 2, 2016 16:9 @zeyangl I'll say let's start with OmniSharp as we don't know yet whether OmniSharp regards it as no longer an error after |
From @zeyangl on November 4, 2016 5:13 It appears to be fixed in 1.7.1 release. OmniSharp version remains the same though, so probably a nice side effect of some other fix in vscode. |
From @marcelush on November 5, 2016 21:53 I am still having same issue on Ubuntu 14.04, insiders and stable Version 1.7.1. Initially i was suspecting the auto save feature to have something to do about it, but i tested with all possible options. Warnings and info remain, but errors disappear about 2 seconds after code change (saved or not). Same project works fine in Windows with vscode 1.7.1 |
I get this same issue on mac, using for unity. |
I get it with all / any projects. When I move the cursor, the red underline squiggles disappear. Not sure why this issue keeps getting closed, it's quite an alive and real bug ;) Many threads on it now. I tried the patch csharp-1.5.0-future-preview1.vsix but same issue |
I haven't been able to reproduce the issue myself, though its not for lack of trying. Note that csharp-1.5.0-future-preview1 is older than the recently released 1.5.1 which is available from within VS Code. |
@DustinCampbell did you try out the repro steps and codebase I put up? On Nov 15, 2016 12:14 PM, "Dustin Campbell" notifications@github.com
|
What about the latest available extension? These are older than the extension we just released. |
Well new versions are going to keep coming out: beta8 was the latest On Nov 15, 2016 12:17 PM, "Dustin Campbell" notifications@github.com
|
I will try the codebase you posted. Hopefully, I can get to the bottom of this. |
I also experience this with a Unity Project. I filed a report to Unity, and they told me its a VSCode issue, who says its a OmniSharp issue, so here I am now. I tested using v1.5.1, I will test on v1.5.2 now also. If you want an Unity project that experiences this error I can provide it. |
Could you provide the code base? That'd be very helpful. Note that 1.5.2 is worth trying. It includes several fixes to how diagnostics are displayed, so it could have an impact on this problem. |
@CoenraadS IMHO it's a OmniSharp issue but it's just a wild suspicion. But since it's C# related, I'd like to start investigation here and then maybe we can know whether it's a common one :) |
@rebornix: I'm quite certain it's a C# extension issue (note that the C# extension is not called "OmniSharp" -- that's simply a technology leveraged by the extension). |
The error seems related to the project size, so unfortunately I cannot submit it as a minimum scenario, but have to upload my whole project ~100 MB, too large for inbuilt attachment. I sent a WeTransfer to @DustinCampbell email address, I hope that is ok. I tested 1.5.2 it still occurs. To use the sample, open /Scripts/ErrorTest.cs from Unity What I see: |
@CoenraadS: Thanks for the link. Downloading now... |
I can repro! Excellent! |
@rebornix: I think this might actually be a VS Code issue. Debugging in, I can see what's happening. When a file is opened, we request diagnostics from the OmniSharp server and then call In addition, when the file is opened, we request diagnostics for the entire solution from the OmniSharp server. This happens on a 3 second delay. When the result comes in, we process all of the diagnostics, producing an array of Uri to diagnostic array ( |
I'm betting the problem is here: https://github.com/Microsoft/vscode/blob/c67ef57cda90b5f28499646f7cc94e8dcc5b0586/src/vs/workbench/api/node/extHostDiagnostics.ts#L77 I bet this is due to the fact that JavaScript's array.sort() is not necessarily stable. So, if two items appear in array for the same file name, it could reverse them. In other words, this...
...could become this...
Which would result in disappearing errors. Thoughts? cc @jrieken |
I've filed microsoft/vscode#15585 to track getting this issue fixed in VS Code. |
OK. It looks like a solid fix has been checked into VS Code. It turns out that I couldn't repro because the array.sort() function starts out stable with small sets, but becomes unstable on larger sets. So, this would have only reproduced on larger projects with lots of diagnostics. The fix should start showing up in VS Code Insiders builds soon. |
From @zeyangl on November 2, 2016 10:9
C# syntax error hint disappears after a few seconds.
Steps to Reproduce:
I expect this to be a VSCode issue instead of OmniSharp, since the syntax hints did show up correctly, only to disappear in a couple of seconds.
Copied from original issue: microsoft/vscode#14844
The text was updated successfully, but these errors were encountered: