Whole Tomato Software Forums
Whole Tomato Software Forums
Main Site | Profile | Register | Active Topics | Members | Search | FAQ
User name:
Password:
Save Password
Forgot your password?

 All Forums
 Visual Assist
 Technical Support
 Selectively Excluding Files From Being Parsed
 New Topic  Reply to Topic
 Printer Friendly
Previous Page
Author Previous Topic Topic Next Topic
Page: of 2

feline
Whole Tomato Software

United Kingdom
19014 Posts

Posted - Jul 07 2023 :  12:17:44 PM  Show Profile  Reply with Quote
It should not be. Testing using VS2022 and VA 2491.0, I have the following test case. I am telling VS2022 to open the folder:

C:\src_2022\test_shallow_exclude

this folder contains no SLN or project files. It does contain the file:

C:\src_2022\test_shallow_exclude\.vscode\settings.json

which has the content:

{
  "files.exclude": {
    "unreal": true
  }
}

the folder:

C:\src_2022\test_shallow_exclude\unreal
is being filtered out from VA. With the setting:

VA Options -> Performance -> Do not parse files excluded by .vscode\settings.json (requires restart)

turned On VA's Open File in Solution dialog is reporting 36 files in this makefile solution. With this setting turned Off, VA is reporting 44 files in this solution.

I can even send you the test case as an email if it helps, it is rather simple and isn't doing anything clever, but it shows this feature is working quite happily for me, so I don't know why it isn't working for you. Have you tried the simplified, only one exclude rule version of the file?

zen is the art of being at one with the two'ness
Go to Top of Page

me76
New Member

Canada
9 Posts

Posted - Jul 08 2023 :  9:31:48 PM  Show Profile  Reply with Quote
It appears that it works for simple my_dir, but doesn't work for boost.

I created cmake project with empty main() function in root directory and empty foo() function in my_dir/foo.cpp. I played with file exclusion, and it worked as expected (foo.cpp was shown or hidden according to exclusion setting in settings.json). Then I added boost library as a subdirectory, and VA parsed it regardless of exclusion setting (I didn't use boost in my code at all).

I also tried .sln solution instead of cmake, I didn't create settings.json file at all, and VA didn't parse boost, I guess because boost was not used in my project.

Can you please test with cmake project with boost subdirectory? My CMakeLists.txt:

project(test)

add_executable(${PROJECT_NAME}
	main.cpp
)

Edited by - me76 on Jul 09 2023 07:38:03 AM
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
19014 Posts

Posted - Jul 10 2023 :  08:24:52 AM  Show Profile  Reply with Quote
There is a bug in VA's exclusion handling in that it doesn't support excluding single files. It was designed to exclude directories, which it does handle correctly. So excluding just the "main.cpp" file won't work:

case=149167

But there should be no problems excluding the boost directory. But if you are not using boost, then why add it? Or did you only add it to text excluding a directory?

zen is the art of being at one with the two'ness
Go to Top of Page

me76
New Member

Canada
9 Posts

Posted - Jul 10 2023 :  09:03:21 AM  Show Profile  Reply with Quote
I am trying to exclude boost directory, not main.cpp.

We have many projects in single repository, and some of them use boost, so boost has been added as git submodule to main repo. The projects I am working on don't use boost, so I don't need VA to parse it. That is why I added boost to the test project without using it.

P.S. After I wrote this reply, I realized that I could remove the unused modules from my working directory with git submodule deinit. But I'm still curious why VA ignores exclusion settings for boost.

Edited by - me76 on Jul 10 2023 09:09:57 AM
Go to Top of Page

me76
New Member

Canada
9 Posts

Posted - Jul 10 2023 :  09:32:08 AM  Show Profile  Reply with Quote
When I moved boost into tool subdirectory (<project dir>/tools/boost), and excluded tools, it worked, as if there was some special handling for boost name.

Edited by - me76 on Jul 10 2023 10:12:39 AM
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
19014 Posts

Posted - Jul 10 2023 :  10:53:02 AM  Show Profile  Reply with Quote
No sign of the problem here. The settings file:

{
  "files.exclude": {
    "boost": true
  }
}

is excluding the boost directory, and the files it contains, when the boost directory is in the base directory I am opening as a folder just fine for me. So I don't know why it isn't working for you. I can send you my test case for this if it helps, but the fact that you are seeing a different effect suggests there is some other factor at work here.

zen is the art of being at one with the two'ness
Go to Top of Page

me76
New Member

Canada
9 Posts

Posted - Jul 10 2023 :  1:09:00 PM  Show Profile  Reply with Quote
At least I found workaround by removing the submodule. If I figure out the root cause, I'll post here. Thanks for your time.
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
19014 Posts

Posted - Jul 11 2023 :  07:48:45 AM  Show Profile  Reply with Quote
Very strange, I would like to understand why this is failing for you, since based on all of my tests this really should be working correctly. At least you have a workaround that is helping.

zen is the art of being at one with the two'ness
Go to Top of Page

Wolfram
New Member

Germany
2 Posts

Posted - Sep 04 2023 :  05:52:58 AM  Show Profile  Reply with Quote
Hi,

I think the feature is not working properly.
Here is a part from my used settings.json inside of .vscode folder:

{
        ... options set before ...
	"files.exclude": {
		"build": true,
		"database": true,
		"external": true,
		"service/my-service": true,
		"out": true,
		"TestResults": true,
		"tools": true,
		"web": true,
		"**/vcpkg": true,
		"**/buildtrees": true
	},
        ... more stuff comes her ...
}


I want to ignore multiple folders, but when starting Visual Studio you can see in the status bar that these folders are parsed. Since there is a boost installed here inside vcpkg, this takes a long time.


Folder 'external' is excluded, also 'vcpkg' is excluded. But VA is parsing files inside these folders.

I also have set the check mark in the VA options (and restarted of course)


VA_X64.dll file version 10.9.2500.0 built 2023.08.24
DevEnv.exe version 17.7.34024.191 Enterprise
msenv.dll version 17.0.34018.315
Comctl32.dll version 6.10.19041.1110
Windows 10 10.0 22H2 Build 19045.3324
16 processors (x86-64)

Edited by - Wolfram on Sep 04 2023 05:56:45 AM
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
19014 Posts

Posted - Sep 04 2023 :  07:24:13 AM  Show Profile  Reply with Quote
Are you opening a solution or a directory? Currently this setting only works if you are opening a directory, but we are looking to enable this when opening a solution as well.

The line:

"**/vcpkg": true,

should be working correctly, I have just double checked this here. Assuming you are opening a directory, not a solution, would you be able to send me your complete "settings.json" file for me to try testing here? I am wondering if something else in the file could be causing us problems, and thus causing this feature to fail.

Assuming this is possible, please send me the files via email:

[email protected]

including this thread ID or URL in the description, so we can match it up.

zen is the art of being at one with the two'ness
Go to Top of Page

Wolfram
New Member

Germany
2 Posts

Posted - Sep 04 2023 :  08:05:00 AM  Show Profile  Reply with Quote
I sent you an email
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
19014 Posts

Posted - Sep 04 2023 :  09:22:16 AM  Show Profile  Reply with Quote
I have the settings file, and have replied:

case=149977

zen is the art of being at one with the two'ness
Go to Top of Page
Page: of 2 Previous Topic Topic Next Topic  
Previous Page
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
© 2023 Whole Tomato Software, LLC Go To Top Of Page
Snitz Forums 2000