-
Notifications
You must be signed in to change notification settings - Fork 764
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
Respecting vscode
exclude directives.
#1739
Comments
Thanks for the issue. We've been discussing this problem, and agree that we should do something in this direction. You may already be aware of the gopls We've been debating whether to set a default |
@findleyr indeed I miss this setting while thinking about how to solve the problem. might need to refresh my knowledge of |
Depending on the outcome of golang/go#46438, we might be able to automatically set directoryFilters based on vscode settings. |
@firelizzard18 should we consider adding a similar filter for test explorer? |
Yes, I think we should |
Change https://golang.org/cl/351172 mentions this issue: |
The linked issue (https://golang.org/cl/351172) mentions that implementation of this feature has been abandoned due to @firelizzard18 not having the time to refactor the initial PR. Is this something that is being worked on currently by any chance? Is this something that I could help push forward? I mentioned a possible solution that seems quite trivial to implement in a separate issue: #2504 (comment). If this is something that is of interest, I can help with the PR. |
@greenstatic AFAIK no one is working on this. I have no problem with someone taking this over. As you say, skipping specific folders while walking is pretty easy. Your The complications start showing up when you look at how the driver should behave when settings are changed. As a user I would be rather frustrated if I had to reload VSCode any time I wanted to change the set of excluded paths. If we're going to have a better experience than that, simply skipping paths during walk is not sufficient; you also need to update the tree and potentially rescan some paths when the setting is changed. Of course you could throw away the entire test item tree and rescan it, but that would not perform well, especially for large projects. Plus that could throw away other resources associated with tests, such as CPU/memory profiles, which would add to the frustration. Thus the vast majority of the complexity comes down to intelligently updating the test item tree when the exclusion list is updated. In my CL, I compare the old list to the new list to generate a diff. For added paths, I look for test items in those paths and destroy them. For removed paths, I track paths that were excluded and rescan them. |
This is done in #3523 |
Is your feature request related to a problem? Please describe.
I am having directories in my project consisting of different open-source projects, and I would like
gopls
not to even look in that direction (as my laptop don't like too much attention to CPU and become pan really fast).Describe the solution you'd like
vscode-go
has few related settings (files.exclude
,search.exclude
,files.watcherExclude
) maybe vacode-go extension can utilize it?Describe alternatives you've considered
May be we can have additional exclude options? (i.e
go.exclude
)Additional context
I am working on linter, and running tests on live examples quite fast, my laptop fan isn't a fun of it.
The text was updated successfully, but these errors were encountered: