Boost logo

Boost :

Subject: Re: [boost] [afio] running tests
From: Niall Douglas (s_sourceforge_at_[hidden])
Date: 2015-08-30 12:35:07


On 30 Aug 2015 at 9:14, Robert Ramey wrote:

> On 8/30/15 6:34 AM, Niall Douglas wrote:
>
> > Note that as AFIO is standalone capable, simply entering its
> > directory and typing:
> >
> > ./standalone_alltests_gcc.sh
> > ./test_all
> >
> > should "just work" if you have a Filesystem TS on your system. If
> > not, it'll auto-configure including Boost.Filesystem.
>
> I realize I might be in the minority here - but I'm very much opposed to
> this design approach. It has been used in boost.build and probably some
> libraries.
>
> By design approach - I mean the practice of the library designer trying
> to implement what he "thinks" the user wants without advising or
> consulting the user so that "it just works".

Every single dependency used by AFIO can be chosen via configuration
macro. I believe this is unique amongst Boost libraries.

It does default to certain choices if not told otherwise. Those
defaults and their values and conditions are explained at
https://boostgsoc13.github.io/boost.afio/doc/html/afio/compilation.htm
l.

> Do not make the operation of a library implicitly dependent on some
> environmental feature.
>
> better alternative:
>
> a) list the requirements of the library.
> b) If it can depend one of several ways of doing things - list those
> explicitly.

The exact requirements are listed at
https://boostgsoc13.github.io/boost.afio/doc/html/afio/introduction.ht
ml

The configuration options and defaults are listed at
https://boostgsoc13.github.io/boost.afio/doc/html/afio/compilation.htm
l

> c) require that the user make an explicit choice. If he declines to do
> so, trap this condition and display error as soon as possible - do not
> implement code so that "it just works".

AFIO does an #error Helpful message in exactly these situations.

> d) If you can't bring yourself to do the above - require that the user
> explicitly specify "let system decide" or something like that. At least
> this will not inflict this design error on the rest of us.

The local platform auto detection only happens for standalone AFIO.

If used as a Boost module, AFIO always uses Boost for everything.

Niall

-- 
ned Productions Limited Consulting
http://www.nedproductions.biz/ 
http://ie.linkedin.com/in/nialldouglas/



Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk