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