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

x/tools/gopls: ignore excluded or ignored files #37697

Open
stamblerre opened this issue Mar 5, 2020 · 3 comments
Open

x/tools/gopls: ignore excluded or ignored files #37697

stamblerre opened this issue Mar 5, 2020 · 3 comments

Comments

@stamblerre
Copy link
Contributor

@stamblerre stamblerre commented Mar 5, 2020

The workspace load looks at all files in a directory, but it seems it's not correctly excluding ignored files. VS Code also allows the user to ignore files with the "files.exclude" setting, which the language client should probably handle in some way? But that needs to be confirmed.

See microsoft/vscode-go#3036 for more context.

@apmckinlay

This comment has been minimized.

Copy link

@apmckinlay apmckinlay commented Mar 5, 2020

Would it make sense to ignore files and folders starting with '.' e.g. .git, .vscode, .history

Another possibility would be to respect .gitignore

@jniedrauer

This comment has been minimized.

Copy link

@jniedrauer jniedrauer commented Mar 6, 2020

This is a problem for more than just gopls. x/mod has a hardcoded module size limit, and there is no way to ignore files or directories at the same level as the go.mod file. Either .gitignore should be respected or go.mod needs an exclusion section.

@stamblerre

This comment has been minimized.

Copy link
Contributor Author

@stamblerre stamblerre commented Mar 9, 2020

I know that #37724 is tracking discussion of how files should be ignored by the go command, but we will definitely need a temporary work-around for gopls, since it will be a while before anything lands in the go command.

@heschik: Do you think that we can ignore files starting with . for type-checking/diagnostics as a work-around like @apmckinlay suggested?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
4 participants
You can’t perform that action at this time.