-
Notifications
You must be signed in to change notification settings - Fork 420
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
Update Roslyn build #1479
Update Roslyn build #1479
Conversation
The test failures are real. |
Looks like the root cause is that omnisharp-roslyn/src/OmniSharp.Roslyn.CSharp/Services/Intellisense/CompletionItemExtensions.cs Lines 42 to 64 in 6836fad
|
Looking... |
{ | ||
return recommendedSymbols.Where(x => x.Name == properties[SymbolName] && (int)x.Kind == int.Parse(properties[SymbolKind])).Distinct(); | ||
} | ||
|
||
// if the completion provider encoded symbols into Properties, we can return them | ||
if (properties.ContainsKey(Symbols)) | ||
if (properties.ContainsKey(SymbolName)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I thought most (all?) completion items will be created via CreateWithSymbolId
? Roslyn doesn't encode the symbol into the completion item anymore?
but if that's the case, we can make this return the same as above - return recommendedSymbols.Where(x => x.Name == properties[SymbolName] && (int)x.Kind == int.Parse(properties[SymbolKind])).Distinct();
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm a bit worried that we might lose some feature by not decoding the symbol from the completion item but looks like we have tests for most of the more esoteric cases (cref completion, named parameter completion, attribute without suffix completion etc) so LGTM 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I read changelog and saw that line
var properties = completionItem.Properties; | ||
|
||
// if the completion provider encoded symbols into Properties, we can return them | ||
if (properties.ContainsKey(SymbolName) && properties.ContainsKey(SymbolName)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
properties.ContainsKey(SymbolName)
- why this code is duplicated? Maybe second check must be properties.ContainsKey(SymbolKind)
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes, it's a typo thanks for finding this 👍I opened the fix here #1491
No description provided.