You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@thrift.apache.org by "James E. King, III" <jk...@apache.org> on 2017/12/22 21:14:45 UTC

Deprecation of C++03 support - thoughts?

A pull request was submitted recently that is a work in progress to move
away from Boost.  This is something the team has expressed a desire for in
the past (although as a maintainer of two boost libraries it makes me sad!)
as will will reduce project dependencies.

https://github.com/apache/thrift/pull/1448

This work would be GREATLY simplified if we came to a decision to name
0.11.0 as the last version that will support C++03, and the next release
will require C++11 and would not use boost in generated or library code.
I'm not sure I would be okay with such a decision, but I'm floating the
idea out there for general comment from anyone and everyone.

This would probably force people up to gcc-4.8 or gcc-4.9 at a minimum on
Unix, not sure which version of clang (maybe 3.4?), and I believe we might
need to require Visual Studio 2013 or later, depending on how much C++11 we
use it could go up to 2015.

Libraries in Boost could be quite useful in the future, for example
boost::asio and boost::beast.  If we disconnect from boost completely then
we would not have access to these.  I suppose we could make them optional
servers or transports that would need to be enabled at build time, and if
enabled at build time would require boost, so perhaps I'm just being
paranoid there.

Thanks,

Jim

Re: Deprecation of C++03 support - thoughts?

Posted by Chet Murthy <mu...@gmail.com>.
I ought to have noted that googletest works well with googlemock, and
*that* is one *lovely* C++ mock library.  Holey moley, so lovely.

Re: Deprecation of C++03 support - thoughts?

Posted by Chet Murthy <mu...@gmail.com>.
On Wed, Dec 27, 2017 at 6:31 PM, James E. King, III <jk...@apache.org>
wrote:

> On Wed, Dec 27, 2017 at 6:06 PM, Roger Meier <ro...@bufferoverflow.ch>
> wrote:
>
> > I would be happy to port tests from boost-test to googletest
>
>  Not certain I see a benefit there.  Replacing one third party library for
> another...


[Not saying this should convince you, but this is how I debug basically all
low-probability concurrency-related bugs -- don't bother understanding it,
just add log-lines and run gazillions of test-replays.]

Two advantages:

(1) at least with boost-test 1.58.0, it seems like even running individual
tests doesn't work.

But the real winner is (2) googletest supports out-of-the-box
"gtest-parallel", which is a way to run googletest tests that are suitably
non-self-interfering in parallel, many copies, many times, keeping track of
which ones fail.  The way I found the bug in  THRIFT-3877 was *not* to go
understand the code, but instead to iteratively

(a) add log-lines with glog

(b) rerun with gtest-parallel

