mesos-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Marco Massenzio" <>
Subject Re: Review Request 34193: Refactored common functionality into BaseFlags
Date Wed, 20 May 2015 23:22:17 GMT

This is an automatically generated e-mail. To reply, visit:

(Updated May 20, 2015, 11:22 p.m.)

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


More comments changes

Bugs: MESOS-2711

Repository: mesos


Jira: MESOS-2711

Every program that uses stout's `BaseFlags` ends up
re-implementing the `printUsage()` function, and adding
a `bool help` (and associated --help flag); this functionality
has now been refactored in the base class and is available everywhere.

This change attempts to be backward-compatible, so it
does not alter the behavior of the program when --help is
invoked (by, eg, automatically printing usage and exiting)
but leaves up to the caller to check for `` and then
decide what action to take.

There is now a default behavior for the "leader" ("Usage: <prog name> [options]")
but the client API allows to modify that too.

Note - anywhere I found the use of the `--help` flag the behavior was the same: 
print usage and exit (see also

Diffs (updated)

  3rdparty/libprocess/3rdparty/stout/include/stout/flags/flags.hpp fb383b463a99924483634eebf22bf34de318f920

  3rdparty/libprocess/3rdparty/stout/tests/flags_tests.cpp 00281195b53d2597bdb46e3fe6cd9d46a5e9b1f1



make check

**NOTE** this change by itself breaks the build, because the --help is redefined everywhere
(16 places, as of last count): CL 34195 fixes that and makes all build/tests pass.


Marco Massenzio

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