You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@mesos.apache.org by Dominic Hamon <dh...@twopensource.com> on 2014/02/26 00:31:05 UTC

Review Request 18489: Changed string returns to const references.

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

Review request for mesos, Benjamin Hindman and Ben Mahler.


Repository: mesos-git


Description
-------

See summary


Diffs
-----

  3rdparty/libprocess/3rdparty/stout/include/stout/result.hpp 951a1136f0aa7d8ab156c09e76bbae1bc84924a2 
  3rdparty/libprocess/3rdparty/stout/include/stout/try.hpp d99b75aeae10319b574c67beeb6023358cac7aec 

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


Testing
-------

make check


Thanks,

Dominic Hamon


Re: Review Request 18489: Changed string returns to const references.

Posted by Jiang Yan Xu <ya...@jxu.me>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/18489/#review38473
-----------------------------------------------------------

Ship it!


Ship It!

- Jiang Yan Xu


On March 25, 2014, 10:12 a.m., Dominic Hamon wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/18489/
> -----------------------------------------------------------
> 
> (Updated March 25, 2014, 10:12 a.m.)
> 
> 
> Review request for mesos, Benjamin Hindman and Ben Mahler.
> 
> 
> Repository: mesos-git
> 
> 
> Description
> -------
> 
> See summary
> 
> 
> Diffs
> -----
> 
>   3rdparty/libprocess/3rdparty/stout/include/stout/result.hpp 3a10379f13bdf9ff9e6d424ed1877539c30f2731 
>   3rdparty/libprocess/3rdparty/stout/include/stout/try.hpp d99b75aeae10319b574c67beeb6023358cac7aec 
> 
> Diff: https://reviews.apache.org/r/18489/diff/
> 
> 
> Testing
> -------
> 
> make check
> 
> 
> Thanks,
> 
> Dominic Hamon
> 
>


Re: Review Request 18489: Changed Try::error and Result::error to return const references.

Posted by Dominic Hamon <dh...@twopensource.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/18489/
-----------------------------------------------------------

(Updated Aug. 11, 2014, 4:10 p.m.)


Review request for mesos, Benjamin Hindman and Ben Mahler.


Changes
-------

updated summary/commit message


Summary (updated)
-----------------

Changed Try::error and Result::error to return const references.


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


Repository: mesos-git


Description
-------

See summary


Diffs (updated)
-----

  3rdparty/libprocess/3rdparty/stout/include/stout/result.hpp 3a10379f13bdf9ff9e6d424ed1877539c30f2731 
  3rdparty/libprocess/3rdparty/stout/include/stout/try.hpp d99b75aeae10319b574c67beeb6023358cac7aec 

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


Testing
-------

make check


Thanks,

Dominic Hamon


Re: Review Request 18489: Changed Try::error and Result::error to return const references.

Posted by Dominic Hamon <dh...@twopensource.com>.

> On Aug. 11, 2014, 3:57 p.m., Ben Mahler wrote:
> > Thanks Dominic, a few suggestions:
> > 
> > (1) What about a clearer review subject (commit message): 'Changed Result::error() and Try::error() to return const references."
> > 
> > (2) Since 'make check' can miss callers that take a const reference that will now go out of scope and become invalid, can you do a visual audit of all the callers before you commit this change?
> > 
> > Will you be following through with Future::failure()? Same thing applies there.

1. done
2. done - everything is either copied into a string or appended to another string (thus copied to a string).

i didn't see a ticket for failure. i can add something.


- Dominic


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


On Aug. 11, 2014, 4:10 p.m., Dominic Hamon wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/18489/
> -----------------------------------------------------------
> 
> (Updated Aug. 11, 2014, 4:10 p.m.)
> 
> 
> Review request for mesos, Benjamin Hindman and Ben Mahler.
> 
> 
> Bugs: MESOS-1147
>     https://issues.apache.org/jira/browse/MESOS-1147
> 
> 
> Repository: mesos-git
> 
> 
> Description
> -------
> 
> See summary
> 
> 
> Diffs
> -----
> 
>   3rdparty/libprocess/3rdparty/stout/include/stout/result.hpp 3a10379f13bdf9ff9e6d424ed1877539c30f2731 
>   3rdparty/libprocess/3rdparty/stout/include/stout/try.hpp d99b75aeae10319b574c67beeb6023358cac7aec 
> 
> Diff: https://reviews.apache.org/r/18489/diff/
> 
> 
> Testing
> -------
> 
> make check
> 
> 
> Thanks,
> 
> Dominic Hamon
> 
>


