Commit Graph

4 Commits

Author SHA1 Message Date
Adam Simpkins
dacc8787f3 convert some deprecated Future::then() calls
Summary:
Convert deprecated `folly::Future::then()` calls to `thenTry()` or
`thenValue()` as appropriate.

Reviewed By: chadaustin

Differential Revision: D10503906

fbshipit-source-id: abc0f6f588ad7edd0dd2576544875f4ad0263b83
2018-10-23 13:42:12 -07:00
Lee Howes
e8e25257cf Future<T>::then Future<T>::then() -> Future<T>::thenValue or thenTry.
Summary:
Part of the larger project to modify Future<T>::then to be r-value qualified and use Future<T>::thenTry or Future<T>::thenValue.

The goal is to disambiguate folly::Future and to improve type and lifetime safety of Future and its methods.

Codemod:
  future<T>.then(callable with operator()(not-a-try)) to future<T>.thenValue(callable with operator()(not-a-try)).
  future<T>.then(callable with operator()()) to future<T>.thenValue(callable with operator()(auto&&)).
  future<T>.then(callable with operator()(auto)) to future<T>.thenValue(callable with operator()(auto)).
  future<T>.then(callable with operator()(folly::Try<T>)) to future<T>.thenTry(callable)

Reviewed By: Orvid

Differential Revision: D9819578

fbshipit-source-id: f9e31f47354c041ecbf0a90953cbe50ebfda6adc
2018-09-14 17:10:57 -07:00
Wez Furlong
eda02cdfab fix logic bug in glob prefetching
Summary:
We should only kick off prefetching for the files
that matched the glob.  We were prefetching files that
didn't match the glob.

facepalms

Reviewed By: strager

Differential Revision: D8846994

fbshipit-source-id: 593e85d843ffa1cc0707ed1dc86f1385262821f5
2018-07-16 11:38:15 -07:00
Wez Furlong
2e43c3b76d move GlobNode -> inodes dir
Summary:
This makes it easier to add some test coverage.

There's no real functional change in this diff; the only code change is to
throw a system_error instead of a thrift eden error wrapper class from the core
globbing code.  There's a little bit of code to restore this exception type in
the callers in EdenServiceHandler; this is covered by existing integration
tests, but I've also expanded that coverage to cover both variants of the glob
thrift calls.

Reviewed By: strager

Differential Revision: D8776767

fbshipit-source-id: 3ea4ea642ae5108aa4b0153541bd3604f010b54c
2018-07-13 11:22:19 -07:00