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

Add projectFilesIncludePattern & projectFilesExcludePattern options. #5382

Merged
merged 2 commits into from
Sep 23, 2022

Conversation

x-projs
Copy link
Contributor

@x-projs x-projs commented Sep 23, 2022

Add two options instead of hardcoded string, so that user have chance to change it.

@dnfadmin
Copy link

dnfadmin commented Sep 23, 2022

CLA assistant check
All CLA requirements met.

@JoeRobich
Copy link
Member

So I have a few thoughts about this,

  1. The include pattern is not something that should be adjusted. We have to specify what activates our extension at publish time and changes to this setting would not have an effect.
    https://github.com/OmniSharp/omnisharp-vscode/blob/55bc0546da2a3b233133d1dca3eee2e1e964f59f/package.json#L603
    Also, we can't introduce "new" project or solution types to load as we specifically look for the extensions being searched for a nothing else (see resourcesAndFolderMapToLaunchTargets method in launcher.ts).
  2. The excludes pattern may not be necessary either. It may be more correct for us to union our exclude patterns with those configured in files.exclude. Would this achieve the result you are looking for?

@x-projs
Copy link
Contributor Author

x-projs commented Sep 23, 2022

The use case: our project contains a lot of *.csproj files (no .sln file, we use dirs.proj to manage). We also have a git submodule which comes from a third-party repository contains a lot of *.sln files. Now, when we launch vscode, it will automatically load the projects from the third-party repository. We want to exclude the third-party folder totally. Is there anyway to do?

@JoeRobich
Copy link
Member

@xieyubo Ah, in that case you would still want to see the files from the submodule in VS Code, but simply not have them be considered as a project location. If you remove the include pattern setting, I think we could take this PR.

@x-projs
Copy link
Contributor Author

x-projs commented Sep 23, 2022

Updated.

Copy link
Member

@JoeRobich JoeRobich left a comment

Choose a reason for hiding this comment

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

Looks good. Thanks @xieyubo!

@JoeRobich JoeRobich merged commit 9336244 into dotnet:master Sep 23, 2022
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.

None yet

4 participants