facebook / facebook/watchman

[Folly] Make fails for cpp client

Open
#652 5 comments 2 reactions 0 assignees View on GitHub
Dominant language
C++
Stars
13.7k
Forks
1.1k
PR merge metrics
No merged PRs in 30d

Description

Environment: Ubuntu 18.04
Watchman ver: v4.9.0
Folly version: 2d6a8fcbde9acb7689d49cba543ce39465ccb23b (Tue Oct 16 11:50:35 2018)
Problem:
It seems not related to `folly` going out of sync, but still could be related to versioning problem. It would also be nice to know which version of folly is compatible with latest stable release.

`make` fails with the following error:
```
make all-am
make[1]: Entering directory '/home/ideahitme/watchman'
CXX cppclient/libwatchmanclient_la-WatchmanClient.lo
In file included from /usr/local/include/folly/functional/ApplyTuple.h:25:0,
from /usr/local/include/folly/hash/Hash.h:29,
from /usr/local/include/folly/FBString.h:59,
from /usr/local/include/folly/Demangle.h:19,
from /usr/local/include/folly/ExceptionWrapper.h:33,
from cppclient/WatchmanConnection.h:10,
from cppclient/WatchmanClient.h:52,
from cppclient/WatchmanClient.cpp:4:
/usr/local/include/folly/functional/Invoke.h: In substitution of ‘template using invoke_result_t = typename folly::invoke_result::type [with F = watchman::WatchmanClient::watch(folly::StringPiece)::; Args = {folly::Try&&}]’:
/usr/local/include/folly/futures/Future-pre.h:95:45: required from ‘struct folly::futures::detail::argResult, folly::Try&&>’
/usr/local/include/folly/futures/Future-pre.h:111:54: required from ‘struct folly::futures::detail::callableResult >’
/usr/local/include/folly/futures/Future.h:1183:22: required by substitution of ‘template typename R::Return folly::Future::then(F&&) & [with F = watchman::WatchmanClient::watch(folly::StringPiece)::; R = folly::futures::detail::callableResult >]’
cppclient/WatchmanClient.cpp:89:8: required from here
/usr/local/include/folly/functional/Invoke.h:142:65: error: no type named ‘type’ in ‘struct folly::invoke_result, folly::Try&&>’
using invoke_result_t = typename invoke_result::type;
^
cppclient/WatchmanClient.cpp: In member function ‘folly::Future > watchman::WatchmanClient::watch(folly::StringPiece)’:
cppclient/WatchmanClient.cpp:89:8: error: no matching function for call to ‘folly::Future::then(watchman::WatchmanClient::watch(folly::StringPiece)::)’
});
^
In file included from cppclient/WatchmanConnection.h:13:0,
from cppclient/WatchmanClient.h:52,
from cppclient/WatchmanClient.cpp:4:
/usr/local/include/folly/futures/Future.h:1160:3: note: candidate: template typename std::enable_if<((! folly::is_invocable::value) && folly::is_invocable::value), typename R::Return>::type folly::Future::then(F&&) && [with F = F; R = R; T = folly::dynamic]
then(F&& func) && {
^~~~
/usr/local/include/folly/futures/Future.h:1160:3: note: template argument deduction/substitution failed:
/usr/local/include/folly/futures/Future.h:1168:3: note: candidate: template typename std::enable_if<((! folly::is_invocable::value) && (! folly::is_invocable::value)), typename R::Return>::type folly::Future::then(F&&) && [with F = F; R = R; T = folly::dynamic]
then(F&& func) && {
^~~~
/usr/local/include/folly/futures/Future.h:1168:3: note: template argument deduction/substitution failed:
/usr/local/include/folly/futures/Future.h:1175:3: note: candidate: template typename std::enable_if::value, typename R::Return>::type folly::Future::then(F&&) && [with F = F; R = R; T = folly::dynamic]
then(F&& func) && {
^~~~
/usr/local/include/folly/futures/Future.h:1175:3: note: template argument deduction/substitution failed:
/usr/local/include/folly/futures/Future.h:1183:22: note: candidate: template typename R::Return folly::Future::then(F&&) & [with F = F; R = R; T = folly::dynamic]
typename R::Return then(F&& func) & = delete;
^~~~
/usr/local/include/folly/futures/Future.h:1183:22: note: substitution of deduced template arguments resulted in errors seen above
/usr/local/include/folly/futures/Future.h:1207:39: note: candidate: template folly::Future::Inner> folly::Future::then(R (Caller::*)(Args ...), Caller*) && [with R = R; Caller = Caller; Args = {Args ...}; T = folly::dynamic]
Future::Inner> then(
^~~~
/usr/local/include/folly/futures/Future.h:1207:39: note: template argument deduction/substitution failed:
cppclient/WatchmanClient.cpp:89:8: note: mismatched types ‘R (Caller::*)(Args ...)’ and ‘watchman::WatchmanClient::watch(folly::StringPiece)::’
});
^
In file included from cppclient/WatchmanConnection.h:13:0,
from cppclient/WatchmanClient.h:52,
from cppclient/WatchmanClient.cpp:4:
/usr/local/include/folly/futures/Future.h:1216:3: note: candidate: template folly::Future::Inner> folly::Future::then(R (Caller::*)(Args ...), Caller*) & [with R = R; Caller = Caller; Args = {Args ...}; T = folly::dynamic]
then(R (Caller::*func)(Args...), Caller* instance) & = delete;
^~~~
/usr/local/include/folly/futures/Future.h:1216:3: note: template argument deduction/substitution failed:
cppclient/WatchmanClient.cpp:89:8: note: mismatched types ‘R (Caller::*)(Args ...)’ and ‘watchman::WatchmanClient::watch(folly::StringPiece)::’
});
^
In file included from cppclient/WatchmanConnection.h:13:0,
from cppclient/WatchmanClient.h:52,
from cppclient/WatchmanClient.cpp:4:
/usr/local/include/folly/futures/Future.h:1242:8: note: candidate: template auto folly::Future::then(folly::Executor*, Arg&&) && [with Arg = Arg; T = folly::dynamic]
auto then(Executor* x, Arg&& arg) && {
^~~~
/usr/local/include/folly/futures/Future.h:1242:8: note: template argument deduction/substitution failed:
cppclient/WatchmanClient.cpp:89:8: note: candidate expects 2 arguments, 1 provided
});
^
In file included from cppclient/WatchmanConnection.h:13:0,
from cppclient/WatchmanClient.h:52,
from cppclient/WatchmanClient.cpp:4:
/usr/local/include/folly/futures/Future.h:1256:8: note: candidate: template auto folly::Future::then(folly::Executor*, R (Caller::*)(Args ...), Caller*) && [with R = R; Caller = Caller; Args = {Args ...}; T = folly::dynamic]
auto then(Executor* x, R (Caller::*func)(Args...), Caller* instance) && {
^~~~
/usr/local/include/folly/futures/Future.h:1256:8: note: template argument deduction/substitution failed:
cppclient/WatchmanClient.cpp:89:8: note: candidate expects 3 arguments, 1 provided
});
^
In file included from cppclient/WatchmanConnection.h:13:0,
from cppclient/WatchmanClient.h:52,
from cppclient/WatchmanClient.cpp:4:
/usr/local/include/folly/futures/Future.h:1266:3: note: candidate: template auto folly::Future::then(folly::Executor*, Arg&&, Args&& ...) & [with Arg = Arg; Args = {Args ...}; T = folly::dynamic]
then(Executor* x, Arg&& arg, Args&&... args) & = delete;
^~~~
/usr/local/include/folly/futures/Future.h:1266:3: note: template argument deduction/substitution failed:
cppclient/WatchmanClient.cpp:89:8: note: candidate expects at least 2 arguments, 1 provided
});
^
In file included from /usr/local/include/folly/futures/Future.h:2061:0,
from cppclient/WatchmanConnection.h:13,
from cppclient/WatchmanClient.h:52,
from cppclient/WatchmanClient.cpp:4:
/usr/local/include/folly/futures/Future-inl.h:1121:14: note: candidate: folly::Future folly::Future::then() && [with T = folly::dynamic]
Future Future::then() && {
^~~~~~~~~
/usr/local/include/folly/futures/Future-inl.h:1121:14: note: candidate expects 0 arguments, 1 provided
cppclient/WatchmanClient.cpp: In member function ‘folly::Future > watchman::WatchmanClient::subscribe(folly::dynamic, watchman::WatchPathPtr, folly::Executor*, watchman::SubscriptionCallback&&)’:
cppclient/WatchmanClient.cpp:113:8: warning: ‘typename std::enable_if<((! folly::is_invocable::value) && folly::is_invocable::value), typename R::Return>::type folly::Future::then(F&&) && [with F = watchman::WatchmanClient::subscribe(folly::dynamic, watchman::WatchPathPtr, folly::Executor*, watchman::SubscriptionCallback&&)::; R = folly::futures::detail::callableResult >; T = folly::dynamic; typename std::enable_if<((! folly::is_invocable::value) && folly::is_invocable::value), typename R::Return>::type = folly::Future >]’ is deprecated: use thenValue instead [-Wdeprecated-declarations]
});
^
In file included from cppclient/WatchmanConnection.h:13:0,
from cppclient/WatchmanClient.h:52,
from cppclient/WatchmanClient.cpp:4:
/usr/local/include/folly/futures/Future.h:1160:3: note: declared here
then(F&& func) && {
^~~~
cppclient/WatchmanClient.cpp: In member function ‘folly::Future > watchman::WatchmanClient::subscribe(const folly::dynamic&, folly::StringPiece, folly::Executor*, watchman::SubscriptionCallback&&)’:
cppclient/WatchmanClient.cpp:124:8: warning: ‘typename std::enable_if<((! folly::is_invocable::value) && folly::is_invocable::value), typename R::Return>::type folly::Future::then(F&&) && [with F = watchman::WatchmanClient::subscribe(const folly::dynamic&, folly::StringPiece, folly::Executor*, watchman::SubscriptionCallback&&)::; R = folly::futures::detail::callableResult, watchman::WatchmanClient::subscribe(const folly::dynamic&, folly::StringPiece, folly::Executor*, watchman::SubscriptionCallback&&):: >; T = std::shared_ptr; typename std::enable_if<((! folly::is_invocable::value) && folly::is_invocable::value), typename R::Return>::type = folly::Future >]’ is deprecated: use thenValue instead [-Wdeprecated-declarations]
});
^
In file included from cppclient/WatchmanConnection.h:13:0,
from cppclient/WatchmanClient.h:52,
from cppclient/WatchmanClient.cpp:4:
/usr/local/include/folly/futures/Future.h:1160:3: note: declared here
then(F&& func) && {
^~~~
Makefile:1960: recipe for target 'cppclient/libwatchmanclient_la-WatchmanClient.lo' failed
make[1]: *** [cppclient/libwatchmanclient_la-WatchmanClient.lo] Error 1
make[1]: Leaving directory '/home/ideahitme/watchman'
Makefile:1101: recipe for target 'all' failed
make: *** [all] Error 2

```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.