facebook / wangle

Wangle is a framework providing a set of common client/server abstractions for building services in a consistent, modular, and composable way.
Apache License 2.0
3.05k stars 537 forks source link

compiling failure when building AsyncSocketHandlerTest.cpp.o on Ubuntu 14.04 #15

Closed zach-yu closed 8 years ago

zach-yu commented 8 years ago

It seems that lasted folly has make Future copy ctor deleted, which is used in AsyncSocketHandlerTest.cpp.

Scanning dependencies of target AsyncSocketHandlerTest [ 2%] Building CXX object CMakeFiles/AsyncSocketHandlerTest.dir/channel/test/AsyncSocketHandlerTest.cpp.o In file included from /home/zed/fbthrift/thrift/build/deps/wangle/wangle/gmock/src/gmock/include/gmock/gmock-generated-function-mockers.h:43:0, from /home/zed/fbthrift/thrift/build/deps/wangle/wangle/gmock/src/gmock/include/gmock/gmock.h:61, from /home/zed/fbthrift/thrift/build/deps/wangle/wangle/../wangle/channel/test/MockHandler.h:13, from /home/zed/fbthrift/thrift/build/deps/wangle/wangle/channel/test/AsyncSocketHandlerTest.cpp:14: /home/zed/fbthrift/thrift/build/deps/wangle/wangle/gmock/src/gmock/include/gmock/gmock-spec-builders.h: In instantiation of ‘T testing::internal::ActionResultHolder::GetValueAndDelete() const [with T = folly::Futurefolly::Unit]’: /home/zed/fbthrift/thrift/build/deps/wangle/wangle/gmock/src/gmock/include/gmock/gmock-spec-builders.h:1530:60: required from ‘testing::internal::FunctionMockerBase::Result testing::internal::FunctionMockerBase::InvokeWith(const ArgumentTuple&) [with F = folly::Futurefolly::Unit(wangle::HandlerContext<folly::IOBufQueue&, std::uniqueptr >, std::shared_ptrfolly::IOBuf); testing::internal::FunctionMockerBase::Result = folly::Futurefolly::Unit; testing::internal::FunctionMockerBase::ArgumentTuple = std::tuple<wangle::HandlerContext<folly::IOBufQueue&, std::unique_ptr<folly::IOBuf, std::defaultdelete > >, std::shared_ptrfolly::IOBuf >]’ /home/zed/fbthrift/thrift/build/deps/wangle/wangle/gmock/src/gmock/include/gmock/gmock-generated-function-mockers.h:118:50: required from ‘R testing::internal::FunctionMocker<R(A1, A2)>::Invoke(A1, A2) [with R = folly::Futurefolly::Unit; A1 = wangle::HandlerContext<folly::IOBufQueue&, std::unique_ptr >*; A2 = std::sharedptrfolly::IOBuf]’ /home/zed/fbthrift/thrift/build/deps/wangle/wangle/../wangle/channel/test/MockHandler.h:73:3: required from here /home/zed/fbthrift/thrift/build/deps/wangle/wangle/gmock/src/gmock/include/gmock/gmock-spec-builders.h:1330:20: error: use of deleted function ‘folly::Future::Future(const folly::Future&) [with T = folly::Unit]’ T retval(value); ^ In file included from /home/zed/fbthrift/thrift/build/deps/wangle/wangle/../wangle/channel/Handler.h:13:0, from /home/zed/fbthrift/thrift/build/deps/wangle/wangle/../wangle/channel/AsyncSocketHandler.h:13, from /home/zed/fbthrift/thrift/build/deps/wangle/wangle/channel/test/AsyncSocketHandlerTest.cpp:12: /usr/local/include/folly/futures/Future.h:50:3: error: declared here Future(Future const&) = delete;

djwatson commented 8 years ago

should be fixed

abhiguru commented 8 years ago

I am getting a similar error no in AsyncHandler but on using folly::via(executor, ...) code here https://gist.github.com/abhiguru/d90bae044c6a06e2e742 Error details here https://gist.github.com/abhiguru/7a35edeb54c0870e4850 does it seem related? Or a separate issue is needed ?