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

Use workspace.findFiles instead of glob #3681

Merged
merged 4 commits into from Mar 19, 2020
Merged

Conversation

@JoeRobich
Copy link
Contributor

JoeRobich commented Mar 18, 2020

isBlazorWebAssemblyProject used glob to search for launchSettings.json files. It was being invoked 3 different times for each project within the workspace by requestWorkspaceInformation.

Based on this advice:

	 * The workspace offers support for [listening](#workspace.createFileSystemWatcher) to fs
	 * events and for [finding](#workspace.findFiles) files. Both perform well and run _outside_
	 * the editor-process so that they should be always used instead of nodejs-equivalents.

Updated isBlazorWebAssemblyProject to use vscode.workspace.findFiles and also use the excluded paths defined in files.exclude

Potential fix for #3673

@JoeRobich JoeRobich requested a review from NTaylorMullen Mar 18, 2020
@codecov

This comment has been minimized.

Copy link

codecov bot commented Mar 18, 2020

Codecov Report

Merging #3681 into master will increase coverage by 0.11%.
The diff coverage is 92.3%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #3681      +/-   ##
==========================================
+ Coverage    89.8%   89.91%   +0.11%     
==========================================
  Files          59       59              
  Lines        1589     1597       +8     
  Branches       89       89              
==========================================
+ Hits         1427     1436       +9     
+ Misses        151      150       -1     
  Partials       11       11
Flag Coverage Δ
#integration 100% <ø> (?)
#unit 89.91% <92.3%> (+0.11%) ⬆️
Impacted Files Coverage Δ
src/omnisharp/options.ts 94.73% <92.3%> (+2.08%) ⬆️

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 02ba0dd...bf46264. Read the comment docs.

return excludePaths;
}

let excludeFilesOption = workspaceConfig.get<{ [i: string]: boolean }>('files.exclude');

This comment has been minimized.

Copy link
@NTaylorMullen

NTaylorMullen Mar 18, 2020

Contributor

Out of curiosity does VSCode pre-fill node_modules in this list?

This comment has been minimized.

Copy link
@JoeRobich

JoeRobich Mar 18, 2020

Author Contributor

unfortunately it wasn't set for the dotnet new razor project I created to test with.

This comment has been minimized.

Copy link
@NTaylorMullen

NTaylorMullen Mar 18, 2020

Contributor

It might make sense for us to auto-include node_modules and whatever Unity's package folder is if it doesn't already exist.

This comment has been minimized.

Copy link
@JoeRobich

JoeRobich Mar 18, 2020

Author Contributor

Maybe this should also include search.exclude.. hmm..

This comment has been minimized.

Copy link
@JoeRobich

JoeRobich Mar 18, 2020

Author Contributor

Good news is that Unity seems to create a .vscode/settings.json which has an extensive files.exclude defined

This comment has been minimized.

Copy link
@JoeRobich

JoeRobich Mar 18, 2020

Author Contributor

Updated to include search.exclude paths which by default include node_modules. Unity's settings.json includes the Library/PackageCache in its files.exclude so I think we are covered from these scenarios.

@JoeRobich JoeRobich merged commit 7c95486 into OmniSharp:master Mar 19, 2020
5 checks passed
5 checks passed
codecov/patch 92.3% of diff hit (target 89.8%)
Details
codecov/project 89.91% (+0.11%) compared to 02ba0dd
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
license/cla All CLA requirements met.
Details
security/snyk (david-driscoll) No manifest changes detected
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants
You can’t perform that action at this time.