As I added log-lines, the probability of the bug occurring dropped (b/c it
always does ;-) (but also b/c the log-lines "stretched-out" some of the
executions enough for packets to make it across the "network" (== "lo0
network" ;-)  But I just upped the gtest-parallel "# times to run test" to
ensure that I hadn't scared the bug away.

I didn't actually understand what was going wrong, until I had it pretty
much nailed in a log of the incident in excruciating detail.

gtest-parallel + logs FTW!

--chet--

Re: Deprecation of C++03 support - thoughts?

Posted by "James E. King, III" <jk...@apache.org>.
On Wed, Dec 27, 2017 at 6:06 PM, Roger Meier <ro...@bufferoverflow.ch>
wrote:

> +1 for C++11 on master and for upcoming releases
>
>
> Quoting Chet Murthy <mu...@gmail.com>:
>
> I would be happy to port tests from boost-test to googletest -- and in the
>> process, we could arrange for running tests in parallel, e.g. the
>> cross-test.  I've found that googetest is much more ..... helpful for
>> debugging.  I'd also vote for (in the C++ code) putting in glog support,
>> for similar reasons.
>>
>

 Not certain I see a benefit there.  Replacing one third party library for
another...


>> On Fri, Dec 22, 2017 at 6:41 PM, Ben Craig <be...@gmail.com> wrote:
>>
>> The main source of work on the Thrift side will be porting the tests.
>>> Many
>>> of them are based on boost test right now.
>>>
>>> Do we have to abandon boost entirely, or just the runtime?


> I'm generally fine with the idea, just be aware that this is a breaking
>>> change, though the break will often be easily dealt with by users
>>> (replacing std with boost).
>>>
>>> It's actually this work that is complicating things in some places,
especially where
detection of a C++11 compiler is in question.  If we continue to support
C++03 then
we should make a proper detector of C++11 (like Boost.Config has).


> If you want to be super nice to our users, you could provide a #define to
>>> switch between boost:: and std::.
>>>
>>> We currently do that with the stdcxx namespace.


> On Fri, Dec 22, 2017 at 3:14 PM, James E. King, III <jk...@apache.org>
>>> wrote:
>>>
>>> > A pull request was submitted recently that is a work in progress to
>>> move
>>> > away from Boost.  This is something the team has expressed a desire for
>>> in
>>> > the past (although as a maintainer of two boost libraries it makes me
>>> sad!)
>>> > as will will reduce project dependencies.
>>> >
>>> > https://github.com/apache/thrift/pull/1448
>>> >
>>> > This work would be GREATLY simplified if we came to a decision to name
>>> > 0.11.0 as the last version that will support C++03, and the next
>>> release
>>> > will require C++11 and would not use boost in generated or library
>>> code.
>>> > I'm not sure I would be okay with such a decision, but I'm floating the
>>> > idea out there for general comment from anyone and everyone.
>>> >
>>> > This would probably force people up to gcc-4.8 or gcc-4.9 at a minimum
>>> on
>>> > Unix, not sure which version of clang (maybe 3.4?), and I believe we
>>> might
>>> > need to require Visual Studio 2013 or later, depending on how much
>>> C++11
>>> we
>>> > use it could go up to 2015.
>>> >
>>> > Libraries in Boost could be quite useful in the future, for example
>>> > boost::asio and boost::beast.  If we disconnect from boost completely
>>> then
>>> > we would not have access to these.  I suppose we could make them
>>> optional
>>> > servers or transports that would need to be enabled at build time, and
>>> if
>>> > enabled at build time would require boost, so perhaps I'm just being
>>> > paranoid there.
>>> >
>>> > Thanks,
>>> >
>>> > Jim
>>> >
>>>
>>>
>
>

Re: Deprecation of C++03 support - thoughts?

Posted by Roger Meier <ro...@bufferoverflow.ch>.
+1 for C++11 on master and for upcoming releases

Quoting Chet Murthy <mu...@gmail.com>:

> I would be happy to port tests from boost-test to googletest -- and in the
> process, we could arrange for running tests in parallel, e.g. the
> cross-test.  I've found that googetest is much more ..... helpful for
> debugging.  I'd also vote for (in the C++ code) putting in glog support,
> for similar reasons.
>
> On Fri, Dec 22, 2017 at 6:41 PM, Ben Craig <be...@gmail.com> wrote:
>
>> The main source of work on the Thrift side will be porting the tests.  Many
>> of them are based on boost test right now.
>>
>> I'm generally fine with the idea, just be aware that this is a breaking
>> change, though the break will often be easily dealt with by users
>> (replacing std with boost).
>>
>> If you want to be super nice to our users, you could provide a #define to
>> switch between boost:: and std::.
>>
>> On Fri, Dec 22, 2017 at 3:14 PM, James E. King, III <jk...@apache.org>
>> wrote:
>>
>> > A pull request was submitted recently that is a work in progress to move
>> > away from Boost.  This is something the team has expressed a desire for
>> in
>> > the past (although as a maintainer of two boost libraries it makes me
>> sad!)
>> > as will will reduce project dependencies.
>> >
>> > https://github.com/apache/thrift/pull/1448
>> >
>> > This work would be GREATLY simplified if we came to a decision to name
>> > 0.11.0 as the last version that will support C++03, and the next release
>> > will require C++11 and would not use boost in generated or library code.
>> > I'm not sure I would be okay with such a decision, but I'm floating the
>> > idea out there for general comment from anyone and everyone.
>> >
>> > This would probably force people up to gcc-4.8 or gcc-4.9 at a minimum on
>> > Unix, not sure which version of clang (maybe 3.4?), and I believe we
>> might
>> > need to require Visual Studio 2013 or later, depending on how much C++11
>> we
>> > use it could go up to 2015.
>> >
>> > Libraries in Boost could be quite useful in the future, for example
>> > boost::asio and boost::beast.  If we disconnect from boost completely
>> then
>> > we would not have access to these.  I suppose we could make them optional
>> > servers or transports that would need to be enabled at build time, and if
>> > enabled at build time would require boost, so perhaps I'm just being
>> > paranoid there.
>> >
>> > Thanks,
>> >
>> > Jim
>> >
>>



Re: Deprecation of C++03 support - thoughts?

Posted by Chet Murthy <mu...@gmail.com>.
I would be happy to port tests from boost-test to googletest -- and in the
process, we could arrange for running tests in parallel, e.g. the
cross-test.  I've found that googetest is much more ..... helpful for
debugging.  I'd also vote for (in the C++ code) putting in glog support,
for similar reasons.

On Fri, Dec 22, 2017 at 6:41 PM, Ben Craig <be...@gmail.com> wrote:

> The main source of work on the Thrift side will be porting the tests.  Many
> of them are based on boost test right now.
>
> I'm generally fine with the idea, just be aware that this is a breaking
> change, though the break will often be easily dealt with by users
> (replacing std with boost).
>
> If you want to be super nice to our users, you could provide a #define to
> switch between boost:: and std::.
>
> On Fri, Dec 22, 2017 at 3:14 PM, James E. King, III <jk...@apache.org>
> wrote:
>
> > A pull request was submitted recently that is a work in progress to move
> > away from Boost.  This is something the team has expressed a desire for
> in
> > the past (although as a maintainer of two boost libraries it makes me
> sad!)
> > as will will reduce project dependencies.
> >
> > https://github.com/apache/thrift/pull/1448
> >
> > This work would be GREATLY simplified if we came to a decision to name
> > 0.11.0 as the last version that will support C++03, and the next release
> > will require C++11 and would not use boost in generated or library code.
> > I'm not sure I would be okay with such a decision, but I'm floating the
> > idea out there for general comment from anyone and everyone.
> >
> > This would probably force people up to gcc-4.8 or gcc-4.9 at a minimum on
> > Unix, not sure which version of clang (maybe 3.4?), and I believe we
> might
> > need to require Visual Studio 2013 or later, depending on how much C++11
> we
> > use it could go up to 2015.
> >
> > Libraries in Boost could be quite useful in the future, for example
> > boost::asio and boost::beast.  If we disconnect from boost completely
> then
> > we would not have access to these.  I suppose we could make them optional
> > servers or transports that would need to be enabled at build time, and if
> > enabled at build time would require boost, so perhaps I'm just being
> > paranoid there.
> >
> > Thanks,
> >
> > Jim
> >
>

Re: Deprecation of C++03 support - thoughts?

Posted by Ben Craig <be...@gmail.com>.
The main source of work on the Thrift side will be porting the tests.  Many
of them are based on boost test right now.

I'm generally fine with the idea, just be aware that this is a breaking
change, though the break will often be easily dealt with by users
(replacing std with boost).

If you want to be super nice to our users, you could provide a #define to
switch between boost:: and std::.

On Fri, Dec 22, 2017 at 3:14 PM, James E. King, III <jk...@apache.org>
wrote:

> A pull request was submitted recently that is a work in progress to move
> away from Boost.  This is something the team has expressed a desire for in
> the past (although as a maintainer of two boost libraries it makes me sad!)
> as will will reduce project dependencies.
>
> https://github.com/apache/thrift/pull/1448
>
> This work would be GREATLY simplified if we came to a decision to name
> 0.11.0 as the last version that will support C++03, and the next release
> will require C++11 and would not use boost in generated or library code.
> I'm not sure I would be okay with such a decision, but I'm floating the
> idea out there for general comment from anyone and everyone.
>
> This would probably force people up to gcc-4.8 or gcc-4.9 at a minimum on
> Unix, not sure which version of clang (maybe 3.4?), and I believe we might
> need to require Visual Studio 2013 or later, depending on how much C++11 we
> use it could go up to 2015.
>
> Libraries in Boost could be quite useful in the future, for example
> boost::asio and boost::beast.  If we disconnect from boost completely then
> we would not have access to these.  I suppose we could make them optional
> servers or transports that would need to be enabled at build time, and if
> enabled at build time would require boost, so perhaps I'm just being
> paranoid there.
>
> Thanks,
>
> Jim
>