Commit e892dc54 authored by Nicholas Ormrod's avatar Nicholas Ormrod Committed by Sara Golemon

Fix #includes

Summary:
A few of folly's includes do not start with folly/, and so were
missed by D1411225's include-quotation ##""## -> ##<>## transformation change.
There were also some folly includes in deeper folly directories and the
docs, which I also fixed.

The search ##egrep "# *include *\"" -R folly/*## now only includes two
lines in FBString.h, which are included for libgcc purposes.

The wangle/test/Thens.cpp file, which is auto-generated, was special.
I changed the generator .rb script, but when I ran it I overwrote some
manual changes to Thens.cpp. For simplicity, I have manually applied the
change to Thens.cpp as well.

Test Plan: fbconfig -r folly && fbmake runtests

Reviewed By: hannesr@fb.com

Subscribers: sdwilsh, fugalh

FB internal diff: D1511712
parent a42878e3
......@@ -296,6 +296,6 @@ class AtomicHashArray : boost::noncopyable {
} // namespace folly
#include "AtomicHashArray-inl.h"
#include <folly/AtomicHashArray-inl.h>
#endif // FOLLY_ATOMICHASHARRAY_H_
......@@ -410,6 +410,6 @@ class AtomicHashMap : boost::noncopyable {
} // namespace folly
#include "AtomicHashMap-inl.h"
#include <folly/AtomicHashMap-inl.h>
#endif // FOLLY_ATOMICHASHMAP_H_
......@@ -16,10 +16,10 @@
// @author Andrei Alexandrescu (andrei.alexandrescu@fb.com)
#include "Benchmark.h"
#include "Foreach.h"
#include "json.h"
#include "String.h"
#include <folly/Benchmark.h>
#include <folly/Foreach.h>
#include <folly/json.h>
#include <folly/String.h>
#include <algorithm>
#include <boost/regex.hpp>
......
......@@ -14,7 +14,7 @@
* limitations under the License.
*/
#include "IPAddress.h"
#include <folly/IPAddress.h>
#include <limits>
#include <ostream>
......
......@@ -14,7 +14,7 @@
* limitations under the License.
*/
#include "IPAddressV4.h"
#include <folly/IPAddressV4.h>
#include <ostream>
#include <string>
......
......@@ -14,7 +14,7 @@
* limitations under the License.
*/
#include "IPAddressV6.h"
#include <folly/IPAddressV6.h>
#include <ostream>
#include <string>
......
......@@ -14,7 +14,7 @@
* limitations under the License.
*/
#include "LifoSem.h"
#include <folly/LifoSem.h>
/// Raw node storage is preallocated in a contiguous memory segment,
/// but we use an anonymous mmap so the physical memory used (RSS) will
......
......@@ -14,7 +14,7 @@
* limitations under the License.
*/
#include "MacAddress.h"
#include <folly/MacAddress.h>
#include <folly/Exception.h>
#include <folly/IPAddressV6.h>
......
......@@ -18,7 +18,7 @@
#define FOLLY_PORTABILITY_H_
#ifndef FOLLY_NO_CONFIG
#include "folly-config.h"
#include <folly/folly-config.h>
#endif
#ifdef FOLLY_PLATFORM_CONFIG
......@@ -29,7 +29,7 @@
#include <features.h>
#endif
#include "CPortability.h"
#include <folly/CPortability.h>
#if FOLLY_HAVE_SCHED_H
#include <sched.h>
......
......@@ -17,7 +17,7 @@
#pragma once
#include <pthread.h>
#include "Range.h"
#include <folly/Range.h>
namespace folly {
......
......@@ -14,7 +14,7 @@
* limitations under the License.
*/
#include "MemoryIdler.h"
#include <folly/detail/MemoryIdler.h>
#include <folly/Logging.h>
#include <folly/Malloc.h>
#include <folly/ScopeGuard.h>
......
......@@ -22,7 +22,7 @@
#include <folly/AtomicStruct.h>
#include <folly/Hash.h>
#include <folly/Traits.h>
#include "Futex.h"
#include <folly/detail/Futex.h>
namespace folly {
......
......@@ -16,8 +16,8 @@ build (either directly or packaged with a library).
Using `folly/Benchmark.h` is very simple. Here's an example:
``` Cpp
#include "folly/Benchmark.h"
#include "folly/Foreach.h"
#include <folly/Benchmark.h>
#include <folly/Foreach.h>
#include <vector>
using namespace std;
using namespace folly;
......@@ -70,8 +70,8 @@ passed by the framework down to the function. The type of the count is
implicitly `unsigned`. Consider a slightly reworked example:
``` Cpp
#include "folly/Benchmark.h"
#include "folly/Foreach.h"
#include <folly/Benchmark.h>
#include <folly/Foreach.h>
#include <vector>
using namespace std;
using namespace folly;
......@@ -126,8 +126,8 @@ front insertion for a vector as a baseline and see how back insertion
compares with it:
``` Cpp
#include "folly/Benchmark.h"
#include "folly/Foreach.h"
#include <folly/Benchmark.h>
#include <folly/Foreach.h>
#include <vector>
using namespace std;
using namespace folly;
......
......@@ -33,7 +33,7 @@ At the top level Folly uses the classic "stuttering" scheme
`folly/folly` used by Boost and others. The first directory serves as
an installation root of the library (with possible versioning a la
`folly-1.0/`), and the second is to distinguish the library when
including files, e.g. `#include "folly/FBString.h"`.
including files, e.g. `#include <folly/FBString.h>`.
The directory structure is flat (mimicking the namespace structure),
i.e. we don't have an elaborate directory hierarchy (it is possible
......
......@@ -23,7 +23,7 @@
#ifndef FOLLY_SMALL_VECTOR_H_
#define FOLLY_SMALL_VECTOR_H_
#include "Portability.h"
#include <folly/Portability.h>
#include <stdexcept>
#include <cstdlib>
......@@ -49,7 +49,7 @@
#include <folly/Malloc.h>
#if defined(__GNUC__) && FOLLY_X64
# include "folly/SmallLocks.h"
# include <folly/SmallLocks.h>
# define FB_PACK_ATTR FOLLY_PACK_ATTR
# define FB_PACK_PUSH FOLLY_PACK_PUSH
# define FB_PACK_POP FOLLY_PACK_POP
......
......@@ -14,7 +14,7 @@
* limitations under the License.
*/
#include "DeterministicSchedule.h"
#include <folly/test/DeterministicSchedule.h>
#include <algorithm>
#include <list>
#include <mutex>
......
......@@ -14,7 +14,7 @@
* limitations under the License.
*/
#include "DeterministicSchedule.h"
#include <folly/test/DeterministicSchedule.h>
#include <gflags/gflags.h>
#include <gtest/gtest.h>
......
......@@ -14,7 +14,7 @@
* limitations under the License.
*/
#include "IPAddressTest.h"
#include <folly/test/IPAddressTest.h>
#include <gtest/gtest.h>
......
......@@ -16,7 +16,7 @@
#pragma once
#include "detail/State.h"
#include <folly/wangle/detail/State.h>
#include <folly/LifoSem.h>
namespace folly { namespace wangle {
......
......@@ -24,8 +24,8 @@
#include <vector>
#include <folly/MoveWrapper.h>
#include "Promise.h"
#include "Try.h"
#include <folly/wangle/Promise.h>
#include <folly/wangle/Try.h>
namespace folly { namespace wangle {
......@@ -339,4 +339,4 @@ Future<T> waitWithSemaphore(Future<T>&& f, Duration timeout);
}} // folly::wangle
#include "Future-inl.h"
#include <folly/wangle/Future-inl.h>
......@@ -15,8 +15,8 @@
*/
#pragma once
#include "ThreadGate.h"
#include "Executor.h"
#include <folly/wangle/ThreadGate.h>
#include <folly/wangle/Executor.h>
#include <type_traits>
namespace folly { namespace wangle {
......
......@@ -208,4 +208,4 @@ class Later {
}}
#include "Later-inl.h"
#include <folly/wangle/Later-inl.h>
......@@ -14,7 +14,7 @@
* limitations under the License.
*/
#include "ManualExecutor.h"
#include <folly/wangle/ManualExecutor.h>
#include <string.h>
#include <string>
......
......@@ -16,7 +16,7 @@
#pragma once
#include "Promise.h"
#include <folly/wangle/Promise.h>
namespace folly { namespace wangle {
......
......@@ -19,8 +19,8 @@
#include <atomic>
#include <thread>
#include "WangleException.h"
#include "detail/State.h"
#include <folly/wangle/WangleException.h>
#include <folly/wangle/detail/State.h>
namespace folly { namespace wangle {
......
......@@ -16,8 +16,8 @@
#pragma once
#include "Try.h"
#include "Future.h"
#include <folly/wangle/Try.h>
#include <folly/wangle/Future.h>
namespace folly { namespace wangle {
......@@ -91,4 +91,4 @@ private:
}}
#include "Promise-inl.h"
#include <folly/wangle/Promise-inl.h>
......@@ -14,7 +14,7 @@
* limitations under the License.
*/
#include "QueuedImmediateExecutor.h"
#include <folly/wangle/QueuedImmediateExecutor.h>
#include <folly/ThreadLocal.h>
#include <queue>
......
......@@ -14,7 +14,7 @@
* limitations under the License.
*/
#include "ThreadGate.h"
#include <folly/wangle/ThreadGate.h>
#include <stdexcept>
namespace folly { namespace wangle {
......
......@@ -16,7 +16,7 @@
#pragma once
#include <memory>
#include "Future.h"
#include <folly/wangle/Future.h>
namespace folly { namespace wangle {
......
......@@ -18,7 +18,7 @@
#include <stdexcept>
#include "WangleException.h"
#include <folly/wangle/WangleException.h>
namespace folly { namespace wangle {
......
......@@ -121,4 +121,4 @@ makeTryFunction(F&& f);
}}
#include "Try-inl.h"
#include <folly/wangle/Try-inl.h>
// This file is @generated by thens.rb
#include "Thens.h"
#include <folly/wangle/test/Thens.h>
#ifndef __clang__
// TODO: fails to compile with clang:dev. See task #4412111
......
......@@ -61,7 +61,7 @@ tests = (
print <<EOF
// This file is #{"@"}generated by thens.rb
#include "Thens.h"
#include <folly/wangle/test/Thens.h>
TEST(Future, thenVariants) {
SomeClass anObject;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment