[spirit] Deprecation warnings, can they be turned off?

In doing a top-level build of Boost (trunk) I'm seeing many messages like this one: ./boost/spirit/core/composite/actions.hpp:15:4: warning: #warning "This header is deprecated. Please use: boost/spirit/include/classic_actions.hpp" In file included from libs/serialization/src/basic_xml_grammar.ipp:22, from libs/serialization/src/xml_wgrammar.cpp:243: Two questions: * Is this something to worry about that the Serialization lib, and perhaps others, are using the deprecated headers? * Assuming Serialization, other libraries, and users want to use the old headers. Is there a way for them to turn off the warning? I don't see anything obvious from looking at the headers themselves. In a world where compiling Boost produces many warnings already in some platforms. It seems bad if we are adding even more onto the fray. -- -- Grafik - Don't Assume Anything -- Redshift Software, Inc. - http://redshift-software.com -- rrivera/acm.org (msn) - grafik/redshift-software.com -- 102708583/icq - grafikrobot/aim,yahoo,skype,efnet,gmail

In doing a top-level build of Boost (trunk) I'm seeing many messages like this one:
./boost/spirit/core/composite/actions.hpp:15:4: warning: #warning "This header is deprecated. Please use: boost/spirit/include/classic_actions.hpp" In file included from libs/serialization/src/basic_xml_grammar.ipp:22, from libs/serialization/src/xml_wgrammar.cpp:243:
Two questions:
* Is this something to worry about that the Serialization lib, and perhaps others, are using the deprecated headers?
Not in the short term. We intend to maintain Spirit1 for the foreseeable future.
* Assuming Serialization, other libraries, and users want to use the old headers. Is there a way for them to turn off the warning? I don't see anything obvious from looking at the headers themselves.
In a world where compiling Boost produces many warnings already in some platforms. It seems bad if we are adding even more onto the fray.
The easiest (and best) way is do edit the #include statements in the respective libraries (I'ld be willing to do that if the library authors agree) and to define BOOST_SPIRIT_USE_OLD_NAMESPACE to enable full compatibility with the old code. I personally wouldn't like to add the possibility to disable the warnings. We want any depending code to be changed once, and will guarantee compatibility afterwards. What libraries are affected, BTW (in addition to serialization)? Regards Hartmut

Hartmut Kaiser wrote:
What libraries are affected, BTW (in addition to serialization)?
I'd have to carefully read through the hundreds of lines of output ;-) But right of the top of my head I remember also seeing graph with the warnings. -- -- Grafik - Don't Assume Anything -- Redshift Software, Inc. - http://redshift-software.com -- rrivera/acm.org (msn) - grafik/redshift-software.com -- 102708583/icq - grafikrobot/aim,yahoo,skype,efnet,gmail

Rene,
Hartmut Kaiser wrote:
What libraries are affected, BTW (in addition to serialization)?
I'd have to carefully read through the hundreds of lines of output ;-) But right of the top of my head I remember also seeing graph with the warnings.
I didn't imply that! Just thought you already had this information. After some chatting with Joel we decided to switch on the warnings depending on the Boost version used. The warnings will be shown starting from Boost 1.38. Additionally we put some prominent note into the docs preparing people to this move. Regards Hartmut

On 29 Jun 2008, at 17:40, Hartmut Kaiser wrote:
Rene,
Hartmut Kaiser wrote:
What libraries are affected, BTW (in addition to serialization)?
I'd have to carefully read through the hundreds of lines of output ;-) But right of the top of my head I remember also seeing graph with the warnings.
I didn't imply that! Just thought you already had this information.
After some chatting with Joel we decided to switch on the warnings depending on the Boost version used. The warnings will be shown starting from Boost 1.38. Additionally we put some prominent note into the docs preparing people to this move.
Does this mean we don't have to use BOOST_SPIRIT_USE_OLD_NAMESPACE for 1.36 yet since you'll drop the warnings until 1.38? Matthias

Matthias,
Hartmut Kaiser wrote:
What libraries are affected, BTW (in addition to serialization)?
I'd have to carefully read through the hundreds of lines of output ;-) But right of the top of my head I remember also seeing graph with the warnings.
I didn't imply that! Just thought you already had this information.
After some chatting with Joel we decided to switch on the warnings depending on the Boost version used. The warnings will be shown starting from Boost 1.38. Additionally we put some prominent note into the docs preparing people to this move.
Does this mean we don't have to use BOOST_SPIRIT_USE_OLD_NAMESPACE for 1.36 yet since you'll drop the warnings until 1.38?
As long as you're using the old headers you don't need this because it's implied. As soon as you switch to the new headers you need to add this define (at least if you don't want to change the code as well). To explain this: we moved the old Spirit (V1.8) to a new namespace boost::spirit::classic. The BOOST_SPIRIT_USE_OLD_NAMESPACE brings the old code back into boost::spirit. As long as you don't plan to use Spirit.Classic (V1.8) and Spirit.Qi (V2.0) in your code at the same the BOOST_SPIRIT_USE_OLD_NAMESPACE should ensure full compatibility. In the long run you might want to consider switching to the new headers (boost/spirit/include/classic_...) and change the code to use the new namespace (boost::spirit::classic). HTH Regards Hartmut
participants (3)
-
Hartmut Kaiser
-
Matthias Troyer
-
Rene Rivera