You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@mesos.apache.org by Alexander Rojas <al...@mesosphere.io> on 2015/04/22 11:31:49 UTC
Using boost filesystem
Hey guys,
I was checking one of my reviews which call for using some unimplemented functionality in stout path. Since that class has no methods, attributes or anything apart from a string value attribute; I was left wondering, wether it makes sense to use boost filesystem.
Boost filesystem v3 has all the functionality we may need from a path class, it is the basis fro a technical recommendation (http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2014/n4100.pdf <http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2014/n4100.pdf>) and might become part of the standard in the future. Why not adopt it in mesos?
Alexander
Re: Using boost filesystem
Posted by Marco Massenzio <ma...@mesosphere.io>.
+1 for filesystem
(and +10 for using std:: for thread/smart pointers :)
*Marco Massenzio*
*Distributed Systems Engineer*
On Thu, Apr 23, 2015 at 8:43 AM, Cody Maloney <co...@mesosphere.io> wrote:
> For thread and smart pointer in the coming weeks we'll be able to just use
> the standardized versions if we can't already with the move to GCC 4.8
> On Apr 23, 2015 12:59 AM, "Alexander Rojas" <al...@mesosphere.io>
> wrote:
>
> > I do agree having this discussion. While I wouldn’t be for using every
> > single boost library (spirit comes to mind as one we should avoid), using
> > libraries like filesystem, thread or smart printers would reduce the
> amount
> > of code we should maintain, while being certain we are using high quality
> > libraries which are widely tested and maintained.
> >
> >
> > > On 22 Apr 2015, at 20:36, Cody Maloney <co...@mesosphere.io> wrote:
> > >
> > > It's not header only.
> > >
> > > I think we actually need a general discussion around upgrading all the
> > > libraries mesos depends upon (Using a plain up-stream boost, etc).
> > >
> > > Note that some portions of stout already require callers to link
> against
> > > specific libraries for them to actually work, so I don't think the
> > > header-only is that big of a requirement. But definitely we should
> have a
> > > discussion around it.
> > >
> > > On Wed, Apr 22, 2015 at 9:34 AM, Vinod Kone <vi...@gmail.com>
> wrote:
> > >
> > >> Is it header only?
> > >>
> > >> On Wed, Apr 22, 2015 at 2:31 AM, Alexander Rojas <
> > alexander@mesosphere.io>
> > >> wrote:
> > >>
> > >>> Hey guys,
> > >>>
> > >>> I was checking one of my reviews which call for using some
> > unimplemented
> > >>> functionality in stout path. Since that class has no methods,
> > attributes
> > >> or
> > >>> anything apart from a string value attribute; I was left wondering,
> > >> wether
> > >>> it makes sense to use boost filesystem.
> > >>>
> > >>> Boost filesystem v3 has all the functionality we may need from a path
> > >>> class, it is the basis fro a technical recommendation (
> > >>> http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2014/n4100.pdf <
> > >>> http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2014/n4100.pdf>)
> > and
> > >>> might become part of the standard in the future. Why not adopt it in
> > >> mesos?
> > >>>
> > >>> Alexander
> > >>
> >
> >
>
Re: Using boost filesystem
Posted by Cody Maloney <co...@mesosphere.io>.
For thread and smart pointer in the coming weeks we'll be able to just use
the standardized versions if we can't already with the move to GCC 4.8
On Apr 23, 2015 12:59 AM, "Alexander Rojas" <al...@mesosphere.io> wrote:
> I do agree having this discussion. While I wouldn’t be for using every
> single boost library (spirit comes to mind as one we should avoid), using
> libraries like filesystem, thread or smart printers would reduce the amount
> of code we should maintain, while being certain we are using high quality
> libraries which are widely tested and maintained.
>
>
> > On 22 Apr 2015, at 20:36, Cody Maloney <co...@mesosphere.io> wrote:
> >
> > It's not header only.
> >
> > I think we actually need a general discussion around upgrading all the
> > libraries mesos depends upon (Using a plain up-stream boost, etc).
> >
> > Note that some portions of stout already require callers to link against
> > specific libraries for them to actually work, so I don't think the
> > header-only is that big of a requirement. But definitely we should have a
> > discussion around it.
> >
> > On Wed, Apr 22, 2015 at 9:34 AM, Vinod Kone <vi...@gmail.com> wrote:
> >
> >> Is it header only?
> >>
> >> On Wed, Apr 22, 2015 at 2:31 AM, Alexander Rojas <
> alexander@mesosphere.io>
> >> wrote:
> >>
> >>> Hey guys,
> >>>
> >>> I was checking one of my reviews which call for using some
> unimplemented
> >>> functionality in stout path. Since that class has no methods,
> attributes
> >> or
> >>> anything apart from a string value attribute; I was left wondering,
> >> wether
> >>> it makes sense to use boost filesystem.
> >>>
> >>> Boost filesystem v3 has all the functionality we may need from a path
> >>> class, it is the basis fro a technical recommendation (
> >>> http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2014/n4100.pdf <
> >>> http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2014/n4100.pdf>)
> and
> >>> might become part of the standard in the future. Why not adopt it in
> >> mesos?
> >>>
> >>> Alexander
> >>
>
>
Re: Using boost filesystem
Posted by Alexander Rojas <al...@mesosphere.io>.
I do agree having this discussion. While I wouldn’t be for using every single boost library (spirit comes to mind as one we should avoid), using libraries like filesystem, thread or smart printers would reduce the amount of code we should maintain, while being certain we are using high quality libraries which are widely tested and maintained.
> On 22 Apr 2015, at 20:36, Cody Maloney <co...@mesosphere.io> wrote:
>
> It's not header only.
>
> I think we actually need a general discussion around upgrading all the
> libraries mesos depends upon (Using a plain up-stream boost, etc).
>
> Note that some portions of stout already require callers to link against
> specific libraries for them to actually work, so I don't think the
> header-only is that big of a requirement. But definitely we should have a
> discussion around it.
>
> On Wed, Apr 22, 2015 at 9:34 AM, Vinod Kone <vi...@gmail.com> wrote:
>
>> Is it header only?
>>
>> On Wed, Apr 22, 2015 at 2:31 AM, Alexander Rojas <al...@mesosphere.io>
>> wrote:
>>
>>> Hey guys,
>>>
>>> I was checking one of my reviews which call for using some unimplemented
>>> functionality in stout path. Since that class has no methods, attributes
>> or
>>> anything apart from a string value attribute; I was left wondering,
>> wether
>>> it makes sense to use boost filesystem.
>>>
>>> Boost filesystem v3 has all the functionality we may need from a path
>>> class, it is the basis fro a technical recommendation (
>>> http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2014/n4100.pdf <
>>> http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2014/n4100.pdf>) and
>>> might become part of the standard in the future. Why not adopt it in
>> mesos?
>>>
>>> Alexander
>>
Re: Using boost filesystem
Posted by Benjamin Mahler <be...@gmail.com>.
My apologies, I read your message too quickly. Tim, your snippet is not
from stout, it's from libprocess' 3rdparty makefile.
On Fri, Apr 24, 2015 at 11:38 AM, Benjamin Mahler <benjamin.mahler@gmail.com
> wrote:
> Well, we should fix the forced linkage, it's not the intent.
>
> I assume that's what you mean by "leaks it's abstractions".. yes?
>
> On Fri, Apr 24, 2015 at 7:06 AM, Tim St Clair <ts...@redhat.com> wrote:
>
>>
>> FWIW - Stout isn't a self contained header only library, and it leaks
>> it's abstractions.
>> Currently it will force linkage anyway...
>>
>> stout_tests_LDADD = \
>> libgmock.la \
>> $(LIBGLOG) \
>> $(LIBPROTOBUF) \
>> -ldl \
>> -lsvn_subr-1 \
>> -lsvn_delta-1 \
>> -lapr-1
>>
>>
>> ----- Original Message -----
>> > From: "Benjamin Mahler" <be...@gmail.com>
>> > To: "dev" <de...@mesos.apache.org>
>> > Sent: Thursday, April 23, 2015 1:58:24 PM
>> > Subject: Re: Using boost filesystem
>> >
>> > These have been around 3rd party libraries, e.g. glog, svn, protobuf,
>> etc.
>> > Here the choice to use these external libraries is made in the code that
>> > uses stout. If they don't use protobuf, they don't include stout's
>> protobuf
>> > header, and they don't link it in. There should be no surprise to the
>> > library user here.
>> >
>> > path.hpp seems a lot more general, no? A lot of users of stout will
>> want to
>> > do filesystem operations. Requiring them to link in boost once they
>> include
>> > the header seems surprising given the header-only design of stout.
>> >
>> > On Wed, Apr 22, 2015 at 11:36 AM, Cody Maloney <co...@mesosphere.io>
>> wrote:
>> >
>> > > It's not header only.
>> > >
>> > > I think we actually need a general discussion around upgrading all the
>> > > libraries mesos depends upon (Using a plain up-stream boost, etc).
>> > >
>> > > Note that some portions of stout already require callers to link
>> against
>> > > specific libraries for them to actually work, so I don't think the
>> > > header-only is that big of a requirement. But definitely we should
>> have a
>> > > discussion around it.
>> > >
>> > > On Wed, Apr 22, 2015 at 9:34 AM, Vinod Kone <vi...@gmail.com>
>> wrote:
>> > >
>> > > > Is it header only?
>> > > >
>> > > > On Wed, Apr 22, 2015 at 2:31 AM, Alexander Rojas <
>> > > alexander@mesosphere.io>
>> > > > wrote:
>> > > >
>> > > > > Hey guys,
>> > > > >
>> > > > > I was checking one of my reviews which call for using some
>> > > unimplemented
>> > > > > functionality in stout path. Since that class has no methods,
>> > > attributes
>> > > > or
>> > > > > anything apart from a string value attribute; I was left
>> wondering,
>> > > > wether
>> > > > > it makes sense to use boost filesystem.
>> > > > >
>> > > > > Boost filesystem v3 has all the functionality we may need from a
>> path
>> > > > > class, it is the basis fro a technical recommendation (
>> > > > > http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2014/n4100.pdf
>> <
>> > > > > http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2014/n4100.pdf
>> >)
>> > > and
>> > > > > might become part of the standard in the future. Why not adopt it
>> in
>> > > > mesos?
>> > > > >
>> > > > > Alexander
>> > > >
>> > >
>> >
>>
>> --
>> Cheers,
>> Timothy St. Clair
>> Red Hat Inc.
>>
>
>
Re: Using boost filesystem
Posted by Benjamin Mahler <be...@gmail.com>.
Well, we should fix the forced linkage, it's not the intent.
I assume that's what you mean by "leaks it's abstractions".. yes?
On Fri, Apr 24, 2015 at 7:06 AM, Tim St Clair <ts...@redhat.com> wrote:
>
> FWIW - Stout isn't a self contained header only library, and it leaks it's
> abstractions.
> Currently it will force linkage anyway...
>
> stout_tests_LDADD = \
> libgmock.la \
> $(LIBGLOG) \
> $(LIBPROTOBUF) \
> -ldl \
> -lsvn_subr-1 \
> -lsvn_delta-1 \
> -lapr-1
>
>
> ----- Original Message -----
> > From: "Benjamin Mahler" <be...@gmail.com>
> > To: "dev" <de...@mesos.apache.org>
> > Sent: Thursday, April 23, 2015 1:58:24 PM
> > Subject: Re: Using boost filesystem
> >
> > These have been around 3rd party libraries, e.g. glog, svn, protobuf,
> etc.
> > Here the choice to use these external libraries is made in the code that
> > uses stout. If they don't use protobuf, they don't include stout's
> protobuf
> > header, and they don't link it in. There should be no surprise to the
> > library user here.
> >
> > path.hpp seems a lot more general, no? A lot of users of stout will want
> to
> > do filesystem operations. Requiring them to link in boost once they
> include
> > the header seems surprising given the header-only design of stout.
> >
> > On Wed, Apr 22, 2015 at 11:36 AM, Cody Maloney <co...@mesosphere.io>
> wrote:
> >
> > > It's not header only.
> > >
> > > I think we actually need a general discussion around upgrading all the
> > > libraries mesos depends upon (Using a plain up-stream boost, etc).
> > >
> > > Note that some portions of stout already require callers to link
> against
> > > specific libraries for them to actually work, so I don't think the
> > > header-only is that big of a requirement. But definitely we should
> have a
> > > discussion around it.
> > >
> > > On Wed, Apr 22, 2015 at 9:34 AM, Vinod Kone <vi...@gmail.com>
> wrote:
> > >
> > > > Is it header only?
> > > >
> > > > On Wed, Apr 22, 2015 at 2:31 AM, Alexander Rojas <
> > > alexander@mesosphere.io>
> > > > wrote:
> > > >
> > > > > Hey guys,
> > > > >
> > > > > I was checking one of my reviews which call for using some
> > > unimplemented
> > > > > functionality in stout path. Since that class has no methods,
> > > attributes
> > > > or
> > > > > anything apart from a string value attribute; I was left wondering,
> > > > wether
> > > > > it makes sense to use boost filesystem.
> > > > >
> > > > > Boost filesystem v3 has all the functionality we may need from a
> path
> > > > > class, it is the basis fro a technical recommendation (
> > > > > http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2014/n4100.pdf
> <
> > > > > http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2014/n4100.pdf
> >)
> > > and
> > > > > might become part of the standard in the future. Why not adopt it
> in
> > > > mesos?
> > > > >
> > > > > Alexander
> > > >
> > >
> >
>
> --
> Cheers,
> Timothy St. Clair
> Red Hat Inc.
>
Re: Using boost filesystem
Posted by Tim St Clair <ts...@redhat.com>.
FWIW - Stout isn't a self contained header only library, and it leaks it's abstractions.
Currently it will force linkage anyway...
stout_tests_LDADD = \
libgmock.la \
$(LIBGLOG) \
$(LIBPROTOBUF) \
-ldl \
-lsvn_subr-1 \
-lsvn_delta-1 \
-lapr-1
----- Original Message -----
> From: "Benjamin Mahler" <be...@gmail.com>
> To: "dev" <de...@mesos.apache.org>
> Sent: Thursday, April 23, 2015 1:58:24 PM
> Subject: Re: Using boost filesystem
>
> These have been around 3rd party libraries, e.g. glog, svn, protobuf, etc.
> Here the choice to use these external libraries is made in the code that
> uses stout. If they don't use protobuf, they don't include stout's protobuf
> header, and they don't link it in. There should be no surprise to the
> library user here.
>
> path.hpp seems a lot more general, no? A lot of users of stout will want to
> do filesystem operations. Requiring them to link in boost once they include
> the header seems surprising given the header-only design of stout.
>
> On Wed, Apr 22, 2015 at 11:36 AM, Cody Maloney <co...@mesosphere.io> wrote:
>
> > It's not header only.
> >
> > I think we actually need a general discussion around upgrading all the
> > libraries mesos depends upon (Using a plain up-stream boost, etc).
> >
> > Note that some portions of stout already require callers to link against
> > specific libraries for them to actually work, so I don't think the
> > header-only is that big of a requirement. But definitely we should have a
> > discussion around it.
> >
> > On Wed, Apr 22, 2015 at 9:34 AM, Vinod Kone <vi...@gmail.com> wrote:
> >
> > > Is it header only?
> > >
> > > On Wed, Apr 22, 2015 at 2:31 AM, Alexander Rojas <
> > alexander@mesosphere.io>
> > > wrote:
> > >
> > > > Hey guys,
> > > >
> > > > I was checking one of my reviews which call for using some
> > unimplemented
> > > > functionality in stout path. Since that class has no methods,
> > attributes
> > > or
> > > > anything apart from a string value attribute; I was left wondering,
> > > wether
> > > > it makes sense to use boost filesystem.
> > > >
> > > > Boost filesystem v3 has all the functionality we may need from a path
> > > > class, it is the basis fro a technical recommendation (
> > > > http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2014/n4100.pdf <
> > > > http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2014/n4100.pdf>)
> > and
> > > > might become part of the standard in the future. Why not adopt it in
> > > mesos?
> > > >
> > > > Alexander
> > >
> >
>
--
Cheers,
Timothy St. Clair
Red Hat Inc.
Re: Using boost filesystem
Posted by Benjamin Mahler <be...@gmail.com>.
These have been around 3rd party libraries, e.g. glog, svn, protobuf, etc.
Here the choice to use these external libraries is made in the code that
uses stout. If they don't use protobuf, they don't include stout's protobuf
header, and they don't link it in. There should be no surprise to the
library user here.
path.hpp seems a lot more general, no? A lot of users of stout will want to
do filesystem operations. Requiring them to link in boost once they include
the header seems surprising given the header-only design of stout.
On Wed, Apr 22, 2015 at 11:36 AM, Cody Maloney <co...@mesosphere.io> wrote:
> It's not header only.
>
> I think we actually need a general discussion around upgrading all the
> libraries mesos depends upon (Using a plain up-stream boost, etc).
>
> Note that some portions of stout already require callers to link against
> specific libraries for them to actually work, so I don't think the
> header-only is that big of a requirement. But definitely we should have a
> discussion around it.
>
> On Wed, Apr 22, 2015 at 9:34 AM, Vinod Kone <vi...@gmail.com> wrote:
>
> > Is it header only?
> >
> > On Wed, Apr 22, 2015 at 2:31 AM, Alexander Rojas <
> alexander@mesosphere.io>
> > wrote:
> >
> > > Hey guys,
> > >
> > > I was checking one of my reviews which call for using some
> unimplemented
> > > functionality in stout path. Since that class has no methods,
> attributes
> > or
> > > anything apart from a string value attribute; I was left wondering,
> > wether
> > > it makes sense to use boost filesystem.
> > >
> > > Boost filesystem v3 has all the functionality we may need from a path
> > > class, it is the basis fro a technical recommendation (
> > > http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2014/n4100.pdf <
> > > http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2014/n4100.pdf>)
> and
> > > might become part of the standard in the future. Why not adopt it in
> > mesos?
> > >
> > > Alexander
> >
>
Re: Using boost filesystem
Posted by Cody Maloney <co...@mesosphere.io>.
It's not header only.
I think we actually need a general discussion around upgrading all the
libraries mesos depends upon (Using a plain up-stream boost, etc).
Note that some portions of stout already require callers to link against
specific libraries for them to actually work, so I don't think the
header-only is that big of a requirement. But definitely we should have a
discussion around it.
On Wed, Apr 22, 2015 at 9:34 AM, Vinod Kone <vi...@gmail.com> wrote:
> Is it header only?
>
> On Wed, Apr 22, 2015 at 2:31 AM, Alexander Rojas <al...@mesosphere.io>
> wrote:
>
> > Hey guys,
> >
> > I was checking one of my reviews which call for using some unimplemented
> > functionality in stout path. Since that class has no methods, attributes
> or
> > anything apart from a string value attribute; I was left wondering,
> wether
> > it makes sense to use boost filesystem.
> >
> > Boost filesystem v3 has all the functionality we may need from a path
> > class, it is the basis fro a technical recommendation (
> > http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2014/n4100.pdf <
> > http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2014/n4100.pdf>) and
> > might become part of the standard in the future. Why not adopt it in
> mesos?
> >
> > Alexander
>
Re: Using boost filesystem
Posted by Vinod Kone <vi...@gmail.com>.
Is it header only?
On Wed, Apr 22, 2015 at 2:31 AM, Alexander Rojas <al...@mesosphere.io>
wrote:
> Hey guys,
>
> I was checking one of my reviews which call for using some unimplemented
> functionality in stout path. Since that class has no methods, attributes or
> anything apart from a string value attribute; I was left wondering, wether
> it makes sense to use boost filesystem.
>
> Boost filesystem v3 has all the functionality we may need from a path
> class, it is the basis fro a technical recommendation (
> http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2014/n4100.pdf <
> http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2014/n4100.pdf>) and
> might become part of the standard in the future. Why not adopt it in mesos?
>
> Alexander