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
 Not reparsing 3rd party includes
 New Topic  Topic Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

yuvalr
Junior Member

14 Posts

Posted - Apr 28 2005 :  07:49:01 AM  Show Profile
Hi.
I thought that directories in the "stable include files" list will only be parsed once. However, VAX insists on reparsing them every time I open any of my projects (that use files from these directories), causing some unneeded CPU usage and annoying me in general. :-)

Can I make VAX parse files in some directories (3rd party packages, including Visual Studio's C/C++ standard library) only once?

Thanks,
Yuval

(VS.NET 2003, VAX 1301)

WannabeeDeveloper
Tomato Guru

Germany
775 Posts

Posted - Apr 28 2005 :  08:33:13 AM  Show Profile
VAX does indeed parse all include-directories from time to time; definitely not planned at every load of a project. VAX does however parse all header/cpp files belonging to the project.

Is it really happening at every loadup of a project? Usually, VAX reparses all include-folder every week (or so).

Go to Top of Page

yuvalr
Junior Member

14 Posts

Posted - Apr 28 2005 :  11:10:40 AM  Show Profile
Ok, maybe I was a little confused, and it's only once in a while...

But this is also not that good. "stable includes" means to me that they are stable until I say otherwise. In other words, don't reparse them until I specifically give a reparse order.

And another thing (the reason why I got confused before): The "stable includes" is sometimes impossible to use because it doesn't assume that all recursive children of a stable directory are also stable directories. For large 3rd party package with hundreds of direcotries (Boost 1.32 has 213 directories, for example. ACE+TAO also has a 3 digit number of directories) it's practically useless.
Go to Top of Page

WannabeeDeveloper
Tomato Guru

Germany
775 Posts

Posted - Apr 28 2005 :  11:38:16 AM  Show Profile
Hmmm, so you mean that you'd just enter the the "topmost" folder and every folder sitting in there is a "stable include", too?

VAX is getting this info from out of the IDE, and I'm not sure if the IDE looks at the include-folders that way (I believe you have to insert every single folder for the IDE to use it, or am I wrong?)...


Go to Top of Page

yuvalr
Junior Member

14 Posts

Posted - Apr 28 2005 :  12:26:56 PM  Show Profile
quote:

Hmmm, so you mean that you'd just enter the the "topmost" folder and every folder sitting in there is a "stable include", too?



Exactly. A stable directory is something that is assumed to not change. Not change at all. Including everything in it. Including files and sub-directories. Everything.

quote:

VAX is getting this info from out of the IDE



I have to admit that I didn't understand this sentence.

quote:

I'm not sure if the IDE looks at the include-folders that way (I believe you have to insert every single folder for the IDE to use it, or am I wrong?)



You are not wrong, but it's irrelevant. These are two completely different things. The compiler include directories list is for "accessing" the files, while this is for "assuming stability". If I'm using directory "dir1" and adding it to the compiler's include list, I can use anything under it (for example dir1/dir2/file.h) by

#include <dir2/file.h>

so everything under dir1 is still accessible using the right code.

But anyway, stable includes are not about accessibility, as I explained before, so comparision to the C compiler is futile.
Go to Top of Page

Stephen
Tomato Guru

United Kingdom
781 Posts

Posted - Apr 28 2005 :  12:38:07 PM  Show Profile
I agree that VAX parses stable includes too often. Even if it occurs only once a week, on my laptop it's still two or three minutes of down time when it does occur. And it's down time when I want to start work.

Also, does it parse them again when you load another solution? I have the impression that it does, but this may be just because it annoys me so much when it does occur.

Stephen Turner
ClickTracks http://www.clicktracks.com/
Winner: ClickZ's Best Web Analytics Tool 2003 & 2004
Go to Top of Page

yuvalr
Junior Member

14 Posts

Posted - Apr 28 2005 :  12:47:08 PM  Show Profile
quote:

does it parse them again when you load another solution?


I'm not sure. I added only the topmost directory to the stable include list, which didn't help much. After that I saw that it's not recursive, I gave up because I had no urge to type in 500 directory names. The bottom line is that I don't use the stable includes feature and I don't know how it works.
Go to Top of Page

WannabeeDeveloper
Tomato Guru

Germany
775 Posts

Posted - Apr 28 2005 :  2:20:57 PM  Show Profile
quote:
Originally posted by yuvalr

The compiler include directories list is for "accessing" the files, while this is for "assuming stability".
...
But anyway, stable includes are not about accessibility, as I explained before, so comparision to the C compiler is futile.


Uhm, I'm not sure you did understand the Option "C/C++ Directories" on the VAX Options.

Those are the compiler include directories, so comparision to the C compiler is not futile as they are both the same!

Read here to get what this option really is about:
http://www.wholetomato.com/products/features/directories.html?more=yes

It tells VAX which files belong to the global include (obtained from the IDE, rarely parsed) or to the current project (obtained from the project-settings, parsed on modification or at every project loadup).

-Quote:
Proper setup of the C/C++ Directories node is essential for proper operation of Visual Assist X. Incorrect setup causes Visual Assist X to find outdated or wrong versions of headers, no headers at all, or not recognize modifications fast enough.

Stable include files rarely change. They are parsed infrequenly and definitions are stored in a read-only, static database for fast lookup and global access. Use the Rebuild button on the Performance node of the Visual Assist X options dialog to make Visual Assist X recognize modifications to these headers.

Headers in Other include files are parsed each time you open a project, or open a source file that references the headers. Visual Assist X see changes to definitions in these headers immediately.
-Quote end.

I am, however, on your side when it comes to "parsing those global includes too often".

Go to Top of Page

yuvalr
Junior Member

14 Posts

Posted - May 01 2005 :  06:36:03 AM  Show Profile
Ok, I think that there was some big misunderstanding, and most of it (if not all of it) was my fault. So I'll try to describe my problem again, from the beginning.

I use all kinds of 3rd party packages. Lets take Boost for example. I installed Boost on my machine, and set an environment variable names BOOST_ROOT to point to the topmost directory of Boost. Each project that uses Boost, gets "$(BOOST_ROOT)" in its "Include Directories" property, so everything will compile. VisualAssist reads this "Include Directories" project property, and knows where to find these files.

So far so good.

What I need is two things:
1. Make VAX know that $(BOOST_ROOT) is also a place to search implementation code in. Is this done in the "Source files" section of VisualAssist options?
2. Make VAX know that all files in $(BOOST_ROOT) (recursively) are stable, and parsing them is something to be done seldom (or even better - only when the user request it). Originally I thought it should be done in the "Stable include files" section, but it now seems I was wrong about that. So how can it be done?

Thanks for your patience,
Yuval
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
18939 Posts

Posted - May 02 2005 :  07:13:09 AM  Show Profile
point 1. i am not quite sure what is going on here. i do a lot of work using the Qt library. this is a 3rd party C++ library that comes in source code form, so its similar to boost. the directory structure is a lot more basic, which probably helps, but as far as i can tell i have not told VA about the implementation code for Qt, but it still finds it.

i have told VA about the stable header files for Qt, via the IDE's C++ directories option (see below).

can you explain the problem you are seeing, where by VA cannot find the implementation code? i would have thought that for most intellisense needs the header files alone should be fine.


point 2. this is explained at the link WannabeeDeveloper posted if you know what you are looking for

in the 2003 IDE go to tools menu -> options -> projects -> VC++ Directories
then select "show directories for" = "include files" and add the include directories to this list.

VA will then pick up this new directory, or new directories and add them to its list of stable include directories.


as for VA reparsing the stable include files to often, i have put in a request to do this less often

case=594

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

yuvalr
Junior Member

14 Posts

Posted - May 02 2005 :  07:58:19 AM  Show Profile
quote:

i have told VA about the stable header files for Qt, via the IDE's C++ directories option (see below).

can you explain the problem you are seeing, where by VA cannot find the implementation code? i would have thought that for most intellisense needs the header files alone should be fine.


Maybe Boost is not a good example because $(BOOST_ROOT) is both the "include directory" and the "place to find implementation code". For other libraries, where these directories might be different, I can see no way for VAX to know where to find the implementation, if it's not specified (without being psychic ).

quote:

in the 2003 IDE go to tools menu -> options -> projects -> VC++ Directories
then select "show directories for" = "include files" and add the include directories to this list.


That might work, but it has side effects. Adding a directory to the global IDE setting means that it will apply to all projects, and that not what I want. I want this directory to apply to only the projects I choose. In other words, I need this directory to appear in the project settings, and not in the global settings. I work in a group, and I can't (and won't) write code that relies on other group member's IDE settings. Everything that is needed to compile the project has to be in the CVS, not local IDE settings.
Adding it to both, is also not a solution, for example due to the risk that I'll forget to add it to the project setting (because everything compiled for me).
I think there is no workaround to the fact that the project settings has some stable 3rd party include directories, and VAX needs to know they are such.

