[squid-dev] HERE removal script, second attempt

Alex Rousskov rousskov at measurement-factory.com
Fri Aug 28 18:29:13 UTC 2015


On 08/28/2015 01:41 AM, Kinkie wrote:

>   this updated version of the HERE removal script seems to work much
> better then the previous, 

> also replacing all debugs(...,HERE) with debugs(...MYNAME).

debugs() already outputs __FUNCTION__ so having MYNAME there would be
pretty much as bad as having HERE, right? I am surprised you have not
noticed that in your tests so perhaps I am missing something.

If you want to avoid changing ~126 debugs(...,HERE) lines, you can
simply #define HERE to be an empty string (""). This approach will
remove ~11% of the proposed changes without sacrificing anything.

However, if it is better to get rid of HERE completely than to reduce
the conflict area by 11%, then please adjust your code to replace all
debugs(...,HERE) with debugs0(...) or similar macro calls. Those
replacement calls can use an empty string when calling debugs(), of course.

Please note that MYNAME is currently unused in trunk AFAICT.


> Also attached the patch generated by the script on current trunk (not
> meant for merge, just for ease of reviewing).
> After the patch there may be the need of small cleanups (e.g.
> ssl/certificate_db.cc) but these should be viable for a regular patch.

So, when I take your script to another branch (which was the whole idea
of developing the script), it will not be sufficient to just run it,
right? I will need to do "small cleanup" after I run the script, for
every branch? Is that cleanup required for the post-script branch code
to _work_ or to remove the last remnants of HERE that the script fails
to remove?


After the above issues are resolved:

* Please publish a script or a sed expression that will correctly adjust
any [old] patch that uses HERE so that the patch applies to [newer] code
that has been converted using your script.

* Similarly, please publish a "reverse" script or a sed expression that
will correctly adjust any [new] patch that does not use HERE so that the
patch applies to [older] code that was not converted using your script.


Thank you,

Alex.



More information about the squid-dev mailing list