On 11/10/2012 07:57 AM, Kinkie wrote:
> +//TODO: just before branching 3.3, blanket-remove HERE from the source
I disagree that this is a valid TODO (regardless of the version).
> +#define HERE ""
Have you checked that the compiler is smart enough to optimize this out?
I suspect it is not. Please find a way to #define HERE so that the
compiler can remove it. I recommend trying an inlined stream manipulator
(that does not do anything).
> On 11/10/2012 08:47 AM, Amos Jeffries wrote:
> +1 from me.
> On 11/10/2012 11:13 AM, Francesco Chemolli wrote:
> revno: 12436
Would it be OK to add a submission process rule that discourages folks
from committing non-urgent changes as soon as they receive enough votes
for a commit? This may not be the best example, but there is a growing
number of cases where we have to adjust the freshly committed code
simply because there was not enough time for others to review it before
the commit?
Thank you,
Alex.
> On Tue, Nov 6, 2012 at 1:21 PM, Kinkie <gkinkie_at_gmail.com> wrote:
>> Hi,
>> I tried it, it seems to be working. Expect a patch soon, along the
>> lines of your proposal.
>>
>> On Tue, Nov 6, 2012 at 2:18 AM, Alex Rousskov
>> <rousskov_at_measurement-factory.com> wrote:
>>> On 11/05/2012 05:25 PM, Amos Jeffries wrote:
>>>> On 06.11.2012 04:19, Alex Rousskov wrote:
>>>>> My current preference is to change debugs() to use HERE when the
>>>>> surrounding code has to be changed anyway OR when there is a good reason
>>>>> to add HERE to that specific debugs() line.
>>>>>
>>>>> Long-term, we should consider making HERE in debugs() at level 2 or
>>>>> higher an automatic/default behavior. This will require some work, but I
>>>>> think it is possible, and I think it can even accommodate existing
>>>>> debugs() statements (with or without HERE) _without_ changing them.
>>>
>>>
>>>> Me too. If you are agreeing on that then it is a 1 line change to add
>>>> HERE every level 2+ ... and thousands of lines to remove cruft.
>>>
>>> I would just not do the "remove explicit HERE" part to avoid changing
>>> thousands of lines that do not really need to be touched. New and
>>> changed code will not be allowed to use HERE in debugs(2+). Old code can
>>> continue to use it.
>>>
>>> For this plan to work, we would need to #define HERE to be something
>>> that does not log anything and that does it fast. For example, "" will
>>> work but there ought to be faster alternatives. I recommend trying an
>>> inlined stream manipulator that will be completely optimized out.
>>>
>>>
>>> HTH,
>>>
>>> Alex.
>>>
>>
>>
>>
>> --
>> /kinkie
>
>
>
Received on Sun Nov 11 2012 - 01:13:40 MST
This archive was generated by hypermail 2.2.0 : Sun Nov 11 2012 - 12:00:35 MST