Yuval
Go to Top of Page

yuvalr
Junior Member

14 Posts

Posted - May 02 2005 :  12:13:01 PM  Show Profile
quote:

VA will then pick up this new directory, or new directories and add them to its list of stable include directories.


And I forgot to mention that this is not entirely true, because VAX will use only the exact directories from the IDE and add them to the stable include list. It won't assume all recursive children to be stable also.
Go to Top of Page

WannabeeDeveloper
Tomato Guru

Germany
775 Posts

Posted - May 02 2005 :  2:04:26 PM  Show Profile
quote:
Originally posted by yuvalr

And I forgot to mention that this is not entirely true, because VAX will use only the exact directories from the IDE and add them to the stable include list. It won't assume all recursive children to be stable also.



That's because the IDE doesn't do that, too...

As was said before, VAX only fetches these information from the IDE...

In order to get the "additional project include folders", you just have to include them in the project-settings in the IDE.
VAX will then add them to the "Other include files".

And the problem here is what you already complain about in your first posting: VAX parses those "additional include directories" at every project-load.

Now we're at the point where the devs itself should put some light into this issue. I'll point them towards this thread.
I'm not sure if you can tell VAX to "not parse 'Other include files' at every project-loadup".

Go to Top of Page

feline
Whole Tomato Software

