-
Notifications
You must be signed in to change notification settings - Fork 4.2k
Async suggestions improvements #60528
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
Async suggestions improvements #60528
Conversation
…lemented symbol filtering on VB side
I haven't looked closely yet, but the fact that in your screen capture, the first public class async
{
}
public class B
{
public async Bar() => null;
}This would also explain the soft-selection behavior: completion automatically enters "suggestion mode" when it thinks it's in the name context, (in this case, since |
src/EditorFeatures/CSharpTest2/Recommendations/BoolKeywordRecommenderTests.cs
Outdated
Show resolved
Hide resolved
src/Workspaces/CSharp/Portable/Recommendations/CSharpRecommendationServiceRunner.cs
Outdated
Show resolved
Hide resolved
src/Workspaces/CSharp/Portable/Recommendations/CSharpRecommendationServiceRunner.cs
Outdated
Show resolved
Hide resolved
src/Workspaces/CSharp/Portable/Recommendations/CSharpRecommendationServiceRunner.cs
Outdated
Show resolved
Hide resolved
src/Workspaces/CSharp/Portable/Recommendations/CSharpRecommendationServiceRunner.cs
Outdated
Show resolved
Hide resolved
src/Workspaces/CSharp/Portable/Recommendations/CSharpRecommendationServiceRunner.cs
Outdated
Show resolved
Hide resolved
src/Workspaces/SharedUtilitiesAndExtensions/Compiler/Core/Extensions/ISymbolExtensions.cs
Outdated
Show resolved
Hide resolved
...SharedUtilitiesAndExtensions/Workspace/CSharp/Extensions/ContextQuery/CSharpSyntaxContext.cs
Show resolved
Hide resolved
...SharedUtilitiesAndExtensions/Workspace/CSharp/Extensions/ContextQuery/CSharpSyntaxContext.cs
Outdated
Show resolved
Hide resolved
|
It seems you got a bit carried away) |
? |
|
I mean, I had originaly only 50 files changed. Now there are 95 |
|
You can say global.System. Threading. Tasks.Task But honestly, I think this is splitting hairs a bit too much. |
Ok.
Why? if we are handling this case, why not to implement it properly? Initially I had a distinction between C# and VB, so VB had only |
|
Taking to discord to discuss :-) |
|
THanks! |

Fixes: #60341
This is my largest PR so far)
Current result for C#:

A bit of overflown by snippets, but it will be fixed when semantic snippets will come into play, I guess
Known issues:
net472, which disables my ability to testValueTaskand, what is more important IMO,IAsyncEnumerableandIAsyncEnumeratoras special casesAsyncMethodBuilderis not available inSystem.Runtime.CompilerServiceswhen running tests, so I can't test the case with user defined awaitable. I guess, this is the because of same reason as an issue above, but I am not sure hereNote how preselection in the second case is kind of unfocused, so if I want to navigate via arrows on keybord, I need to press an arrow twice: first time to make completion window focused, and second time to actually navigate. This doesn't happen in the first case
I tried to place breakpoint here to observe selection behaviour in both situations:
roslyn/src/Features/Core/Portable/Completion/CompletionServiceWithProviders.cs
Line 301 in 65942dc
...And in both cases all items in all contexts had
Defaultbehaviour, whileTaskhadHardSelection, which is expected here. So I don't know, why preselections are different thenThis thing is hard to properly debug, because completions are shown whenever you type any charachter. So I currenly don't know the cause of this bug either
I encourage to review this commit by commit. Also would like some hints of where can possibly causes of preselection bugs be (at least where should I look first) and what should I do to properly test my changes.