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
 1727: new include directory should trigger reparse
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

tandr
Senior Member

43 Posts

Posted - Jun 18 2009 :  12:32:43 PM  Show Profile  Reply with Quote
VS2008 SP1 , native C++ dev

downloaded http://sourceforge.net/project/showfiles.php?group_id=262090, put into E:\\svn\\zmine\\urdl-0.1

Since this library depends on boost, I added it to my project that has boost included already.

I took the smallest file from the project and added one sample to the end of the file (colored blue below), just to see it compiles. I also added (on project level) new include directory E:\\svn\\zmine\\urdl-0.1\\include, and added 2 defines URDL_HEADER_ONLY and URDL_DISABLE_SSL

I tried to reparse current file from VAX menu, it did not help -- urdl::read_stream did not get recognized or have any info in VAX db. I have had to clean VAX info and rebuild it, so the info about added code and project-level include directories would be picked up. One would think that reparse command should pick up new include directories at least, but (imho) it should be done automatically. I understand that if project is big, that will take some time, but VAX at least could ask if it needs to be done. Alternatively, in addition of "reparse current file" VAX could provide "Reparse current project" and/or "Reparse solution" so user can trigger it himself.

regards,
t.

the code below is one file -- just has includes in the middle since it is concatenation of 2 files



#include <sstream>

//////////////////////////////////////////////////
void 
my_func (const std::string& s)
{
// stripped out -- not important
}


#include <urdl/read_stream.hpp>
#include <boost/progress.hpp>
#include <iostream>
#include <fstream>

int main_1(int argc, char* argv[])
{
    try
    {
        if (argc != 3)
        {
            std::cerr << "Usage: get2 <url> <outputfile>\\n";
            return 1;
        }

        boost::asio::io_service io_service;

        urdl::read_st|ream stream(io_service);
        stream.open(argv[1]);

        std::ofstream os(argv[2], std::ios_base::out | std::ios_base::binary);
        for (;;)
        {
            char data[1024];
            boost::system::error_code ec;
            std::size_t length = stream.read_some(boost::asio::buffer(data), ec);
            if (ec == boost::asio::error::eof)
                break;
            if (ec)
                throw boost::system::system_error(ec);
            os.write(data, length);
        }
    }
    catch (std::exception& e)
    {
        std::cerr << "Exception: " << e.what() << std::endl;
    }
}






VA_X.dll file version 10.5.1727.0 built 2009.06.12
Licensed to:
VA X: [email protected] (1-user license) Support ends 2010.02.04
DevEnv.exe version 9.0.30729.1
msenv.dll version 9.0.30729.1
Font: Consolas 11(Pixels)
Comctl32.dll version 6.0.2900.5512
Windows XP 5.1 Build 2600 S
2 processors (x86)

Platform: Win32
Stable Includes:
D:\\Program Files\\Microsoft Visual Studio 9.0\\VC\\include;
D:\\Program Files\\Microsoft Visual Studio 9.0\\VC\\atlmfc\\include;
D:\\Program Files\\Microsoft SDKs\\Windows\\v6.1\\include;
D:\\Program Files\\Microsoft SDKs\\Windows\\v6.1\\include;
E:\\svn\\repos\\3rd\\boost\\tags\\Boost_1_39_0;

Other Includes:

Stable Source Directories:
D:\\Program Files\\Microsoft Visual Studio 9.0\\VC\\atlmfc\\src\\mfc;
D:\\Program Files\\Microsoft Visual Studio 9.0\\VC\\atlmfc\\src\\mfcm;
D:\\Program Files\\Microsoft Visual Studio 9.0\\VC\\atlmfc\\src\\atl;
D:\\Program Files\\Microsoft Visual Studio 9.0\\VC\\crt\\src;


feline
Whole Tomato Software

United Kingdom
19022 Posts

Posted - Jun 18 2009 :  1:46:58 PM  Show Profile  Reply with Quote
It partly depends on the option:

VA Options -> Performance -> Parse all files when opening a project

but for me, simply re-loading the solution is enough to make VA parse newly added additional include directories. One problem here is that VA cannot parse these directories until it knows about them. We find out about them by reading the project settings from the hard drive, but the IDE often does not save out these changes at first. Closing and reloading the solution ensures that these changes have been saved out to disk, so that VA actually gets to see them.

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

tandr
Senior Member

43 Posts

Posted - Jun 19 2009 :  03:17:07 AM  Show Profile  Reply with Quote
well, that's explains it. I thought IDE has some hooks to read project configuration and triggers on change, but looks like I was expecting too much. I still think that "reparse project" is a good idea.
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
19022 Posts

Posted - Jun 19 2009 :  1:20:52 PM  Show Profile  Reply with Quote
How often do you need to reparse the current project / solution?

I realise that closing and reloading the solution is slightly more work than simply triggering a single command, but not much. I am wondering how much benefit this command would really offer.

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

tandr
Senior Member

43 Posts

Posted - Jun 19 2009 :  7:00:54 PM  Show Profile  Reply with Quote
I tend to keep VS with my solution and whats not open (and all the windows around it) for long time (week). I exit it at the end of the week to check in stuff at the end of the week. So, if I happen to have new directory or setting or definition for the compiler changed (or boost got updated, and "system" directory changed) now I need to clean up the vax caches, exit VS, and start it again and load the project. My solution is not that big, so it loads quite quickly, but reparsing all the solution when only one project have had include path changed is kinda :(. So no, it is not high priority, but something that I would love to have.

Regards,
t
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
19022 Posts

Posted - Jun 22 2009 :  12:46:44 PM  Show Profile  Reply with Quote
The problem here is that a change to include directories, or a change to boost, may well require that VA reparses your stable include directories, which requires a full symbol database rebuild. Having said that, I have never needed to trigger a complete database rebuild just to have VA pick up a change to the include directories.

Any changes you made to the code inside the solution should be parsed as you made them.

If anyone else is working on the solution with you, so you get new code changes via your source code control system then VA may not know about these changes, which could be anywhere in the solution.

For most situations having:

VA Options -> Performance -> Parse all files when opening a project

turned on and simply closing and reloading the solution should be a good solution, and quite fast.

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