----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/54271/#review157693 -----------------------------------------------------------
Ship it! Ship It! - Joseph Wu On Dec. 1, 2016, 3:48 p.m., Alex Clemmer wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/54271/ > ----------------------------------------------------------- > > (Updated Dec. 1, 2016, 3:48 p.m.) > > > Review request for mesos, Anand Mazumdar, Benjamin Hindman, and Joseph Wu. > > > Repository: mesos > > > Description > ------- > > Fixes build break for OS X 10.10.4, Apple LLVM version 6.1.0 > (clang-602.0.53) (based on LLVM 3.6.0svn), introduced by > c33ba209d226fb91874b00976298faf278a29369. > > In `process::http::internal::sendfile`, a lambda function is passed to a > call to `Future<T>::then`: > > [=]() mutable { > // NOTE: the file descriptor gets closed by FileEncoder. > Encoder* encoder = new FileEncoder(fd.get(), s.st_size); > return send(socket, encoder) > .onAny([=]() { > delete encoder; > }); > } > > This lambda function is intended to return a `Future<Nothing>`, which in > turn is returned by `sendfile` (i.e., `sendfile` is meant to return a > `Future<Nothing>`). But, on the machine specified above, the compiler > infers the type of this lambda to be `Future<Future<Nothing>>`. This > causes a compiler error, since `sendfile` is supposed to return a plain > old `Future<Nothing>`. > > The fix is to simply alter the signature of the labmda to give the > compiler a hint: > > [=]() mutable -> Future<Nothing> { > > Review: https://reviews.apache.org/r/54271 > > > Diffs > ----- > > 3rdparty/libprocess/src/http.cpp ac406e2e5c2d9b38ec453a74cf47ee5f80a875df > > Diff: https://reviews.apache.org/r/54271/diff/ > > > Testing > ------- > > > Thanks, > > Alex Clemmer > >
