You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@avro.apache.org by Daniel Kulp <dk...@apache.org> on 2018/12/03 20:25:30 UTC

C++ version for 1.9

I’m trying to look at PR’s and have run into:

https://github.com/apache/avro/pull/203 <https://github.com/apache/avro/pull/203>
vs
https://github.com/apache/avro/pull/157 <https://github.com/apache/avro/pull/157>

At this point, I’m leaning more toward 157 and updating 1.9 to require C++11.   It’s technically an incompatible change, but it’s required to be able to compile with C++17.   203 uses the boost libraries to still allow C++03, but it’s still incompatible.   Thus, if we’re moving forward with 1.9, I’d rather go with the cleaner C++11 level.

Thoughts?

-- 
Daniel Kulp
dkulp@apache.org <ma...@apache.org> - http://dankulp.com/blog <http://dankulp.com/blog>
Talend Community Coder - http://talend.com <http://coders.talend.com/>

Re: C++ version for 1.9

Posted by Sean Busbey <bu...@cloudera.com.INVALID>.
1.9 is a major version change, so long as we release note the
incompatible change this should be fine. Especially if the folks doing
hte day-to-day maintenance of the C++ code want a newer standard.
On Tue, Dec 4, 2018 at 11:04 AM Daniel Kulp <dk...@apache.org> wrote:
>
>
> I’ve updated and merged the PR for moving to unique_ptr.   That wasn’t too hard.
>
> std::any is a C++17 thing, correct?   Thus, we cannot move to that unless we go all the way up?     Or is that something we would parameterize to use std::any if available or boot:any if not?
>
> Dan
>
>
>
>
> > On Dec 4, 2018, at 9:15 AM, Thiruvalluvan MG <th...@yahoo.com.INVALID> wrote:
> >
> > Hi Daniel,
> > I can take care of these issues. Give me a week or so.
> > Thanks
> > Thiru
> >    On Tuesday, 4 December, 2018, 7:26:53 PM IST, Daniel Kulp <dk...@apache.org> wrote:
> >
> >
> >
> >> On Dec 3, 2018, at 8:50 PM, Thiruvalluvan MG <th...@yahoo.com.INVALID> wrote:
> >> I am for moving to C++11.
> >> In addition to replacing auto_ptr with unique_ptr, we can get a few more things moved. E.g. boost::any to std::any, which has small buffer optimization. We can also replace ref counted boost pointers with those in std::.
> >> However, there is one hitch. The C++ API directly exposes auto_ptr (and possibly boost::any) instead of typedef'ing them in avro namespace. So almost all C++ users of Avro 1.8.x and before will have to modify their sources in order to compile with 1.9.0. This problem is not going to go away, so we should swallow it some time. Let it be 1.9.0. It will be worthwhile to publish a migration guide.
> >
> > I can look at the std::auto_ptr and std::any changes.  For the post part, those are search/replace.  I don’t know anything about the ref counted stuff.  Is there anyone around that could look at that?  Is that also just a search/replace?
> >
> > C++ is not my strong point, I’m mostly a Java person.  C++ is just used to control Christmas lights and we generally don’t push the language too hard for that.  :)
> >
> >
> > --
> > Daniel Kulp
> > dkulp@apache.org <ma...@apache.org> - http://dankulp.com/blog <http://dankulp.com/blog>
> > Talend Community Coder - http://talend.com <http://coders.talend.com/>
>
> --
> Daniel Kulp
> dkulp@apache.org <ma...@apache.org> - http://dankulp.com/blog <http://dankulp.com/blog>
> Talend Community Coder - http://talend.com <http://coders.talend.com/>



-- 
busbey

Re: C++ version for 1.9

Posted by Daniel Kulp <dk...@apache.org>.
I’ve updated and merged the PR for moving to unique_ptr.   That wasn’t too hard.

std::any is a C++17 thing, correct?   Thus, we cannot move to that unless we go all the way up?     Or is that something we would parameterize to use std::any if available or boot:any if not?

Dan




> On Dec 4, 2018, at 9:15 AM, Thiruvalluvan MG <th...@yahoo.com.INVALID> wrote:
> 
> Hi Daniel,
> I can take care of these issues. Give me a week or so.
> Thanks
> Thiru
>    On Tuesday, 4 December, 2018, 7:26:53 PM IST, Daniel Kulp <dk...@apache.org> wrote:  
> 
> 
> 
>> On Dec 3, 2018, at 8:50 PM, Thiruvalluvan MG <th...@yahoo.com.INVALID> wrote:
>> I am for moving to C++11.
>> In addition to replacing auto_ptr with unique_ptr, we can get a few more things moved. E.g. boost::any to std::any, which has small buffer optimization. We can also replace ref counted boost pointers with those in std::.
>> However, there is one hitch. The C++ API directly exposes auto_ptr (and possibly boost::any) instead of typedef'ing them in avro namespace. So almost all C++ users of Avro 1.8.x and before will have to modify their sources in order to compile with 1.9.0. This problem is not going to go away, so we should swallow it some time. Let it be 1.9.0. It will be worthwhile to publish a migration guide.
> 
> I can look at the std::auto_ptr and std::any changes.  For the post part, those are search/replace.  I don’t know anything about the ref counted stuff.  Is there anyone around that could look at that?  Is that also just a search/replace?
> 
> C++ is not my strong point, I’m mostly a Java person.  C++ is just used to control Christmas lights and we generally don’t push the language too hard for that.  :)
> 
> 
> -- 
> Daniel Kulp
> dkulp@apache.org <ma...@apache.org> - http://dankulp.com/blog <http://dankulp.com/blog>
> Talend Community Coder - http://talend.com <http://coders.talend.com/>  

