-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
specific files.exclude pattern not working: path[^\\/]* #11132
Comments
I have also observed this. The following doesn't seem to prevent the parser from iterating through all of these directories since v1.16.*:
It will still go through the entirety of this directory. |
Hi @jacksonc-xlnx . We recently addressed a number of issues with (and perf of) exclusion support by moving to essentially the same algorithm used by VS Code to interpret and process them. In the simple example, (
And issuing
If you're seeing something different, could you provide a stand-alone example, such as in the form of a zip file or a GitHub repo, that we might investigate further? Also, I don't believe the following are valid for VS Code exclusions (at least on Windows?). When I try to use these, files are not excluded within the explorer view:
Although the remaining two appear to work as expected in the explorer view:
If you reload the window to cause search exclusion to be applied (which seems to require a reload for some reason), you'll see that the same logic is being applied to search includes as is being applied by the C/C++ Extension. It's by design that we should now match the behavior of VS Code's exclusions (with a slight caveat that we also support full path exclusions, such as for system includes, where VS Code always refers to files and folders under the workspace folder). As such, I'd like to consider this external, and suggest opening a bug against VS Code on the (inconsistent) behavior evident with these patterns in their explorer view and in search. If VS Code were to support these patterns as you expect, the C/C++ Extension should (be fixable to) support them as well. Or, if they are able to provide you an alternative set of patterns that work in VS Code itself, the C/C++ Extension should support them also. |
I don't use them all together, it was meant to be used one by one with a reload one each try... To give a clearer view of what I'm trying to describe, I've created a little test environment. Also available under github: Workspace-file (SourceWorkspace.code-workspace):
File structure:
main.cpp
Expectation / ProblemThe only visible folders in the Files view are Source and SourceM4. That's correct so far. See also the screenshot below. So why is VSCode itself able to find the files and the extension or IntelliSense is not? Additional info: It is not a include-path problem, it is working well if I switch to v1.15.4 |
Hi @bwsnico . Thank you for the repro. I did find a bug with handling of path delimiters. I'm working on a fix, and it should be in the next release. |
Fix available in pre-release https://github.com/microsoft/vscode-cpptools/releases/tag/v1.17.0. |
Hi @bwsnico . Could you confirm whether the fix in 1.17.0 fully addresses your scenario? |
Environment
Bug Summary and Steps to Reproduce
Bug Summary:
Since the update to v1.16.* a special files.exclude-pattern doesn't work anymore. There has been a fix to #8960 and that seems to break the following exclude glob:
"Source[^M\\/]*": true,
It should exclude everything but the folder/files containing
Source/
andSourceM
. It works well for search and Files-Explorer, but IntelliSense is not able to find any files inside theSource/
path.Testet with these pattern, too. Also not working:
"Source/[^*]": true,
is working, but then I see no chance to "allow" SourceM4 as well.Configuration and Logs
No response
Other Extensions
No response
Additional context
No response
The text was updated successfully, but these errors were encountered: