You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@mesos.apache.org by Alexander Rukletsov <ru...@gmail.com> on 2016/03/10 18:14:15 UTC

Review Request 44652: Omitted names of unused parameters in command executor.

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

Review request for mesos and Ben Mahler.


Repository: mesos


Description
-------

See summary.


Diffs
-----

  src/launcher/executor.cpp 4149f084b0b234fb995df04e9d1ca704feec082e 

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


Testing
-------

The complete chain was tested. See https://reviews.apache.org/r/44662/.


Thanks,

Alexander Rukletsov


Re: Review Request 44652: Omitted names of unused parameters in command executor.

Posted by Joerg Schad <jo...@mesosphere.io>.

> On March 10, 2016, 5:56 p.m., Joerg Schad wrote:
> > src/launcher/executor.cpp, line 124
> > <https://reviews.apache.org/r/44652/diff/1/?file=1294474#file1294474line124>
> >
> >     Not sure whether we have a real style for that, but the example I seen (and used myself) are to comment the name. See https://github.com/apache/mesos/blob/master/3rdparty/libprocess/src/openssl.cpp#L155 for an example.
> >     In this case I don't believe it makes a large difference as the Type is descriptive enough, but that might be different with more general types (imagine a string).
> 
> Ben Mahler wrote:
>     The openssl file is pretty new, I think the general style for this has not been to use `/* */` comments but rather to leave the name or omit the name.