United Kingdom
18939 Posts

Posted - May 02 2005 :  2:42:34 PM  Show Profile
quote:
Originally posted by yuvalr

I think there is no workaround to the fact that the project settings has some stable 3rd party include directories, and VAX needs to know they are such.


i have done something similar myself, and it worked fine.

first let me see if i understand what is going on. if you are using BOOST then you must be telling the IDE to use BOOST for this project. off hand i can only think of two ways to do this:

a) add the BOOST headers to the projects additional include directories entry and then link to the BOOST lib file in the projects linker section

b) add the entire BOOST tree as a project, and make this BOOST project a dependency for the main project.

i have done both with Qt at different times. before i discovered the include directory settings option in the IDE i used to set:

VA Options -> Projects -> C/C++ Directories -> Platform = Custom

having done that i added the include directory for Qt to the list. VA then treated these headers as static includes. this worked fine for both methods a and b.

if i understand your situation correctly you can do the same with the BOOST headers. which brings me to the question how many BOOST header directories are there? i have heard about BOOST but i have never used it.

you can paste a list of directory names into this dialog, once it is in custom mode. however this does wipe out the existing directories, so i would advice copying them and adding them to your directory list, then copying the combined list back in again.


none of this helps me to follow why you have a problem with VA finding the implementation code for BOOST. can you explain what it is you are trying to do that is failing?


as for VA adding all directories recursively i can put in a case for this. i probably need to download BOOST and have a look at the tree to try and follow what is going on here first though.

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

feline
Whole Tomato Software

United Kingdom
18939 Posts

Posted - May 02 2005 :  3:34:35 PM  Show Profile
i have just extracted the BOOST 1.32.0 library onto my machine. i am now entering denial mode please tell me you are not wanting every single hpp file to be a static include! they are scattered all over the place!

if i can find a couple of space hours i may be able to knock out a simple program to produce a list of all directories holding hpp files. easy in pure C but an interesting learning experience in C# as a winform program. you could then copy / paste the directory list into VA for your custom includes.

i still don't follow your need to get VA to know about the source code though. a quick look at some of the directories is only showing me hpp files. are there any cpp files in here at all?

is everything in BOOST a header file template?

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

feline
Whole Tomato Software

United Kingdom
18939 Posts

Posted - May 02 2005 :  4:24:31 PM  Show Profile
yuvalr i have an outline C# program up and working. it is embarrassingly crude, but it does list all directories containing hpp files. it is a good proof of principle, and also shows i need to learn quite a bit about winforms *rolls eyes*. if you are interested email me via the forum and i will email you the code.

this is not ideal but it is an immediate option. once i understand what is going on with you and BOOST i will start entering sensible cases.

zen is the art of being at one with the two'ness

Edited by - feline on May 02 2005 4:36:18 PM
Go to Top of Page

yuvalr
Junior Member

14 Posts

Posted - May 03 2005 :  03:59:16 AM  Show Profile
First of all, thank you very much for spending the time to try to understand me...

quote:

That's because the IDE doesn't do that, too...


The difference is that the IDE (actually, it's the C/C++ compiler, and not the IDE, to be precise. the IDE just passes these directories as-is to the compiler) uses these directories to find include directories according to the C/C++ compiler rules. VAX, on the other hand, uses these directories for two different purposes:
1. Finding include files just like the compiler does.
2. Assuming stability of files.
This is the core of the problem.
Those two purposes sometimes collide. And when I say "sometimes" I mean the scenarios I described along this thread. 3rd party libraries are both "include directories" and "stable directories" but each roll has its own rules: "include directories" is used using the C compiler rules, and "stable directories" are used using other rules (namely, recursiveness).
Go to Top of Page

yuvalr
Junior Member

14 Posts

Posted - May 03 2005 :  06:20:28 AM  Show Profile
quote:

first let me see if i understand what is going on. if you are using BOOST then you must be telling the IDE to use BOOST for this project. off hand i can only think of two ways to do this:

a) add the BOOST headers to the projects additional include directories entry and then link to the BOOST lib file in the projects linker section

