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



3rdparty/libprocess/3rdparty/stout/include/stout/protobuf.hpp (lines 764 - 765)
<https://reviews.apache.org/r/38342/#comment158229>

    Newline, please!



3rdparty/libprocess/3rdparty/stout/include/stout/protobuf.hpp (line 767)
<https://reviews.apache.org/r/38342/#comment158230>

    We use double line spacing between function definitions.



3rdparty/libprocess/3rdparty/stout/include/stout/protobuf.hpp (lines 771 - 772)
<https://reviews.apache.org/r/38342/#comment158231>

    Could you please help me understand why this check is necessary? IIUC, 
compiler ensures `T` is a protobuf becasue you pass `elem` of type `T` to 
`JSON::protobuf()`.
    
    AFAIK, the only reason to do this check is to prohibit arguments like 
`google::protobuf::RepeatedPtrField<google::protobuf::RepeatedPtrField<T>>`. Do 
you want to express this? I don't think it is necessary, because `JSON::Array` 
filled with `JSON::Array` is fine.
    
    @MPark, what'd you say?



3rdparty/libprocess/3rdparty/stout/include/stout/protobuf.hpp (line 777)
<https://reviews.apache.org/r/38342/#comment158232>

    Newline, please.



3rdparty/libprocess/3rdparty/stout/tests/protobuf_tests.cpp (line 166)
<https://reviews.apache.org/r/38342/#comment158235>

    See my comment above. I think you should not repeat testing conversion for 
all the fields, just a simple message with repeated field.



3rdparty/libprocess/3rdparty/stout/tests/protobuf_tests.pb.h (line 40)
<https://reviews.apache.org/r/38342/#comment158236>

    Just to confirm: this file is generated using bundled protobuf, right? 
Could you please put the `protoc` version in the RR description for posterity?



3rdparty/libprocess/3rdparty/stout/tests/protobuf_tests.pb.cc (lines 32 - 34)
<https://reviews.apache.org/r/38342/#comment158237>

    Just to confirm: this file is generated using bundled protobuf, right? 
Could you please put the `protoc` version in the RR description for posterity?



3rdparty/libprocess/3rdparty/stout/tests/protobuf_tests.proto (line 79)
<https://reviews.apache.org/r/38342/#comment158233>

    s/array//



3rdparty/libprocess/3rdparty/stout/tests/protobuf_tests.proto (line 80)
<https://reviews.apache.org/r/38342/#comment158234>

    s/MessageArray/ArrayMessage
    
    A high level question: why wouldn't you use `SimpleMessage` instead? 
Proto->JSON conversion for a single message is already checked in the different 
test, you want to check the conversion for collections. I would say, using 
`SimpleMessage` can reduce the amount of test code needed.


- Alexander Rukletsov


On Sept. 27, 2015, 1:34 a.m., Klaus Ma wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/38342/
> -----------------------------------------------------------
> 
> (Updated Sept. 27, 2015, 1:34 a.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
> 
>

Reply via email to