Re: Review Request 18489: Changed string returns to const references.

Posted by Ben Mahler <be...@gmail.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/18489/#review50256
-----------------------------------------------------------

Ship it!


Thanks Dominic, a few suggestions:

(1) What about a clearer review subject (commit message): 'Changed Result::error() and Try::error() to return const references."

(2) Since 'make check' can miss callers that take a const reference that will now go out of scope and become invalid, can you do a visual audit of all the callers before you commit this change?

Will you be following through with Future::failure()? Same thing applies there.

- Ben Mahler


On Aug. 11, 2014, 10:43 p.m., Dominic Hamon wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/18489/
> -----------------------------------------------------------
> 
> (Updated Aug. 11, 2014, 10:43 p.m.)
> 
> 
> Review request for mesos, Benjamin Hindman and Ben Mahler.
> 
> 
> Bugs: MESOS-1147
>     https://issues.apache.org/jira/browse/MESOS-1147
> 
> 
> Repository: mesos-git
> 
> 
> Description
> -------
> 
> See summary
> 
> 
> Diffs
> -----
> 
>   3rdparty/libprocess/3rdparty/stout/include/stout/result.hpp 3a10379f13bdf9ff9e6d424ed1877539c30f2731 
>   3rdparty/libprocess/3rdparty/stout/include/stout/try.hpp d99b75aeae10319b574c67beeb6023358cac7aec 
> 
> Diff: https://reviews.apache.org/r/18489/diff/
> 
> 
> Testing
> -------
> 
> make check
> 
> 
> Thanks,
> 
> Dominic Hamon
> 
>


Re: Review Request 18489: Changed string returns to const references.

Posted by Dominic Hamon <dh...@twopensource.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/18489/
-----------------------------------------------------------

(Updated Aug. 11, 2014, 3:43 p.m.)


Review request for mesos, Benjamin Hindman and Ben Mahler.


Changes
-------

rebased


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


Repository: mesos-git


Description
-------

See summary


Diffs (updated)
-----

  3rdparty/libprocess/3rdparty/stout/include/stout/result.hpp 3a10379f13bdf9ff9e6d424ed1877539c30f2731 
  3rdparty/libprocess/3rdparty/stout/include/stout/try.hpp d99b75aeae10319b574c67beeb6023358cac7aec 

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


Testing
-------

make check


Thanks,

Dominic Hamon


Re: Review Request 18489: Changed string returns to const references.

Posted by Mesos ReviewBot <de...@mesos.apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/18489/#review39123
-----------------------------------------------------------


Bad patch!

Reviews applied: [18489]

Failed command: make -j3 check GTEST_FILTER='' >/dev/null

Error:
 ev.c:1531:31: warning: 'ev_default_loop_ptr' initialized and declared 'extern' [enabled by default]
ev.c: In function 'evpipe_write':
ev.c:2160:17: warning: ignoring return value of 'write', declared with attribute warn_unused_result [-Wunused-result]
ev.c:2172:17: warning: ignoring return value of 'write', declared with attribute warn_unused_result [-Wunused-result]
ev.c: In function 'pipecb':
ev.c:2193:16: warning: ignoring return value of 'read', declared with attribute warn_unused_result [-Wunused-result]
ev.c:2207:16: warning: ignoring return value of 'read', declared with attribute warn_unused_result [-Wunused-result]
In file included from /usr/include/c++/4.6/ext/hash_set:61:0,
                 from src/glog/stl_logging.h:54,
                 from src/stl_logging_unittest.cc:34:
/usr/include/c++/4.6/backward/backward_warning.h:33:2: warning: #warning This file includes at least one deprecated or antiquated header which may be removed without further notice at a future date. Please use a non-deprecated interface with equivalent functionality instead. For a listing of replacement headers and interfaces, consult the file backward_warning.h. To disable this warning use -Wno-deprecated. [-Wcpp]
In file included from src/utilities.h:73:0,
                 from src/googletest.h:38,
                 from src/stl_logging_unittest.cc:48:
src/base/mutex.h:137:0: warning: "_XOPEN_SOURCE" redefined [enabled by default]
/usr/include/features.h:166:0: note: this is the location of the previous definition
warning: no files found matching 'Makefile' under directory 'docs'
warning: no files found matching 'indexsidebar.html' under directory 'docs'
zip_safe flag not set; analyzing archive contents...
WARNING: '.' not a valid package name; please use only.-separated package names in setup.py
package init file 'src/__init__.py' not found (or not a regular file)
cc1plus: warning: command line option '-Wstrict-prototypes' is valid for Ada/C/ObjC but not for C++ [enabled by default]
cc1plus: warning: command line option '-Wstrict-prototypes' is valid for Ada/C/ObjC but not for C++ [enabled by default]
cc1plus: warning: command line option '-Wstrict-prototypes' is valid for Ada/C/ObjC but not for C++ [enabled by default]
cc1plus: warning: command line option '-Wstrict-prototypes' is valid for Ada/C/ObjC but not for C++ [enabled by default]
cc1plus: warning: command line option '-Wstrict-prototypes' is valid for Ada/C/ObjC but not for C++ [enabled by default]
zip_safe flag not set; analyzing archive contents...
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
make[3]: *** [check-local] Segmentation fault
make[2]: *** [check-am] Error 2
make[1]: *** [check] Error 2
make: *** [check-recursive] Error 1


- Mesos ReviewBot


On March 26, 2014, 6:53 p.m., Dominic Hamon wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/18489/
> -----------------------------------------------------------
> 
> (Updated March 26, 2014, 6:53 p.m.)
> 
> 
> Review request for mesos, Benjamin Hindman and Ben Mahler.
> 
> 
> Bugs: MESOS-1147
>     https://issues.apache.org/jira/browse/MESOS-1147
> 
> 
> Repository: mesos-git
> 
> 
> Description
> -------
> 
> See summary
> 
> 
> Diffs
> -----
> 
>   3rdparty/libprocess/3rdparty/stout/include/stout/result.hpp 3a10379f13bdf9ff9e6d424ed1877539c30f2731 
>   3rdparty/libprocess/3rdparty/stout/include/stout/try.hpp d99b75aeae10319b574c67beeb6023358cac7aec 
> 
> Diff: https://reviews.apache.org/r/18489/diff/
> 
> 
> Testing
> -------
> 
> make check
> 
> 
> Thanks,
> 
> Dominic Hamon
> 
>


Re: Review Request 18489: Changed string returns to const references.

Posted by Adam B <ad...@mesosphere.io>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/18489/#review39119
-----------------------------------------------------------

Ship it!


Ship It!

- Adam B


On March 26, 2014, 11:53 a.m., Dominic Hamon wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/18489/
> -----------------------------------------------------------
> 
> (Updated March 26, 2014, 11:53 a.m.)
> 
> 
> Review request for mesos, Benjamin Hindman and Ben Mahler.
> 
> 
> Bugs: MESOS-1147
>     https://issues.apache.org/jira/browse/MESOS-1147
> 
> 
> Repository: mesos-git
> 
> 
> Description
> -------
> 
> See summary
> 
> 
> Diffs
> -----
> 
>   3rdparty/libprocess/3rdparty/stout/include/stout/result.hpp 3a10379f13bdf9ff9e6d424ed1877539c30f2731 
>   3rdparty/libprocess/3rdparty/stout/include/stout/try.hpp d99b75aeae10319b574c67beeb6023358cac7aec 
> 
> Diff: https://reviews.apache.org/r/18489/diff/
> 
> 
> Testing
> -------
> 
> make check
> 
> 
> Thanks,
> 
> Dominic Hamon
> 
>