b) add the entire BOOST tree as a project, and make this BOOST project a dependency for the main project.


I'm using method A.

quote:

VA Options -> Projects -> C/C++ Directories -> Platform = Custom


And then what? "Stable include files", "Other include files" or "Source files"?

quote:

i have just extracted the BOOST 1.32.0 library onto my machine. i am now entering denial mode please tell me you are not wanting every single hpp file to be a static include! they are scattered all over the place!


This is exacly what I want! (I assume that "static" means "stable", correct me if I misunderstood). This is why the "stable directories" need to be treated recursively.

quote:

i still don't follow your need to get VA to know about the source code though. a quick look at some of the directories is only showing me hpp files. are there any cpp files in here at all?

is everything in BOOST a header file template?



Most of Boost is template code, which means that all code is inlined in header files, and there's no cpp files. But not all of Boost. After unzipping Boost, you'll see several subdirectories. Directory "boost" is where all include files are. Directory "libs" is where all implementation cpp files are.

quote:

which brings me to the question how many BOOST header directories are there?


There are 213 directories with header files, and 359 directories with implementation code. Quite a few...

quote:

none of this helps me to follow why you have a problem with VA finding the implementation code for BOOST. can you explain what it is you are trying to do that is failing?


Let's try this:
Start a cpp file with

#include <boost/date_time/gregorian/greg_month.hpp>

Go to this hpp file, and try to find implementation for
as_short_string()
, for example. The implementation is in $(BOOST_ROOT)\\libs\\date_time\\src\\gregorian\\greg_month.cpp, but VAX can't find it, with my current VAX settings. What setting should I change?

quote:

i have an outline C# program up and working


I do hope this will not end up to be the solution...

Thanks for making such an effot,
Yuval
Go to Top of Page

support
Whole Tomato Software

5566 Posts

Posted - May 03 2005 :  12:19:46 PM  Show Profile
After looking at the logic in VA, if you "c:\\boost" listed in your "stable" include directories, any file under that directory is considered "stable". If you close the ide and open it again, does it reparse your boost directories?
Go to Top of Page

yuvalr
Junior Member

14 Posts

Posted - May 03 2005 :  1:36:00 PM  Show Profile
quote:

if you "c:\\boost" listed in your "stable" include directories, any file under that directory is considered "stable". If you close the ide and open it again, does it reparse your boost directories?


My first instinct was to answer "Yes, absolutely", but then I had an idea. I changed my stable include list from "$(BOOST_ROOT)" to "C:\\Boost", and then it worked. I naively assumed that VAX supports environment variables in $(ENV_VAR) format, just like Visual Studio does, so that's how I did it. But it turns that I was wrong...

So it seems that 3 questions remain:
1. Can you add support for environment variables?
2. Why does the tool-tip for the ListBox states that "Subdirectories must be listed individually"?
3. Why does the link I was refered to in this thread (http://www.wholetomato.com/products/features/directories.html?more=yes) states that

Users who specify custom directories typically:

- Develop software for multiple platforms,
- Use a Microsoft IDE for editing non-Microsoft projects,
- Configure IDE settings improperly.

when it's clear that I'm not any of those cases, and I still need to specify custom directories?

The combination of these 3 issues made me quite confused...
Thanks again.
Go to Top of Page

support
Whole Tomato Software

5566 Posts

Posted - May 04 2005 :  11:06:31 PM  Show Profile
We goofed.

Environment variables should be resolved. They did at one point. We fixed our code. We are making sure it is part of the general release, or from the fact you are using 1301, at least part of the next build.

Our tooltip should not say you need to list subdirectories. You need only list directories a compiler would need to resolve your #include statements, which in your case is C:\\BOOST. We will fix the tooltip.

case=598

We fixed our documentation. It was not correct.

http://www.wholetomato.com/products/features/directories.html?more=yes&goto=custom

Thank you for all of your detective work, support and patience.
Go to Top of Page

yuvalr
Junior Member

14 Posts

Posted - May 05 2005 :  05:20:57 AM  Show Profile
My pleasure...
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Topic Locked
 Printer Friendly
Jump To:
© 2023 Whole Tomato Software, LLC Go To Top Of Page
Snitz Forums 2000