Re: Review Request 43938: Required jsonifying of generic protobuf to be explicit opt-in [stout].

2016-02-27 Thread Michael Park


> On Feb. 26, 2016, 9:38 p.m., Neil Conway wrote:
> > 3rdparty/libprocess/3rdparty/stout/include/stout/protobuf.hpp, line 625
> > 
> >
> > Is this the best name for this type? Not sure there's a better name, 
> > but `JSON::Protobuf` doesn't necessarily imply to me that the type names a 
> > certain representation of `google::protobuf::Message`. What about 
> > `JSON::RawProtobuf`?

I'm not sure if it's the best name. At least at the call-site it seems ok to 
me. This is internal anyway, so we can always change it later :)


- Michael


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


On Feb. 28, 2016, 2:17 a.m., Michael Park wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/43938/
> ---
> 
> (Updated Feb. 28, 2016, 2:17 a.m.)
> 
> 
> Review request for mesos, Benjamin Hindman, Joris Van Remoortere, and Neil 
> Conway.
> 
> 
> Bugs: MESOS-4754
> https://issues.apache.org/jira/browse/MESOS-4754
> 
> 
> Repository: mesos
> 
> 
> Description
> ---
> 
> Required jsonifying of generic protobuf to be explicit opt-in [stout].
> 
> 
> Diffs
> -
> 
>   3rdparty/libprocess/3rdparty/stout/include/stout/protobuf.hpp 
> eb5502c4987da5593169a86b21f60c01aa5b5170 
>   3rdparty/libprocess/3rdparty/stout/include/stout/representation.hpp 
> 22f70f7536c6f5d24ff59228d8ba7bf41319fd4a 
>   3rdparty/libprocess/3rdparty/stout/tests/protobuf_tests.cpp 
> 8dd9cfd3e7d1e3ab4ace87066a43a3094b776d82 
> 
> Diff: https://reviews.apache.org/r/43938/diff/
> 
> 
> Testing
> ---
> 
> `make check`
> 
> 
> Thanks,
> 
> Michael Park
> 
>



Re: Review Request 43938: Required jsonifying of generic protobuf to be explicit opt-in [stout].

2016-02-27 Thread Michael Park

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

(Updated Feb. 28, 2016, 2:17 a.m.)


Review request for mesos, Benjamin Hindman, Joris Van Remoortere, and Neil 
Conway.


Changes
---

Addressed Neil's comment.


Bugs: MESOS-4754
https://issues.apache.org/jira/browse/MESOS-4754


Repository: mesos


Description (updated)
---

Required jsonifying of generic protobuf to be explicit opt-in [stout].


Diffs (updated)
-

  3rdparty/libprocess/3rdparty/stout/include/stout/protobuf.hpp 
eb5502c4987da5593169a86b21f60c01aa5b5170 
  3rdparty/libprocess/3rdparty/stout/include/stout/representation.hpp 
22f70f7536c6f5d24ff59228d8ba7bf41319fd4a 
  3rdparty/libprocess/3rdparty/stout/tests/protobuf_tests.cpp 
8dd9cfd3e7d1e3ab4ace87066a43a3094b776d82 

Diff: https://reviews.apache.org/r/43938/diff/


Testing
---

`make check`


Thanks,

Michael Park



Re: Review Request 43938: Required jsonifying of generic protobuf to be explicit opt-in [stout].

2016-02-26 Thread Neil Conway

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


Fix it, then Ship it!





3rdparty/libprocess/3rdparty/stout/include/stout/protobuf.hpp (line 624)


This needs a comment, I think.



3rdparty/libprocess/3rdparty/stout/include/stout/protobuf.hpp (line 625)


Is this the best name for this type? Not sure there's a better name, but 
`JSON::Protobuf` doesn't necessarily imply to me that the type names a certain 
representation of `google::protobuf::Message`. What about `JSON::RawProtobuf`?


- Neil Conway


On Feb. 26, 2016, 8:39 p.m., Michael Park wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/43938/
> ---
> 
> (Updated Feb. 26, 2016, 8:39 p.m.)
> 
> 
> Review request for mesos, Benjamin Hindman, Joris Van Remoortere, and Neil 
> Conway.
> 
> 
> Bugs: MESOS-4754
> https://issues.apache.org/jira/browse/MESOS-4754
> 
> 
> Repository: mesos
> 
> 
> Description
> ---
> 
> See JIRA ticket.
> 
> 
> Diffs
> -
> 
>   3rdparty/libprocess/3rdparty/stout/include/stout/protobuf.hpp 
> eb5502c4987da5593169a86b21f60c01aa5b5170 
>   3rdparty/libprocess/3rdparty/stout/include/stout/representation.hpp 
> 22f70f7536c6f5d24ff59228d8ba7bf41319fd4a 
>   3rdparty/libprocess/3rdparty/stout/tests/protobuf_tests.cpp 
> 8dd9cfd3e7d1e3ab4ace87066a43a3094b776d82 
> 
> Diff: https://reviews.apache.org/r/43938/diff/
> 
> 
> Testing
> ---
> 
> `make check`
> 
> 
> Thanks,
> 
> Michael Park
> 
>



Re: Review Request 43938: Required jsonifying of generic protobuf to be explicit opt-in [stout].

2016-02-24 Thread Michael Park

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




3rdparty/libprocess/3rdparty/stout/tests/protobuf_tests.cpp (lines 536 - 540)


With this change, we can no longer simply rely on the generic `json` for 
iterable (`void json(JSON::ArrayWriter* writer, const Iterable& iterable);`) 
anymore.

But this is no worse than other lambda + manual loops we have currently. 
The plan is to consider mitigating the plan with `boost::adaptors::transform`.


- Michael Park


On Feb. 24, 2016, 9:15 a.m., Michael Park wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/43938/
> ---
> 
> (Updated Feb. 24, 2016, 9:15 a.m.)
> 
> 
> Review request for mesos, Benjamin Hindman and Joris Van Remoortere.
> 
> 
> Bugs: MESOS-4754
> https://issues.apache.org/jira/browse/MESOS-4754
> 
> 
> Repository: mesos
> 
> 
> Description
> ---
> 
> See JIRA ticket.
> 
> 
> Diffs
> -
> 
>   3rdparty/libprocess/3rdparty/stout/include/stout/protobuf.hpp 
> eb5502c4987da5593169a86b21f60c01aa5b5170 
>   3rdparty/libprocess/3rdparty/stout/include/stout/representation.hpp 
> 22f70f7536c6f5d24ff59228d8ba7bf41319fd4a 
>   3rdparty/libprocess/3rdparty/stout/tests/protobuf_tests.cpp 
> 8dd9cfd3e7d1e3ab4ace87066a43a3094b776d82 
> 
> Diff: https://reviews.apache.org/r/43938/diff/
> 
> 
> Testing
> ---
> 
> `make check`
> 
> 
> Thanks,
> 
> Michael Park
> 
>