-- 
Daniel Kulp
dkulp@apache.org <ma...@apache.org> - http://dankulp.com/blog <http://dankulp.com/blog>
Talend Community Coder - http://talend.com <http://coders.talend.com/>

Re: C++ version for 1.9

Posted by Thiruvalluvan MG <th...@yahoo.com.INVALID>.
 Hi Daniel,
I can take care of these issues. Give me a week or so.
Thanks
Thiru
    On Tuesday, 4 December, 2018, 7:26:53 PM IST, Daniel Kulp <dk...@apache.org> wrote:  
 
 

> On Dec 3, 2018, at 8:50 PM, Thiruvalluvan MG <th...@yahoo.com.INVALID> wrote:
> I am for moving to C++11.
> In addition to replacing auto_ptr with unique_ptr, we can get a few more things moved. E.g. boost::any to std::any, which has small buffer optimization. We can also replace ref counted boost pointers with those in std::.
> However, there is one hitch. The C++ API directly exposes auto_ptr (and possibly boost::any) instead of typedef'ing them in avro namespace. So almost all C++ users of Avro 1.8.x and before will have to modify their sources in order to compile with 1.9.0. This problem is not going to go away, so we should swallow it some time. Let it be 1.9.0. It will be worthwhile to publish a migration guide.

I can look at the std::auto_ptr and std::any changes.  For the post part, those are search/replace.  I don’t know anything about the ref counted stuff.  Is there anyone around that could look at that?  Is that also just a search/replace?

C++ is not my strong point, I’m mostly a Java person.  C++ is just used to control Christmas lights and we generally don’t push the language too hard for that.  :)


-- 
Daniel Kulp
dkulp@apache.org <ma...@apache.org> - http://dankulp.com/blog <http://dankulp.com/blog>
Talend Community Coder - http://talend.com <http://coders.talend.com/>  

Re: C++ version for 1.9

Posted by Daniel Kulp <dk...@apache.org>.

> On Dec 3, 2018, at 8:50 PM, Thiruvalluvan MG <th...@yahoo.com.INVALID> wrote:
> I am for moving to C++11.
> In addition to replacing auto_ptr with unique_ptr, we can get a few more things moved. E.g. boost::any to std::any, which has small buffer optimization. We can also replace ref counted boost pointers with those in std::.
> However, there is one hitch. The C++ API directly exposes auto_ptr (and possibly boost::any) instead of typedef'ing them in avro namespace. So almost all C++ users of Avro 1.8.x and before will have to modify their sources in order to compile with 1.9.0. This problem is not going to go away, so we should swallow it some time. Let it be 1.9.0. It will be worthwhile to publish a migration guide.

I can look at the std::auto_ptr and std::any changes.  For the post part, those are search/replace.  I don’t know anything about the ref counted stuff.   Is there anyone around that could look at that?  Is that also just a search/replace?

C++ is not my strong point, I’m mostly a Java person.   C++ is just used to control Christmas lights and we generally don’t push the language too hard for that.   :)


-- 
Daniel Kulp
dkulp@apache.org <ma...@apache.org> - http://dankulp.com/blog <http://dankulp.com/blog>
Talend Community Coder - http://talend.com <http://coders.talend.com/>

Re: C++ version for 1.9

Posted by Thiruvalluvan MG <th...@yahoo.com.INVALID>.
 I am for moving to C++11.
In addition to replacing auto_ptr with unique_ptr, we can get a few more things moved. E.g. boost::any to std::any, which has small buffer optimization. We can also replace ref counted boost pointers with those in std::.
However, there is one hitch. The C++ API directly exposes auto_ptr (and possibly boost::any) instead of typedef'ing them in avro namespace. So almost all C++ users of Avro 1.8.x and before will have to modify their sources in order to compile with 1.9.0. This problem is not going to go away, so we should swallow it some time. Let it be 1.9.0. It will be worthwhile to publish a migration guide.
Thank you,
Thiru    On Tuesday, 4 December, 2018, 1:55:37 AM IST, Daniel Kulp <dk...@apache.org> wrote:  
 
 
I’m trying to look at PR’s and have run into:

https://github.com/apache/avro/pull/203 <https://github.com/apache/avro/pull/203>
vs
https://github.com/apache/avro/pull/157 <https://github.com/apache/avro/pull/157>

At this point, I’m leaning more toward 157 and updating 1.9 to require C++11.  It’s technically an incompatible change, but it’s required to be able to compile with C++17.  203 uses the boost libraries to still allow C++03, but it’s still incompatible.  Thus, if we’re moving forward with 1.9, I’d rather go with the cleaner C++11 level.

Thoughts?

-- 
Daniel Kulp
dkulp@apache.org <ma...@apache.org> - http://dankulp.com/blog <http://dankulp.com/blog>
Talend Community Coder - http://talend.com <http://coders.talend.com/>