Strict or lax build configuration

I have a question how building Boost should behave when the user provides wrong configuration information. E.g., suppose you have this in user-config.jam: using python : 3.20 : /nowhere ; or alternatively, in 1.42 a user runs Boost.Build as follows: ./bjam -sZLIB_INCLUDES=/still-nowhere ... What should happen? - A hard error. After all, the user wanted that specific configuration. And warnings are easy to miss. - A warning. Autodetection will still run and possibly find a random version - A hard error, but also run autodetection and let user know what was found. For example: Could not find Python version 3.20 in /nowhere. There is a valid installation of 2.5 in /usr. Remove the 'using python' statement to use it. Comments? Thanks, Volodya

E.g. this piece of code boost::asio::io_service ios; boost::asio::posix::stream_descriptor sd(ios, p[0]); ios.reset(); int invoked = 0; boost::asio::async_read(sd, boost::asio::null_buffers(), boost::bind(&local::on_ready, _1, &invoked)); ios.poll_one(); BOOST_CHECK(!invoked); // doesn't pass becomes boost::asio::io_service ios; boost::asio::posix::stream_descriptor sd(ios, p[0]); ios.reset(); int invoked = 0; boost::asio::async_read(sd, boost::asio::null_buffers(), boost::bind(&local::on_ready, _1, &invoked)); ios.poll_one(); BOOST_CHECK(!invoked); // doesn't pass Can this be fixed? BR, Dmitry

You can mark the text as a code block by surrounding it with {{{ }}}. Should be something like: {{{ boost::asio::io_service ios; boost::asio::posix::stream_descriptor sd(ios, p[0]); ios.reset(); int invoked = 0; boost::asio::async_read(sd, boost::asio::null_buffers(), boost::bind(&local::on_ready, _1, &invoked)); ios.poll_one(); BOOST_CHECK(!invoked); // doesn't pass }}} Theres a 'code block' button above the edit field that inserts the braces for you. -- View this message in context: http://old.nabble.com/Strict-or-lax-build-configuration-tp26369324p26369570.... Sent from the Boost - Dev mailing list archive at Nabble.com.

Vladimir Prus wrote:
I like this, but I'd explicitly say "autodetection found a valid installation ... or you can fix your path" to make clear that a) the autodetected locations are not necessarily the "right" locations and b) the user is still free to fix his mistake and use a different installation. This option provides more information than just giving a hard error, so the message should be worded carefully enough not to confuse the user. --Jeffrey Bosboom

- A hard error, but also run autodetection and let user know what was found. Could not find Python version 3.20 in /somewhere. There is a valid installation of 2.5 in /usr. Remove the 'using python' version to use Python version 2.5 in /usr or install Python version 3.20 at /somewhere. for the oligoneuronic? (mea culpa!) (Remove the 'using python' statement means you don't want Python at all?) Paul --- Paul A. Bristow Prizet Farmhouse Kendal, UK LA8 8AB +44 1539 561830, mobile +44 7714330204 pbristow@hetp.u-net.com

Paul A. Bristow wrote:
This wording is indeed better. Thanks.
(Remove the 'using python' statement means you don't want Python at all?)
If there's no explicit 'using python' then we'll try to find, and use some, and if there's none, Boost.Python will be skipped, without hard error. - Volodya
participants (6)
-
Dmitry Goncharov
-
Henrik Sundberg
-
Jeffrey Bosboom
-
Paul A. Bristow
-
Richard Webb
-
Vladimir Prus