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

Override completion broken #6011

Closed
shmellyorc opened this issue Aug 3, 2023 · 14 comments · Fixed by #6315
Closed

Override completion broken #6011

shmellyorc opened this issue Aug 3, 2023 · 14 comments · Fixed by #6315
Assignees
Milestone

Comments

@shmellyorc
Copy link

shmellyorc commented Aug 3, 2023

No errors in vscode output but autocomplete broken again.

C# exntetion v2.0.320 for vscode 1.80.2. Using dotnet 7.0.306.

Doesnt matter if you press Tab, Click it in the list, or press enter or space, notthing happens:
Code_abCNiakOS2

@vladkor-alt
Copy link

понабирали ?%?(% по объявлению дебилов в команду разработки... походу нужно какой-то другой IDE искать...

@mkorsukov
Copy link

mkorsukov commented Aug 3, 2023

понабирали ?%?(% по объявлению дебилов в команду разработки... походу нужно какой-то другой IDE искать...

@vladkor-alt Try this #6016 (comment)

@dibarbet dibarbet added this to the August milestone Aug 3, 2023
@dibarbet
Copy link
Member

dibarbet commented Aug 3, 2023

@genlu appears to be an override completion

@genlu
Copy link
Member

genlu commented Aug 3, 2023

I believe clicking on the override-completion item is a known issue with VSCode, though I couldn't find the bug you filed before @dibarbet

But tab/enter should work. I tried this locally with VSCode 1.81 and C# extension 2.0.320 (w/o devkit) and it works as expected. Could you try repro this issue and share the related log with me? i.e. search for "completionItem/resolve" in the "C# LSP Trace Logs" tab of the output window. Something like

[Trace - 2:09:54 PM] Received notification 'window/logMessage'.
Params: {
    "type": 4,
    "message": "[LanguageServerHost][09:09:54.747][Start]completionItem/resolve"
}


[Trace - 2:09:54 PM] Received response 'completionItem/resolve - (305)' in 9ms.
Result: {
    "label": "GetHashCode()",
    "kind": 2,
........

Also make sure logging is set to Trace

image

@rpahut
Copy link

rpahut commented Aug 4, 2023

Not sure who the request was directed at but in case it helps:
5-C# LSP Trace Logs.portion.redacted.log
The autocompletion here was supposed to insert "void Initialize()\r\n {\r\n base.Initialize();\r\n }" , have no idea what the other "bool Equals" or "int GetHashCode" blocks are.

@FairplexVR
Copy link

FairplexVR commented Aug 7, 2023

Got the same issue

Old csharp

258303944-a06247e2-0397-4226-b110-4c1db098bcd2

New csharp
258304063-9c338aa5-7c22-4dab-bfe7-e3ce8958b80a

This is unacceptable for a stable release

@luthfiampas
Copy link

Facing the same issue yesterday, it happens with XML comments suggestions as well. I've just updated to 1.81.1 and it works fine now. Don't know why.

@genlu
Copy link
Member

genlu commented Aug 15, 2023

There was a change in VSCode May release (I think 1.79?) that caused the problem with override and XML comment completion (see this issue for more details.) That change was reverted in June so the latest VSCode should work as expected.

Could anyone who still experiences this issue try upgrade VSCode (and C# extension too) and see if it persist? Thanks!

@KCFindstr
Copy link
Contributor

I'm on latest vscode (1.81) and still experiencing the override auto completion issue. I believe it's different from the XML one because I only had this problem after switching to the new c# extension (2.0+). The old extension with Roslyn analyzer was able to auto complete overrides as expected.

@dibarbet
Copy link
Member

If anyone is repro'ing this on a project they can share publicly, please attach to this issue and also attach the entire contents of the folder specified by this command:
image

@FairplexVR
Copy link

FairplexVR commented Aug 17, 2023

If anyone is repro'ing this on a project they can share publicly, please attach to this issue and also attach the entire contents of the folder specified by this command: image

I might be wrong but I think this ticket (closed by you btw) provides a way to reproduce the issue.

@JasonAtGitHub
Copy link

JasonAtGitHub commented Aug 19, 2023

I'm having the same issue too. I tried to disable C# Dev Kit and set the option dotnet.server.useOmnisharp to true, It worked as expected. So I think the problem may lies in C# Dev Kit.
Unfortunately, I need C# Dev Kit because the Unity extension depends on it.

@dibarbet
Copy link
Member

dibarbet commented Sep 14, 2023

Note - the fix has been merged, but we have not been able to release a version of the extension to the marketplace with the fix. We're hitting some other bugs that are delaying the release. The current plan is to release next week.

@dibarbet
Copy link
Member

We just released 2.3.27 of the C# extension (changelog) which has fixes for multiple bugs in override completion.

If you're still facing issues after upgrading, please open a new issue. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

10 participants