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

Improve the "scan-all" behavior of all project systems #896

Closed
filipw opened this issue Jun 26, 2017 · 3 comments · Fixed by #1161
Closed

Improve the "scan-all" behavior of all project systems #896

filipw opened this issue Jun 26, 2017 · 3 comments · Fixed by #1161

Comments

@filipw
Copy link
Member

filipw commented Jun 26, 2017

As reported on chat today - the SearchOption.AllDirectories is a bit too much and can cause OmniSharp to load a long time.

@filipw
Copy link
Member Author

filipw commented Jun 26, 2017

Actually, this is not just scripting - MSBuild project system does the same thing if it doesn't have SLN

return Directory.GetFiles(_environment.TargetDirectory, "*.csproj", SearchOption.AllDirectories);

project.json project system tries to work around it by having a depth limit of 5

return Search(directory, maxDepth: 5);

At the very least, in all cases, we could exclude the common nasty folder names like node_modules, bower_components or .-prefixed folders etc.

@filipw filipw added csx and removed csx labels Jun 26, 2017
@DustinCampbell
Copy link
Contributor

DustinCampbell commented Jun 26, 2017

I think there are a couple of things to do here.

  1. Allow the user to be able to specify folders in an omnisharp.json to exclude from the project search.
  2. Don't wait until projects are synchronously loaded before OmniSharp is finished loading. The project search should continue after OmniSharp has finished its initial configuration.

FWIW, I actually dislike the depth limit because it's hard to tell why a project didn't load if it happens to be lower in the directory tree.

@bjorkstromm
Copy link
Member

As reported here, Cake Project System also suffers from this.

Time to think of some default exclude patterns and create a helper for enumerating files? Maybe we can start from default .gitignore` that Github uses. Additionally, make the exclude patterns configurable via OmniSharp configuration system.

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.

3 participants