Re: Review Request 18489: Changed string returns to const references.

Posted by Dominic Hamon <dh...@twopensource.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/18489/
-----------------------------------------------------------

(Updated March 26, 2014, 11:53 a.m.)


Review request for mesos, Benjamin Hindman and Ben Mahler.


Changes
-------

added bug


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


Repository: mesos-git


Description
-------

See summary


Diffs
-----

  3rdparty/libprocess/3rdparty/stout/include/stout/result.hpp 3a10379f13bdf9ff9e6d424ed1877539c30f2731 
  3rdparty/libprocess/3rdparty/stout/include/stout/try.hpp d99b75aeae10319b574c67beeb6023358cac7aec 

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


Testing
-------

make check


Thanks,

Dominic Hamon


Re: Review Request 18489: Changed string returns to const references.

Posted by Dominic Hamon <dh...@twopensource.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/18489/
-----------------------------------------------------------

(Updated March 25, 2014, 10:12 a.m.)


Review request for mesos, Benjamin Hindman and Ben Mahler.


Changes
-------

rebased to master


Repository: mesos-git


Description
-------

See summary


Diffs (updated)
-----

  3rdparty/libprocess/3rdparty/stout/include/stout/result.hpp 3a10379f13bdf9ff9e6d424ed1877539c30f2731 
  3rdparty/libprocess/3rdparty/stout/include/stout/try.hpp d99b75aeae10319b574c67beeb6023358cac7aec 

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


Testing
-------

make check


Thanks,

Dominic Hamon


Re: Review Request 18489: Changed string returns to const references.

Posted by Dominic Hamon <dh...@twopensource.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/18489/#review38376
-----------------------------------------------------------


ping

- Dominic Hamon


On Feb. 25, 2014, 3:31 p.m., Dominic Hamon wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/18489/
> -----------------------------------------------------------
> 
> (Updated Feb. 25, 2014, 3:31 p.m.)
> 
> 
> Review request for mesos, Benjamin Hindman and Ben Mahler.
> 
> 
> Repository: mesos-git
> 
> 
> Description
> -------
> 
> See summary
> 
> 
> Diffs
> -----
> 
>   3rdparty/libprocess/3rdparty/stout/include/stout/result.hpp 951a1136f0aa7d8ab156c09e76bbae1bc84924a2 
>   3rdparty/libprocess/3rdparty/stout/include/stout/try.hpp d99b75aeae10319b574c67beeb6023358cac7aec 
> 
> Diff: https://reviews.apache.org/r/18489/diff/
> 
> 
> Testing
> -------
> 
> make check
> 
> 
> Thanks,
> 
> Dominic Hamon
> 
>


Re: Review Request 18489: Changed string returns to const references.

Posted by Mesos ReviewBot <de...@mesos.apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/18489/#review38428
-----------------------------------------------------------


Bad patch!

Reviews applied: [18489]

Failed command: git apply --index 18489.patch

Error:
 error: patch failed: 3rdparty/libprocess/3rdparty/stout/include/stout/result.hpp:118
error: 3rdparty/libprocess/3rdparty/stout/include/stout/result.hpp: patch does not apply


- Mesos ReviewBot


On Feb. 25, 2014, 11:31 p.m., Dominic Hamon wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/18489/
> -----------------------------------------------------------
> 
> (Updated Feb. 25, 2014, 11:31 p.m.)
> 
> 
> Review request for mesos, Benjamin Hindman and Ben Mahler.
> 
> 
> Repository: mesos-git
> 
> 
> Description
> -------
> 
> See summary
> 
> 
> Diffs
> -----
> 
>   3rdparty/libprocess/3rdparty/stout/include/stout/result.hpp 951a1136f0aa7d8ab156c09e76bbae1bc84924a2 
>   3rdparty/libprocess/3rdparty/stout/include/stout/try.hpp d99b75aeae10319b574c67beeb6023358cac7aec 
> 
> Diff: https://reviews.apache.org/r/18489/diff/
> 
> 
> Testing
> -------
> 
> make check
> 
> 
> Thanks,
> 
> Dominic Hamon
> 
>


