mesos-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Klaus Ma" <kl...@cguru.net>
Subject Re: Review Request 38342: Add JSON::protobuf for google::protobuf::RepeatedPtrField (stout part)
Date Fri, 25 Sep 2015 15:26:26 GMT


> On Sept. 25, 2015, 1:35 p.m., Alexander Rukletsov wrote:
> > 3rdparty/libprocess/3rdparty/stout/include/stout/protobuf.hpp, line 609
> > <https://reviews.apache.org/r/38342/diff/3/?file=1084033#file1084033line609>
> >
> >     1. You can also use `inline`, that's what we usually do.
> >     2. `static_assert` can be replaced by pulling the type into the fucntion signature,
not by `Try<>`.
> >     3. What I think Jan means instead is that instead of calling an `ABORT`, why
not using a `Try<>`?

1. Yes, `inline` is fine according to the document; i'll have a try (seems enhanced in C++11
:) ).
2. `static_assert` will issue a **compile-time** error if test failed, `Try<>` will
check the result at **run-time**; so prefer to `static_assert` for `Array protobuf(...)`.


- Klaus


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/38342/#review100575
-----------------------------------------------------------


On Sept. 24, 2015, 3 p.m., Klaus Ma wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/38342/
> -----------------------------------------------------------
> 
> (Updated Sept. 24, 2015, 3 p.m.)
> 
> 
> Review request for mesos, Alexander Rukletsov, Michael Park, and Jan Schlicht.
> 
> 
> Bugs: MESOS-3405
>     https://issues.apache.org/jira/browse/MESOS-3405
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> Currently, `stout/protobuf.hpp` provides a `JSON::Protobuf` utility which converts a
`google::protobuf::Message` into a `JSON::Object`.
> We should add the support for `google::protobuf::RepeatedPtrField<T>` by introducing
overloaded functions.
> 
> 
> Diffs
> -----
> 
>   3rdparty/libprocess/3rdparty/stout/include/stout/protobuf.hpp 2285ce9 
>   3rdparty/libprocess/3rdparty/stout/tests/protobuf_tests.cpp 68328a2 
>   3rdparty/libprocess/3rdparty/stout/tests/protobuf_tests.pb.h 8ebb798 
>   3rdparty/libprocess/3rdparty/stout/tests/protobuf_tests.pb.cc 34eb6d0 
>   3rdparty/libprocess/3rdparty/stout/tests/protobuf_tests.proto 920f5c9 
> 
> Diff: https://reviews.apache.org/r/38342/diff/
> 
> 
> Testing
> -------
> 
> cd 3rdparty/libprocess/3rdparty/stout
> ./boostrap
> ./configure
> make
> 
> 
> Thanks,
> 
> Klaus Ma
> 
>


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message