> On May 18, 2014, 5:01 p.m., Jiang Yan Xu wrote: > > 3rdparty/libprocess/3rdparty/stout/include/stout/flags/parse.hpp, lines > > 81-82 > > <https://reviews.apache.org/r/21565/diff/3/?file=583935#file583935line81> > > > > What if it's a relative path? Who should call os::realpath()? > > Vinod Kone wrote: > Yea. Thats a bit tricky. For now we only support absolute paths. > > Jiang Yan Xu wrote: > Yeah, then in main.cpp we need to check that. But surely in another > review where these flags are used. > > Benjamin Hindman wrote: > How come a relative path is difficult? It would be great to leave a > comment here for posterity so when someone does add relative paths support > they consider the tricky case you're envisioning.
The tricky part is to figure out that the flag value is a relative path. When the value is "foo" it's not easy, AFAICT, to say whether it is a JSON string or a file path. We could say that if the value starts with "{" it's a JSON string but I think that's not enough because " {" and " \n {" are also valid prefixes for a JSON string? Does that make sense? - Vinod ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/21565/#review43326 ----------------------------------------------------------- On May 17, 2014, 1:13 a.m., Vinod Kone wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/21565/ > ----------------------------------------------------------- > > (Updated May 17, 2014, 1:13 a.m.) > > > Review request for mesos, Benjamin Hindman and Ben Mahler. > > > Bugs: MESOS-1344 > https://issues.apache.org/jira/browse/MESOS-1344 > > > Repository: mesos-git > > > Description > ------- > > See summary. > > > Diffs > ----- > > 3rdparty/libprocess/3rdparty/stout/include/stout/flags/parse.hpp > a781f14aec9dc5b6350d8e5452a7131cbb891595 > 3rdparty/libprocess/3rdparty/stout/tests/flags_tests.cpp > ae6d9c1dc0e5f774f668acf62c7dbfbe46529b48 > > Diff: https://reviews.apache.org/r/21565/diff/ > > > Testing > ------- > > stout make check > > > Thanks, > > Vinod Kone > >