Okay I'll change it to look for // STL include.<br><br><div class="gmail_quote">On Wed, Jun 10, 2009 at 9:56 AM, Berk Geveci <span dir="ltr"><<a href="mailto:berk.geveci@kitware.com">berk.geveci@kitware.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div class="im">> Or maybe it is time to revise the coding standards? I don't know what the<br>
> correct process is for doing this though.<br>
<br>
</div>I don't think that we need to revise this particular rule. It would be<br>
confusing if it said "don't include STL headers UNLESS you have leaf<br>
class or if it is a private header". I think that it is enough to<br>
allow for exceptions. The same way we allow for exceptions to<br>
including only the superclass' header in a .h file. Having rules that<br>
are enforced blindly is never a good idea - there is almost always a<br>
time when you have to break a rule.<br>
<br>
I looked at the Python code that enforces the STL header rule and it<br>
would be easy to change it to ignore cases like<br>
<div class="im"><br>
 #include<vtkstd/vector> // STL include<br>
<br>
</div><font color="#888888">-berk<br>
</font><div><div></div><div class="h5"><br>
On Mon, Jun 8, 2009 at 8:51 AM, Dave Partyka<<a href="mailto:dave.partyka@kitware.com">dave.partyka@kitware.com</a>> wrote:<br>
> Well one thing we can do is come up with a file naming convention or some<br>
> string in the header file to parse that would cause the commit check to<br>
> permit the commit even if there are STL headers. But that is rather dubious<br>
> as then anyone can just use whatever we come up with rather than just<br>
> following the convention in the first place. Dave Thompson example (files<br>
> named vtk*Private.h") can be easily implemented, but that won't help all<br>
> cases.<br>
> Or maybe it is time to revise the coding standards? I don't know what the<br>
> correct process is for doing this though.<br>
><br>
> On Fri, Jun 5, 2009 at 9:47 PM, Berk Geveci <<a href="mailto:berk.geveci@kitware.com">berk.geveci@kitware.com</a>> wrote:<br>
>><br>
>> Is there a way of by-passing this commit check? There are a rare<br>
>> occasions where it may be necessary to commit code which include STL<br>
>> headers in .h files.<br>
>><br>
>> To remind everyone why the decision to keep STL headers from include<br>
>> files was made: performance. STL headers are bulky and may slow down<br>
>> compilation significantly if they are included in header files that<br>
>> are included by a lot of other files. Including STL headers in the<br>
>> include files of leaf classes (such as concrete algorithm classes)<br>
>> does not have any effect on compilation time. There are no other good<br>
>> reasons why STL headers cannot be included in header files.<br>
>><br>
>> Here is the catch: we occasionally receive contributions that include<br>
>> STL header in .h. These tend to be super big reader classes. Fixing<br>
>> the whole darn thing to use PIMPL is a waste of time which we don't<br>
>> have. So, if we do not provide a way of having exception to this rule,<br>
>> those contributions would never make it into VTK.<br>
>><br>
>> So we should either provide a way of by-passing this commit check in<br>
>> these rare occasions or we should enforce this through a header test<br>
>> which can support such exceptions.<br>
>><br>
>> -berk<br>
>><br>
>> On Fri, Jun 5, 2009 at 5:13 PM, Francois<br>
>> Bertel<<a href="mailto:francois.bertel@kitware.com">francois.bertel@kitware.com</a>> wrote:<br>
>> > Isn't already enforced by HeaderTesting-* tests ?<br>
>> ><br>
>> > PS: I continue the discussion on vtk-developers only as this is the<br>
>> > canonic place to discuss about this topic.<br>
>> ><br>
>> > On Fri, Jun 5, 2009 at 4:42 PM, Dave Partyka<<a href="mailto:dave.partyka@kitware.com">dave.partyka@kitware.com</a>><br>
>> > wrote:<br>
>> >> Hi everyone,<br>
>> >> A new CVS commit check has been added to prevent commits of VTK header<br>
>> >> files<br>
>> >> that contain STL includes. Exceptions can be added by contacting myself<br>
>> >> or<br>
>> >> Brad King.<br>
>> >> I also want to give a friendly reminder that the VTK coding standards<br>
>> >> (VTK<br>
>> >> has coding standards???) provide guidelines for using STL in VTK and<br>
>> >> require<br>
>> >> that STL not be used in header files. See the following for more<br>
>> >> information<br>
>> >> or feel free to ask me if you have any questions.<br>
>> >> VTK Coding Standards:<br>
>> >> <a href="http://www.vtk.org/Wiki/VTK_Coding_Standards" target="_blank">http://www.vtk.org/Wiki/VTK_Coding_Standards</a><br>
>> >> VTK FAQ regarding STL<br>
>> >> <a href="http://www.vtk.org/Wiki/VTK_FAQ#Can_I_use_STL_with_VTK.3F" target="_blank">http://www.vtk.org/Wiki/VTK_FAQ#Can_I_use_STL_with_VTK.3F</a><br>
>> >> Also please report any problems/bugs with the new commit check to<br>
>> >> myself or<br>
>> >> Brad King.<br>
>> >> Thanks very much!<br>
>> ><br>
>> ><br>
>> ><br>
>> > --<br>
>> > François Bertel, PhD  | Kitware Inc. Suite 204<br>
>> > 1 (518) 371 3971 x113 | 28 Corporate Drive<br>
>> >                      | Clifton Park NY 12065, USA<br>
>> > _______________________________________________<br>
>> > Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
>> ><br>
>> > Visit other Kitware open-source projects at<br>
>> > <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
>> ><br>
>> > Follow this link to subscribe/unsubscribe:<br>
>> > <a href="http://www.vtk.org/mailman/listinfo/vtk-developers" target="_blank">http://www.vtk.org/mailman/listinfo/vtk-developers</a><br>
>> ><br>
>> ><br>
><br>
><br>
</div></div></blockquote></div><br>