Re: Review Request 18489: Changed string returns to const references.

Posted by Dominic Hamon <dh...@twopensource.com>.

> On Feb. 27, 2014, 10:37 a.m., Ben Mahler wrote:
> > Should we make the same update to Option in this patch, now that we pulled it out of https://reviews.apache.org/r/18383/ ?

Option doesn't have a method that returns a string.


- Dominic


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


On Feb. 25, 2014, 3:31 p.m., Dominic Hamon wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/18489/
> -----------------------------------------------------------
> 
> (Updated Feb. 25, 2014, 3:31 p.m.)
> 
> 
> Review request for mesos, Benjamin Hindman and Ben Mahler.
> 
> 
> Repository: mesos-git
> 
> 
> Description
> -------
> 
> See summary
> 
> 
> Diffs
> -----
> 
>   3rdparty/libprocess/3rdparty/stout/include/stout/result.hpp 951a1136f0aa7d8ab156c09e76bbae1bc84924a2 
>   3rdparty/libprocess/3rdparty/stout/include/stout/try.hpp d99b75aeae10319b574c67beeb6023358cac7aec 
> 
> Diff: https://reviews.apache.org/r/18489/diff/
> 
> 
> Testing
> -------
> 
> make check
> 
> 
> Thanks,
> 
> Dominic Hamon
> 
>


Re: Review Request 18489: Changed string returns to const references.

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

> On Feb. 27, 2014, 6:37 p.m., Ben Mahler wrote:
> > Should we make the same update to Option in this patch, now that we pulled it out of https://reviews.apache.org/r/18383/ ?
> 
> Dominic Hamon wrote:
>     Option doesn't have a method that returns a string.

:)


- Ben


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


On Feb. 25, 2014, 11:31 p.m., Dominic Hamon wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/18489/
> -----------------------------------------------------------
> 
> (Updated Feb. 25, 2014, 11:31 p.m.)
> 
> 
> Review request for mesos, Benjamin Hindman and Ben Mahler.
> 
> 
> Repository: mesos-git
> 
> 
> Description
> -------
> 
> See summary
> 
> 
> Diffs
> -----
> 
>   3rdparty/libprocess/3rdparty/stout/include/stout/result.hpp 951a1136f0aa7d8ab156c09e76bbae1bc84924a2 
>   3rdparty/libprocess/3rdparty/stout/include/stout/try.hpp d99b75aeae10319b574c67beeb6023358cac7aec 
> 
> Diff: https://reviews.apache.org/r/18489/diff/
> 
> 
> Testing
> -------
> 
> make check
> 
> 
> Thanks,
> 
> Dominic Hamon
> 
>


Re: Review Request 18489: Changed string returns to const references.

Posted by Ben Mahler <be...@gmail.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/18489/#review35662
-----------------------------------------------------------


Should we make the same update to Option in this patch, now that we pulled it out of https://reviews.apache.org/r/18383/ ?

- Ben Mahler


On Feb. 25, 2014, 11:31 p.m., Dominic Hamon wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/18489/
> -----------------------------------------------------------
> 
> (Updated Feb. 25, 2014, 11:31 p.m.)
> 
> 
> Review request for mesos, Benjamin Hindman and Ben Mahler.
> 
> 
> Repository: mesos-git
> 
> 
> Description
> -------
> 
> See summary
> 
> 
> Diffs
> -----
> 
>   3rdparty/libprocess/3rdparty/stout/include/stout/result.hpp 951a1136f0aa7d8ab156c09e76bbae1bc84924a2 
>   3rdparty/libprocess/3rdparty/stout/include/stout/try.hpp d99b75aeae10319b574c67beeb6023358cac7aec 
> 
> Diff: https://reviews.apache.org/r/18489/diff/
> 
> 
> Testing
> -------
> 
> make check
> 
> 
> Thanks,
> 
> Dominic Hamon
> 
>