I guess the Google Styleguide (https://google.github.io/styleguide/cppguide.html#Function_Declarations_and_Definitions) states "Unused parameters that are obvious from context may be omitted:" and " Unused parameters that might not be obvious should comment". So I would agree that in this case it is obvious and hence could be omited.


- Joerg


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


On March 14, 2016, 5:48 p.m., Alexander Rukletsov wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/44652/
> -----------------------------------------------------------
> 
> (Updated March 14, 2016, 5:48 p.m.)
> 
> 
> Review request for mesos, Ben Mahler and Joerg Schad.
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> See summary.
> 
> 
> Diffs
> -----
> 
>   src/launcher/executor.cpp 4149f084b0b234fb995df04e9d1ca704feec082e 
> 
> Diff: https://reviews.apache.org/r/44652/diff/
> 
> 
> Testing
> -------
> 
> The complete chain was tested. See https://reviews.apache.org/r/44662/.
> 
> 
> Thanks,
> 
> Alexander Rukletsov
> 
>


Re: Review Request 44652: Omitted names of unused parameters in command executor.

Posted by Ben Mahler <be...@gmail.com>.

> On March 10, 2016, 5:56 p.m., Joerg Schad wrote:
> > src/launcher/executor.cpp, line 124
> > <https://reviews.apache.org/r/44652/diff/1/?file=1294474#file1294474line124>
> >
> >     Not sure whether we have a real style for that, but the example I seen (and used myself) are to comment the name. See https://github.com/apache/mesos/blob/master/3rdparty/libprocess/src/openssl.cpp#L155 for an example.
> >     In this case I don't believe it makes a large difference as the Type is descriptive enough, but that might be different with more general types (imagine a string).

The openssl file is pretty new, I think the general style for this has not been to use `/* */` comments but rather to leave the name or omit the name.


- Ben


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


On March 14, 2016, 5:48 p.m., Alexander Rukletsov wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/44652/
> -----------------------------------------------------------
> 
> (Updated March 14, 2016, 5:48 p.m.)
> 
> 
> Review request for mesos, Ben Mahler and Joerg Schad.
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> See summary.
> 
> 
> Diffs
> -----
> 
>   src/launcher/executor.cpp 4149f084b0b234fb995df04e9d1ca704feec082e 
> 
> Diff: https://reviews.apache.org/r/44652/diff/
> 
> 
> Testing
> -------
> 
> The complete chain was tested. See https://reviews.apache.org/r/44662/.
> 
> 
> Thanks,
> 
> Alexander Rukletsov
> 
>


Re: Review Request 44652: Omitted names of unused parameters in command executor.

Posted by Alexander Rukletsov <ru...@gmail.com>.

> On March 10, 2016, 5:56 p.m., Joerg Schad wrote:
> > src/launcher/executor.cpp, line 124
> > <https://reviews.apache.org/r/44652/diff/1/?file=1294474#file1294474line124>
> >
> >     Not sure whether we have a real style for that, but the example I seen (and used myself) are to comment the name. See https://github.com/apache/mesos/blob/master/3rdparty/libprocess/src/openssl.cpp#L155 for an example.
> >     In this case I don't believe it makes a large difference as the Type is descriptive enough, but that might be different with more general types (imagine a string).
> 
> Ben Mahler wrote:
>     The openssl file is pretty new, I think the general style for this has not been to use `/* */` comments but rather to leave the name or omit the name.
> 
> Joerg Schad wrote:
>     I guess the Google Styleguide (https://google.github.io/styleguide/cppguide.html#Function_Declarations_and_Definitions) states "Unused parameters that are obvious from context may be omitted:" and " Unused parameters that might not be obvious should comment". So I would agree that in this case it is obvious and hence could be omited.

I would vote for consistency and settle on either omitting the name or enclosing it in /* */. I'm fine with following the google guide, but it looks like we should agree on this first. Discarding for now.


- Alexander


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


On March 14, 2016, 5:48 p.m., Alexander Rukletsov wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/44652/
> -----------------------------------------------------------
> 
> (Updated March 14, 2016, 5:48 p.m.)
> 
> 
> Review request for mesos, Ben Mahler and Joerg Schad.
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> See summary.
> 
> 
> Diffs
> -----
> 
>   src/launcher/executor.cpp 4149f084b0b234fb995df04e9d1ca704feec082e 
> 
> Diff: https://reviews.apache.org/r/44652/diff/
> 
> 
> Testing
> -------
> 
> The complete chain was tested. See https://reviews.apache.org/r/44662/.
> 
> 
> Thanks,
> 
> Alexander Rukletsov
> 
>


Re: Review Request 44652: Omitted names of unused parameters in command executor.

Posted by Joerg Schad <jo...@mesosphere.io>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/44652/#review122944
-----------------------------------------------------------


Fix it, then Ship it!





src/launcher/executor.cpp (line 124)
<https://reviews.apache.org/r/44652/#comment185048>

    Not sure whether we have a real style for that, but the example I seen (and used myself) are to comment the name. See https://github.com/apache/mesos/blob/master/3rdparty/libprocess/src/openssl.cpp#L155 for an example.
    In this case I don't believe it makes a large difference as the Type is descriptive enough, but that might be different with more general types (imagine a string).


- Joerg Schad


On March 10, 2016, 5:14 p.m., Alexander Rukletsov wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/44652/
> -----------------------------------------------------------
> 
> (Updated March 10, 2016, 5:14 p.m.)
> 
> 
> Review request for mesos and Ben Mahler.
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> See summary.
> 
> 
> Diffs
> -----
> 
>   src/launcher/executor.cpp 4149f084b0b234fb995df04e9d1ca704feec082e 
> 
> Diff: https://reviews.apache.org/r/44652/diff/
> 
> 
> Testing
> -------
> 
> The complete chain was tested. See https://reviews.apache.org/r/44662/.
> 
> 
> Thanks,
> 
> Alexander Rukletsov
> 
>


Re: Review Request 44652: Omitted names of unused parameters in command executor.

Posted by Alexander Rukletsov <ru...@gmail.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/44652/
-----------------------------------------------------------

(Updated March 19, 2016, 10:31 a.m.)


Review request for mesos, Ben Mahler and Joerg Schad.


Repository: mesos


Description
-------

See summary.


Diffs
-----

  src/launcher/executor.cpp 4149f084b0b234fb995df04e9d1ca704feec082e 

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


Testing
-------

The complete chain was tested. See https://reviews.apache.org/r/44662/.


Thanks,

Alexander Rukletsov


Re: Review Request 44652: Omitted names of unused parameters in command executor.

Posted by Alexander Rukletsov <ru...@gmail.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/44652/
-----------------------------------------------------------

(Updated March 14, 2016, 5:48 p.m.)


Review request for mesos, Ben Mahler and Joerg Schad.


Repository: mesos


Description
-------

See summary.


Diffs (updated)
-----

  src/launcher/executor.cpp 4149f084b0b234fb995df04e9d1ca704feec082e 

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


Testing
-------

The complete chain was tested. See https://reviews.apache.org/r/44662/.


Thanks,

Alexander Rukletsov


Re: Review Request 44652: Omitted names of unused parameters in command executor.

Posted by Alexander Rukletsov <ru...@gmail.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/44652/
-----------------------------------------------------------

(Updated March 11, 2016, 4 p.m.)


Review request for mesos, Ben Mahler and Joerg Schad.


Repository: mesos


Description
-------

See summary.


Diffs (updated)
-----

  src/launcher/executor.cpp 4149f084b0b234fb995df04e9d1ca704feec082e 

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


Testing
-------

The complete chain was tested. See https://reviews.apache.org/r/44662/.


Thanks,

Alexander Rukletsov