mesos-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jie Yu <yujie....@gmail.com>
Subject Re: Review Request 45326: Implemented os::which().
Date Fri, 15 Apr 2016 18:21:43 GMT

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




3rdparty/libprocess/3rdparty/stout/include/stout/os/which.hpp (line 13)
<https://reviews.apache.org/r/45326/#comment192628>

    Instead of putting it in a new file, can you put it in stout/posix/os.hpp for now since
`getenv` is only in stout/posix/os.hpp for now.



3rdparty/libprocess/3rdparty/stout/include/stout/os/which.hpp (line 30)
<https://reviews.apache.org/r/45326/#comment192621>

    Looks like we ignore errors. Should the return value be 'Option'?



3rdparty/libprocess/3rdparty/stout/include/stout/os/which.hpp (line 34)
<https://reviews.apache.org/r/45326/#comment192620>

    Can you do the following to avoid unnecessary indentation?
    ```
    Option<string> path = getenv("PATH");
    if (path.isNone()) {
      return None();
    }
    
    vector<string> tokens = strings::tokenize(path.get(), ":");
    ...
    ```


- Jie Yu


On April 15, 2016, 3:07 p.m., Guangya Liu wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/45326/
> -----------------------------------------------------------
> 
> (Updated April 15, 2016, 3:07 p.m.)
> 
> 
> Review request for mesos, David vonThenen, Gilbert Song, haosdent huang, and Jie Yu.
> 
> 
> Bugs: MESOS-4576
>     https://issues.apache.org/jira/browse/MESOS-4576
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> Implemented os::which().
> 
> 
> Diffs
> -----
> 
>   3rdparty/libprocess/3rdparty/stout/include/Makefile.am 33ddb06e25920096f2d16d4f372129ee2f6a8721

>   3rdparty/libprocess/3rdparty/stout/include/stout/os.hpp a81086860a17bd1912e55051dd7bb98a20772b51

>   3rdparty/libprocess/3rdparty/stout/include/stout/os/which.hpp PRE-CREATION 
>   3rdparty/libprocess/3rdparty/stout/tests/os_tests.cpp 9bd34c7508cd813c5de18028956f6a740997c266

> 
> Diff: https://reviews.apache.org/r/45326/diff/
> 
> 
> Testing
> -------
> 
> make
> make check
> 
> [ RUN      ] OsTest.Which
> [       OK ] OsTest.Which (0 ms)
> 
> 
> Thanks,
> 
> Guangya Liu
> 
>


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