[squid-dev] [RFC] The situation with helpers/

Kinkie gkinkie at gmail.com
Tue Jan 5 08:04:11 UTC 2016


On Tue, Jan 5, 2016 at 4:58 AM, Amos Jeffries <squid3 at treenet.co.nz> wrote:
> The SBuf and CharacterSet patch auditing has brought up the questions of
> why helpers/ is separate from src/, built first, what cross-dependency
> there can be, and even why we are bundling C++ helpers to begin with.
>
> So lets clarify it formally once and for all.
>
> Q1: why is helpers/ built before src/ ?
>
> * originally most of the helpers were actually C helpers, not C++. We
> had significant build errors some obvious some subtle related to
> compiler include paths pulling in src/ C++ content and dependencies.
>
> * building first enforces that src/ obects do not exist in the build
> directory on clean builds, so cannot be depended on by mistake.
>
> TODAY:
>  a) that C vs C++ distinction non longer exists. If the dependencies are
> re-introduced they will be simply an annoyance with extra LDADD lists to
> be maintained and increased helper binary sizes. Not a build or run-time
> error.
>
>  b) several of the helpers are actually very tightly integrated and even
> built within src/ (pinger, diskd, ssl_crtd etc).
>
>
> Which brings us to ..
>
> Q2: why is helpers/ separate from src/ ?
>   should we shuffle them back to src/*/helpers/ directories on a
> per-component basis ?
>
> 1* the current configure.ac logic would as easily work for scanning
> src/*/helpers/X as for helpers/*/X
>
> 2* the move would simplify the bundle size by a few Makefiles.
>
> 3* the move would simplify the use of our fancy custom logic designs in
> helpers.
>
> 4* it does somewhat hinder anyone wanting to manually build a single
> helper. Though I have not heard of anyone doing so in many years.
>
> 5* it does mean we should probably discard the goal of having the helpers
> be demo code examples for people to base their custom helpers on.

I have no objections to moving helpers/ into src/.
I see little benefits in point 2 above (I've numbered them), and few
downsides in 4, I don't think point 5 applies.
I don't think c vs. c++ makes a difference with dependencies. It's
some "fancy custom logics" which are not available outside helpers. I
don't however believe it'll be prevalent.

In other words, +0 from me.

-- 
    Francesco


More information about the squid-dev mailing list