> On June 25, 2014, 1:26 a.m., Ben Mahler wrote: > > Make sure to split apart this change across mesos / libprocess / stout. > > > > At first I thought that this might belong more in mesos than in stout, but > > I see the utility of this now that I understand it better. I think the > > documentation could describe more about what this is to be used for rather > > than how it is to be used. > > > > I can take this from benh if he does not have time to review this.
Thanks Ben! I'll split them when committing. > On June 25, 2014, 1:26 a.m., Ben Mahler wrote: > > 3rdparty/libprocess/3rdparty/stout/include/stout/subcommand.hpp, lines 27-32 > > <https://reviews.apache.org/r/22764/diff/4/?file=614726#file614726line27> > > > > Do we want to say subprocess? Seems like the implementation doesn't > > require that? > > > > Also subcommand implies a command, the command in this context is the > > binary that leverages the subcommand abstraction? > > > > I think we need to emphasize more on what this is to be used for. > > Here's a little blurb that might be useful? > > > > " > > Subcommand is an abstraction for creating command binaries that > > encompass many subcommands. For example: > > > > ./runner start --later > > ./runner stop --now > > > > Here, the 'runner' command contains two Subcommand implementations, > > e.g. StartCommand and StopCommand. > > " Done. Thanks for the suggestion! > On June 25, 2014, 1:26 a.m., Ben Mahler wrote: > > 3rdparty/libprocess/3rdparty/stout/include/stout/subcommand.hpp, lines 76-77 > > <https://reviews.apache.org/r/22764/diff/4/?file=614726#file614726line76> > > > > Instead of requiring an override, could we have a 'name' argument in > > the Subcommand constructor and use that as a member or a non-virtual 'name' > > method? Done. I like that. > On June 25, 2014, 1:26 a.m., Ben Mahler wrote: > > 3rdparty/libprocess/3rdparty/stout/include/stout/subcommand.hpp, lines 83-85 > > <https://reviews.apache.org/r/22764/diff/4/?file=614726#file614726line83> > > > > Should this just be s/getFlags/flags/ similar to how you named 'name()'? Hum, we choose to use this name because the user might very likely define a public 'flags' field which will then conflict with flags(). > On June 25, 2014, 1:26 a.m., Ben Mahler wrote: > > 3rdparty/libprocess/3rdparty/stout/include/stout/subcommand.hpp, line 142 > > <https://reviews.apache.org/r/22764/diff/4/?file=614726#file614726line142> > > > > Do we want to check for duplicate names? Done. > On June 25, 2014, 1:26 a.m., Ben Mahler wrote: > > 3rdparty/libprocess/3rdparty/stout/include/stout/subcommand.hpp, line 145 > > <https://reviews.apache.org/r/22764/diff/4/?file=614726#file614726line145> > > > > Don't you need to shift the argv array before you pass it for flag > > loading? Seems like you don't want to pass the 'subcommand' part of argv. It's OK. It'll just be ignored. - Jie ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/22764/#review46596 ----------------------------------------------------------- On June 21, 2014, 4:53 a.m., Jie Yu wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/22764/ > ----------------------------------------------------------- > > (Updated June 21, 2014, 4:53 a.m.) > > > Review request for mesos and Benjamin Hindman. > > > Bugs: MESOS-1511 > https://issues.apache.org/jira/browse/MESOS-1511 > > > Repository: mesos-git > > > Description > ------- > > See summary. > > > Diffs > ----- > > 3rdparty/libprocess/3rdparty/stout/Makefile.am eac7ab5 > 3rdparty/libprocess/3rdparty/stout/include/stout/subcommand.hpp > PRE-CREATION > 3rdparty/libprocess/src/tests/subprocess_tests.cpp 7dfa384 > src/Makefile.am fd2c80f > src/launcher/launcher.hpp 35cdc69 > src/launcher/launcher.cpp 872e2e8 > src/launcher/main.cpp b497e98 > src/tests/environment.cpp 21b9d1d > src/tests/launcher_tests.cpp e293cc5 > > Diff: https://reviews.apache.org/r/22764/diff/ > > > Testing > ------- > > make check > > > Thanks, > > Jie Yu > >
