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

Do not send a symbol search request to OmniSharp if search term is shorter than "omnisharp.minFindSymbolsFilterLength" #2625

Merged
merged 9 commits into from
Nov 1, 2018

Conversation

filipw
Copy link
Contributor

@filipw filipw commented Oct 25, 2018

Instead of doing the validation on the server, we do it on the client.

@codecov
Copy link

codecov bot commented Oct 25, 2018

Codecov Report

Merging #2625 into master will increase coverage by 0.29%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #2625      +/-   ##
==========================================
+ Coverage   64.86%   65.16%   +0.29%     
==========================================
  Files          99       99              
  Lines        4318     4320       +2     
  Branches      629      630       +1     
==========================================
+ Hits         2801     2815      +14     
+ Misses       1332     1317      -15     
- Partials      185      188       +3
Flag Coverage Δ
#integration 53.32% <100%> (+0.62%) ⬆️
#unit 84.82% <ø> (ø) ⬆️
Impacted Files Coverage Δ
src/omnisharp/protocol.ts 85.49% <ø> (ø) ⬆️
src/features/workspaceSymbolProvider.ts 60.71% <100%> (+33.79%) ⬆️
src/features/documentSymbolProvider.ts 95.23% <0%> (-4.77%) ⬇️
src/features/diagnosticsProvider.ts 74.65% <0%> (-3.43%) ⬇️
src/omnisharp/utils.ts 73.68% <0%> (+1.75%) ⬆️
src/features/completionItemProvider.ts 87.87% <0%> (+9.09%) ⬆️
src/features/documentation.ts 47.61% <0%> (+9.52%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update de76266...5594cf9. Read the comment docs.

@@ -23,10 +23,15 @@ export default class OmnisharpWorkspaceSymbolProvider extends AbstractSupport im
let options = this.optionProvider.GetLatestOptions();
let minFilterLength = options.minFindSymbolsFilterLength > 0 ? options.minFindSymbolsFilterLength : undefined;
Copy link
Contributor

@dmgonch dmgonch Oct 30, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sounds like you could remove the setting as well. #Closed

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the setting makes sense, it's just we evaluate it on the client rather than server

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you are right - sorry for the confusion.

@@ -23,10 +23,15 @@ export default class OmnisharpWorkspaceSymbolProvider extends AbstractSupport im
let options = this.optionProvider.GetLatestOptions();
let minFilterLength = options.minFindSymbolsFilterLength > 0 ? options.minFindSymbolsFilterLength : undefined;
let maxItemsToReturn = options.maxFindSymbolsItems > 0 ? options.maxFindSymbolsItems : undefined;
return serverUtils.findSymbols(this._server, { Filter: search, MinFilterLength: minFilterLength, MaxItemsToReturn: maxItemsToReturn, FileName: '' }, token).then(res => {
Copy link
Contributor

@dmgonch dmgonch Oct 30, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But FindSymbolsRequest.MinFilterLength can be removed, along with removing it on the server side, right?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes, I removed it from the protocol.ts, thanks for the pointer 👍

Copy link
Contributor

@dmgonch dmgonch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:shipit:

@akshita31 akshita31 merged commit 425c7f9 into dotnet:master Nov 1, 2018
@dmgonch
Copy link
Contributor

dmgonch commented Nov 2, 2018

@filipw : let me know if you working on removing MinFilterLength from OmniSharp/omnisharp-roslyn as well - I will pick up the cleanup otherwise. thanks.

@filipw
Copy link
Contributor Author

filipw commented Nov 2, 2018

we will not remove it yet to not cause a breaking change on the API, since it already shipped. I will remove it in the future, but not yet

@filipw filipw deleted the feature/workspace-symbols-change branch November 3, 2018 15:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants