]> git-server-git.apps.pok.os.sepia.ceph.com Git - rocksdb.git/commitdiff
Fix bad include (#10213)
authorPeter Dillinger <peterd@fb.com>
Tue, 21 Jun 2022 00:42:01 +0000 (17:42 -0700)
committerPeter Dillinger <peterd@fb.com>
Tue, 21 Jun 2022 00:54:08 +0000 (17:54 -0700)
Summary:
include "include/rocksdb/blah.h" is messing up some internal
builds vs. include "rocksdb/blah." This fixes the bad case and adds a
check for future instances.

Pull Request resolved: https://github.com/facebook/rocksdb/pull/10213

Test Plan: back-port to 7.4 release candidate and watch internal build

Reviewed By: hx235

Differential Revision: D37296202

Pulled By: pdillinger

fbshipit-source-id: d7cc6b2c57d858dff0444f19320d83c8b4f9b185

build_tools/check-sources.sh
db/blob/blob_source.h

index fdd40a182279c2223416c6a863458dbe7b0cbb15..5672f7b2b2f89292fde9068ea28311a386ddd125 100755 (executable)
@@ -17,12 +17,18 @@ if [ "$?" != "1" ]; then
   BAD=1
 fi
 
-git grep -n '<rocksdb/' -- ':!build_tools/check-sources.sh'
+git grep -n 'include <rocksdb/' -- ':!build_tools/check-sources.sh'
 if [ "$?" != "1" ]; then
   echo '^^^^^ Use double-quotes as in #include "rocksdb/something.h"'
   BAD=1
 fi
 
+git grep -n 'include "include/rocksdb/' -- ':!build_tools/check-sources.sh'
+if [ "$?" != "1" ]; then
+  echo '^^^^^ Use #include "rocksdb/something.h" instead of #include "include/rocksdb/something.h"'
+  BAD=1
+fi
+
 git grep -n 'using namespace' -- ':!build_tools' ':!docs' \
     ':!third-party/folly/folly/lang/Align.h' \
     ':!third-party/gtest-1.8.1/fused-src/gtest/gtest.h'
index ae4991e5feb02d7766383477e6740e5fcf8afb06..e6f5ff316c62d42f55459defeae4b8c79e3348a8 100644 (file)
@@ -10,7 +10,7 @@
 #include "cache/cache_helpers.h"
 #include "cache/cache_key.h"
 #include "db/blob/blob_file_cache.h"
-#include "include/rocksdb/cache.h"
+#include "rocksdb/cache.h"
 #include "rocksdb/rocksdb_namespace.h"
 #include "table/block_based/cachable_entry.h"