Author |
Topic |
|
andre.horst
Tomato Guru
Germany
150 Posts |
Posted - Nov 25 2008 : 07:41:18 AM
|
Sorry, but this beta version of VAX is pure crap. Suggestionbox makes stupid suggestions with list entries that doesn't belong to a class/object, sometimes no suggestions are available. Goto menu shows double entries of cpp or header, depends on in which file you are. Paste with "Format after paste" does not recognize macros without a ";" at the end of the line. I got "Extract method" on inlined methods or declarations. Switching between header/cpp goes to somewhere instead of the right file (if cpp does not exist f.e.).
And of course several more stuff...hope you'll fix all the bugs in the final release, gl!
This beta is useless. |
|
feline
Whole Tomato Software
United Kingdom
19021 Posts |
Posted - Nov 25 2008 : 08:57:40 AM
|
Can you provide some details on some of these problems? How many of these are new problems in 1707, and how many of these are existing problems?
Suggestions are simply VA's best guess. Which language are you programming in? Which IDE are you using?
Alt-g, so far I have not encountered any problems with alt-g in my testing of VA 1707. Are you seeing this all the time, or only some of the time?
Format after paste - VA calls the IDE's format code feature, so this should not have changed. The problem here is that the IDE's code formatting is "limited", to put it politely. If it does what you want then good, if it does not then you are out of luck.
I do not understand the comment about Extract Method. This should be offered when you select code and ask for a refactoring command.
Alt-o when there is no "matching" file, I have just tested this on my test solution. I have the two files "test_standalone_cpp.cpp" and "test_standalone_header.h" which as the names suggest do not have any matching files. Alt-o does nothing when I sit in these two files and press it.
If there are other files in the solution with the same name the alt-o might list them, this is by design, and is not new in 1707. |
zen is the art of being at one with the two'ness |
|
|
andre.horst
Tomato Guru
Germany
150 Posts |
Posted - Nov 25 2008 : 09:22:45 AM
|
Actual VC++ 6, WinXP SP2 New is * Suggestionbox errors * Goto errors * Extract method bugs (hoped you added the move impl to header refactoring) * h/cpp switching (happens sometimes, filenames are unique) * dot to -> does not work * No suggestions for smartpointers using "." instead of "->" to access methods of the smartpointer (also red underlined) * Find References does not find methods which are used via a smartpointer (maybe doesnt work for renaming too) * Rename didnt find a member variable in the constructor initialization list * Of course more to come...
Old is * Format after paste with macros * |
|
|
feline
Whole Tomato Software
United Kingdom
19021 Posts |
Posted - Nov 25 2008 : 1:22:52 PM
|
First the good news, a new build with some more bug fixes is currently working through internal testing. This should help with both suggestion lists and smart pointers.
I am going to need more information about the rest of these before I can intelligently comment.
Suggestion list errors - can I come back to this later on, I suspect it may be caused by other problems. Anything that confuses our parser can cause suggestions to become bad. Or it may be fixed in the next build.
goto errors - can you please post a code example? All of my goto tests are passing.
Extract method bugs - can you please post a code example?
h/cpp switching, can you please post the full paths for the files you are using when you see this problem? I can then setup the same file paths here and see what happens.
dot to ->, does this fail for all code or only some code? I suspect this is connected with the smart pointer problem. Some smart pointers do work, I tested this myself before VA 1707 was posted. Are you using one of your own smart pointer classes or are you using a standard library class that I can test?
If VA is confused by smart pointers then Find References on them is not going to work.
The rename problem, I have just added the following C++ code to a header file:
class testRenameClassMembers
{
int nRenameOne, nRenameTwo;
testRenameClassMembers() : nRenameOne(0), nRenameTwo(0)
{
}
};
using VS2005 and VA 1707. When I use VA to rename "nRenameOne" on the line where it is declared, it is correctly updated on the class constructor.
Can you try the same test on your system and see what happens?
Format after paste, can you try the following test please. Change the formatting of the code around the macro so it is wrong, then select the code and trigger the IDE's format code feature. In VC6 the default keyboard shortcut is Alt + F8. If you get the same "bad" formatting that you see after paste then this is an IDE problem, and not a problem with VA.
The only solution would be to use another tool to format your code correctly. We have discussed having VA format code its self, but this is a big undertaking, given all of the different styles people use. |
zen is the art of being at one with the two'ness |
|
|
SvenC
Tomato Guru
Germany
339 Posts |
Posted - Nov 25 2008 : 2:19:28 PM
|
quote: Originally posted by andre.horst
Sorry ...
At least you say sorry for your rude post.
quote: ... this beta version of VAX is pure crap ... (some unhelpful "bug comments") ...
We have got a *beta* version to check out new features early and to help finding bugs. If you have no interest and/or no time for a beta just stay with the released version
If you have interest and time for a beta: more precise descriptions of how to reproduce what you find to be a bug would be of much more help than bashing around.
quote: And of course several more stuff...hope you'll fix all the bugs in the final release, gl! This beta is useless.
"Of course" several more bugs. What do you want to say with that? You found more and had no time to describe them? Or are you just "extrapolating"?
I hope you receive better bug reports for the software you write than you presented here. |
|
|
andre.horst
Tomato Guru
Germany
150 Posts |
Posted - Nov 26 2008 : 02:18:03 AM
|
Suggestion box errors: I think its a general problem with overloaded "->" operators. in the previous version i got suggestions for ComPtr and sometimes for our own smartpointer. In the new Build i rarly get suggestions for ComPtr and rarly for our one. If i want to use a smartpointer via a inner-class typedef in mfc project, VAX never shows up suggestions - i think the combinations with inner-class typedefs of an other project and MFC macros confuses the parser too much.
Suggestions in a template-based class hierarchy are pretty funny, i got suggestions ina sub-class of other sub-classes of the same base-class. Maybe this comes from the template-based inheritance, but maybe this is a general problem.
Goto: I think this could be the same reason as the suggestion-box, because most of method-access in my project works via smart-pointers and there it doesnt work, the rest seems to be ok.
Extract method: Selecting "any" code that "could" be extracted is quite stupid, f.e. i shouldnt get this command for a selected method or any other type.
h/cpp switch: This happens if the first part of the filename of two files are identical. F.e. foo.h without a cpp file switches too foofoo.cpp (same directory)
dot to "->" Even doesn't work for "this.".
No suggestions for smartpointers: Probably a general problem with overwritten "->" operators, but cannot understand why i can see the smartpointer members itself?
Rename prob: Your example works and actually cant find and reproduce the example in my code. But as far as i can remember it was a member of a inner class, but actually this seems to work. Maybe the parser had not parsed all the required code at this point. I'll having a look at it.
Format after paste: Yes, the IDE makes this stupid re-formating as well, so i think your "paste and reformat" code uses the IDE feature.
More to come: I renamed a variable, stopped it and parser seems to work in background. Directly after canceling the dialog i renamed another variable and i got the result of the previous rename. To reproduce this the parser have to parse something (to be seen in the status-line)
I appologize for the rude comment, but actually i got more anoyed than helped by VAX. The suggestion feature is pretty important and IT HAVE TO WORK. It is anoying to switch back to a file that hides somewhere in the billions of other files, just to find out how the correct name of a method was... I know it is a beta, but the previous release shows some of the listed errors too (from time to time) and had some other anoying bugs (i reported some of them and some of the are still in the beta-hope for the future..).
Btw: A bad bug report is better than none and of course bug reports i get are sometimes much bader than that one i wrote . Just remember, bad running and buggy software makes people to watch around for other software...Our licences expire end of dec, we'll see if we continue licensing...
|
|
|
SvenC
Tomato Guru
Germany
339 Posts |
Posted - Nov 26 2008 : 03:25:05 AM
|
quote: Btw: A bad bug report is better than none and of course bug reports i get are sometimes much bader than that one i wrote .
I just wanted to let you look in the mirror: just like your bug report was not all crap I find this beta not all crap
Template parsing was something which got better for me from version to version. I used 1707 this week in a VC++ 2008 ATL project with templates and smartpointers (CComPtr) and it just works (besides the uuid snippet I reported).
But I also checked an older VC6 project which at first glance also worked. So you seem to have a bit of bad luck that VAX shows those bad behaviors with your code base. But I would not give up on VAX too fast. When I started using VAX 6 years ago they did a pretty good job in fixing bugs |
|
|
feline
Whole Tomato Software
United Kingdom
19021 Posts |
Posted - Nov 26 2008 : 11:14:17 AM
|
I have no idea what you are talking about with Extract Method. VA does not make a value judgement here. If you have selected code then you are offered the option to extract it. If you select and extract a silly piece of code, then you may get a silly result.
I don't see what VA could or should try to do here. It is going to be very hard to define a "sensible" piece of code to extract. Different people have different definitions of "sensible".
Alt-O, I am seeing the same problem:
case=21125
I see this problem in VA 1649 and 1707, in both VC6 and VS2005, so this is not a new problem in the beta version.
Dot to ->, can you please create a new default solution and see if you see the same problem there? What do you see for the code:
class felineTestDotArrowClass { };
static void felineTestDotArrowFunc()
{
std::string *pString;
void *pVoid;
felineTestDotArrowClass *pClass;
pString; // try dot here
pVoid; // try dot here
pClass; // try dot here
}
The dot is converted to -> in VC6 with VA 1707 for all three variables for me.
Smart pointers, I have added the following code to a cpp file using VC6:
class felineTestDotArrowClass
{
public:
int nFelineHeight;
int nFelineWidth;
};
static void felineTestDotArrowFunc()
{
CComPtr<felineTestDotArrowClass> smartPtr;
smartPtr;
}
When I type "->" after "smartPtr" I get the same 4 items listed in both VA 1707 and 1649. I get a totally different, and much longer list of items when I type dot instead.
So there is not a global, all consuming problem with smart pointers. That is good news, but it does mean I may need a lot more details if we are to fix the problem you are seeing. It is possible the next version of VA will help, but this depends on the exact nature of the problem you are seeing.
I don't want to get into a long discussion about the quality of bug reports, but I do understand how frustrating it is when software stops working, but a bug report with no useful details is basically totally useless. I see a LOT of bug reports, so I feel qualified to comment on useful vs not useful. |
zen is the art of being at one with the two'ness |
|
|
andre.horst
Tomato Guru
Germany
150 Posts |
Posted - Nov 27 2008 : 02:57:46 AM
|
Your example with the static function works. Try the following code (there are always see the dot-problem:
class foo
{
public:
void f()
{
this // type dot here
}
}
Your example with CComPtr works as expected. I tried several constructs and it looks like VAX gets confused with multiple inheritance and maybe additional in combination with template inheritance (without it seems to work). Try this
class foo
{
public:
int i ;
double d ;
} ;
class A
{
public:
void Af() ;
} ;
template< class BASE > class AImpl : public BASE
{
public:
void AImplf();
} ;
template< class BASE > class B : public BASE
{
public:
void Bf();
} ;
template< class BASE > class C : public BASE, public foo
{
public:
void Cf();
} ;
template< class P > class MyOp
{
public:
void MyOpf(){}
P* operator->(void) const { return m_p; }
P* m_p ;
} ;
int main(int argc, char* argv[])
{
C< B< AImpl< A > > >* pc ; // try "->" here and you dont get foo-members
MyOp< C< B< AImpl< A > > > > myp ; // also here. Access to members are underlined red
// Now try to access members of MyOP
myp. // MyOpf does not appear
return 0;
}
The problem of member-suggestions of other classes in the hierarchie i cant reproduce with this example, but maybe it comes from the same reason (confused with tremplate-inheritance and multiple inheritance).
The reason why MyOpf does not appear is pretty strange, i just can imagine that you have special handlings for CComPtr...
Hope this helps a bit more |
|
|
sean
Whole Tomato Software
USA
2817 Posts |
Posted - Nov 27 2008 : 12:17:56 PM
|
The . to -> conversion failure for keyword this is a regression. case=21161 It will be fixed in the next build.
A quick test of your MyOp example appears to be addressed by build 1709.
thanks for the reports.
|
|
|
andre.horst
Tomato Guru
Germany
150 Posts |
Posted - Nov 28 2008 : 03:35:25 AM
|
Nice to here, i just checked out the new beta. Some issus seem to be fixed in 1709, but a deeper test shows, that there are still some issus.
Add a public typedef to class C
typedef MyOp< C< BASE > > t_op ;
Now declare the "myp" pointer via the typedef.
C< B< AImpl< A > > >::t_op top ;
And look at the difference between "top" (some members are missing" and "myp" (seem to show all members). I create most of the smartpointers in my project via a inner class typedef and than access them, so i guess the bug has something to to with inner typedefs and the complex templates. Maybe VAX does not find the correct intantiation of the typedef'd template class. I hope this will be fixed in the final release too.
|
|
|
feline
Whole Tomato Software
United Kingdom
19021 Posts |
Posted - Nov 28 2008 : 4:02:02 PM
|
I have not tried to think through what your sample code is doing yet. So I may have done the wrong thing. I added the typedef line:
typedef MyOp< C< BASE > > t_op ;
at global scope, after the class MyOp and before the function. This code does not compile, and returns me errors on this typedef line.
Am I doing the wrong thing? |
zen is the art of being at one with the two'ness |
|
|
andre.horst
Tomato Guru
Germany
150 Posts |
Posted - Dec 01 2008 : 02:50:38 AM
|
You have to change the order of the class definitions or make some forward declarations . Netheretheless it doesnt matter, because today it seems to work as expected (strange...). But i found another example, where i dont get any suggestions. Try the smartpointer with a typedef.
Here is the complete example
class foo
{
public:
int i ;
double d ;
} ;
class A
{
public:
void Af(){;}
} ;
template< class BASE > class AImpl : public BASE
{
public:
void AImplf(){;}
} ;
template< class BASE > class B : public BASE
{
public:
void Bf(){;}
} ;
template< class P > class MyOp
{
public:
void MyOpf(){}
P* operator->(void) const { return m_p; }
P* m_p ;
} ;
template< class BASE > class C : public BASE, public foo
{
public:
typedef MyOp< C< BASE > > t_op ;
void Cf(){}
} ;
int main(int argc, char* argv[])
{
C< B< AImpl< A > > >* pc ;
MyOp< C< B< AImpl< A > > > > myp ;
MyOp< B< AImpl< A > > > mypB ;
C< B< AImpl< A > > >::t_op top ;
typedef C< B< AImpl< A > > > t_c ;
MyOp< t_c > pt ;
pt->Af() ; // here i got no suggestions
top->Af() ; // Seem to work now
myp->Af() ;
printf("Hello World!\\n");
return 0;
}
|
|
|
andre.horst
Tomato Guru
Germany
150 Posts |
Posted - Dec 01 2008 : 05:15:48 AM
|
btw: "BASE" was a template argument... |
|
|
feline
Whole Tomato Software
United Kingdom
19021 Posts |
Posted - Dec 02 2008 : 11:50:34 AM
|
I am seeing this problem, thank you for the clear example. I am seeing the same behaviour in VC6 with both VA 1649 and 1709. Have you always had problems with this, or should this work in an earlier version of VA?
If this used to work do you have any idea which version of VA this used to work in? |
zen is the art of being at one with the two'ness |
|
|
andre.horst
Tomato Guru
Germany
150 Posts |
Posted - Dec 03 2008 : 02:29:41 AM
|
Hum...1649 works better that 1707, 1709 is better than 1707 and 1649 was better than 1709. As far as i remember it works quite good in earlier versions, but VAX doesnt work (for 4-6 months or so) in combination with the typedefs and smartpointers + MFC projects (maybe the macros...).
Sorry, i havent really an idea when it works satisfying. |
|
|
feline
Whole Tomato Software
United Kingdom
19021 Posts |
Posted - Dec 03 2008 : 2:44:16 PM
|
Using this test code I have tried various versions of VA, in VC6, running under winXP. For me VA 1709, 1707 and 1649 are behaving the same.
VA 1635, 1645, 1629 - no listbox for "pt", the problem variable listbox for "top->" only lists 3 items, "Af", "AImplf" and "Bf" This seems worse.
VA 1626, 1619, 1561 - no listbox for "pt", the problem variable listbox for "top->" only lists 4 items, "Cf", "d", "i" and "t_op" Which does not seem brilliant either
VA 1549 - no listbox at all for "->" on either variable.
So if there is a regression here, which is certainly possible, this code is not showing it, or I am testing the wrong versions of VA.
I have put in a bug report for this code / case:
case=21320 |
zen is the art of being at one with the two'ness |
|
|
andre.horst
Tomato Guru
Germany
150 Posts |
Posted - Dec 04 2008 : 02:36:13 AM
|
Hope this bug will be fixed soon. Of course the code i have in "real" is a bit more complex .
Maybe you should try the example in a simple MFC project having some standard MFC macros in it, there i see the most problems with code like i posted. As far as i know, VAX has problems with deep-macros at all and the code i posted. |
|
|
feline
Whole Tomato Software
United Kingdom
19021 Posts |
Posted - Dec 04 2008 : 10:45:12 AM
|
Have you tried telling VA to parse macro's more deeply? This might help. This FAQ entry explains how to turn this on:
http://docs.wholetomato.com?W363 |
zen is the art of being at one with the two'ness |
|
|
andre.horst
Tomato Guru
Germany
150 Posts |
Posted - Dec 04 2008 : 10:51:39 AM
|
Wow! Looks better now! This option should be available in the settings-dialog. |
|
|
feline
Whole Tomato Software
United Kingdom
19021 Posts |
Posted - Dec 04 2008 : 11:07:50 AM
|
We may add it to the options dialog with time. The main concern is that turning it on may cause more problems than it fixes, so not making it to obvious seemed sensible at the time. |
zen is the art of being at one with the two'ness |
|
|
support
Whole Tomato Software
5566 Posts |
Posted - Dec 16 2008 : 7:27:38 PM
|
case=21161 and case=21320 are fixed in build 1711 |
Whole Tomato Software, Inc. |
|
|
andre.horst
Tomato Guru
Germany
150 Posts |
Posted - Dec 17 2008 : 02:48:55 AM
|
Yes, looks better now. But i get no suggestions for the smartpointer members in my project. If i use the smartpointer in a new empty project it works as expected, so there must be something in my project that confuses the parser. If i have an idea what this could be, i'll post it here. |
|
|
andre.horst
Tomato Guru
Germany
150 Posts |
Posted - Apr 08 2009 : 04:35:53 AM
|
I think i figured out the problem with smart pointers and no suggestions. I actually use lates build 1722.
1. Create 3 files: test.cpp, test.h, mytypes.h 2. test.h class CType { public: typedef CType* t_ptr ; void f(){} } ; 3. test.cpp #include "mytypes.h" #include "test.h" void bar( t_Foo p_foo ) { p_foo->f() ; // here you get no suggestion list box p_foo.operator ->() // A "." gives me the suggestions of smart pointer } 4. mytypes.h template< class T > class CMyPtr { public: T* operator->() const { return m_ptr; } T* m_ptr ; } ;
class CType ; typedef CMyPtr< CType > t_Foo ;
I dont see a mistyped type (red underlined), but i think this could be a starting point to analyse the not popping up seggestion box. I often see also red underlined code in my probably more complex project. If i have another idea what may confuse the parser i'll post it here. |
|
|
feline
Whole Tomato Software
United Kingdom
19021 Posts |
Posted - Apr 09 2009 : 10:46:32 AM
|
I don't follow your comments in the "test.cpp" code.
However if you are combining a typedef with a smart pointer template class then this reminds me of something. The thing it reminds me of is shown by this code. Add the following code to a header file:
#include <boost\\shared_ptr.hpp>
#define sptr_type boost::shared_ptr
class CTestTypedef
{
int m_nTypeHeight;
int m_nTypeWidth;
};
typedef sptr_type<CTestTypedef> spTestTypedef;
and the following code to the matching cpp file:
static void testUsingTestTypedef()
{
CTestTypedef testDirect;
testDirect; // dot works
boost::shared_ptr<CTestTypedef> testBoostDirect;
testBoostDirect; // -> works
sptr_type<CTestTypedef> testBoostTypedef;
testBoostTypedef; // -> works with limit macro parsing Off, problems otherwise
spTestTypedef testBoostClassTypedef;
testBoostClassTypedef; // -> always has problems
}
if you are using VS2005 then turning on
VA Options -> Advanced -> Listboxes -> Get content from default Intellisense
helps. This code comes from:
case=20548
Does this seem like it might be related to what you are seeing and doing? |
zen is the art of being at one with the two'ness |
|
|
Rain Dog
Ketchup Master
88 Posts |
Posted - Apr 10 2009 : 12:32:41 AM
|
According to the user, he uses VC6 |
|
|
|
Topic |
|