Skip to content

Commit 1bf2dd9

Browse files
committed
0.2 release: build/packaging fixes and a blog post
1 parent 2ae6654 commit 1bf2dd9

16 files changed

Lines changed: 497 additions & 9 deletions

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@
55
* Added `glean-lsp`, a multi-language LSP server based on Glean
66
* Added a new Haskell indexer which consumes `.hie` files directly and
77
collects much richer data than the old indexer.
8+
* Added a new experimental DB backend based on LMDB, which at
9+
least for some benchmarks performs 30-40% faster than RocksDB. Add
10+
the `--lmdb` flag to use it.
811

912
## 0.1.0.0 -- YYYY-mm-dd
1013

glean.cabal.in

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -405,6 +405,7 @@ library storage
405405
include-dirs: .
406406
install-includes:
407407
glean/storage/ffi.h
408+
glean/storage/common.h
408409
glean/storage/db.h
409410
glean/storage/stats.h
410411
build-depends:
@@ -807,6 +808,7 @@ library client-cpp
807808
glean/interprocess/cpp/counters_ffi.h
808809
glean/interprocess/cpp/worklist.h
809810
glean/interprocess/cpp/worklist_ffi.h
811+
glean/schema/cpp/schema.h
810812
build-depends:
811813
glean:rts
812814

glean/lang/clang/action.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,11 @@
66
* LICENSE file in the root directory of this source tree.
77
*/
88

9+
#if GLEAN_FACEBOOK
910
#include "glean/lang/clang/action.h"
11+
#else
12+
#include "action.h"
13+
#endif
1014

1115
#if GLEAN_FACEBOOK && !defined(_WIN32)
1216
#include "common/fbwhoami/FbWhoAmI.h"

glean/lang/clang/ast.cpp

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,16 @@
2323
#include "folly/Overload.h"
2424
#include "folly/ScopeGuard.h"
2525
#include "folly/lang/Assume.h"
26+
27+
#if GLEAN_FACEBOOK
2628
#include "glean/lang/clang/ast.h"
2729
#include "glean/lang/clang/hash.h"
2830
#include "glean/lang/clang/index.h"
31+
#else
32+
#include "ast.h"
33+
#include "hash.h"
34+
#include "index.h"
35+
#endif
2936

3037
// This file implements the Clang AST traversal.
3138

glean/lang/clang/ast.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,11 @@
88

99
#pragma once
1010

11+
#if GLEAN_FACEBOOK
1112
#include "glean/lang/clang/db.h"
13+
#else
14+
#include "db.h"
15+
#endif
1216

1317
namespace facebook::glean::clangx {
1418

glean/lang/clang/db.cpp

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,16 +6,23 @@
66
* LICENSE file in the root directory of this source tree.
77
*/
88

9+
#if GLEAN_FACEBOOK
910
#include "glean/lang/clang/db.h"
11+
#else
12+
#include "db.h"
13+
#endif
14+
1015
#include <llvm/Support/SHA1.h>
1116

1217
#include <folly/Overload.h>
1318

1419
#include <utility>
1520

16-
#include "glean/lang/clang/path.h"
1721
#if GLEAN_FACEBOOK
22+
#include "glean/lang/clang/path.h"
1823
#include "glean/facebook/lang/clang/path.h"
24+
#else
25+
#include "path.h"
1926
#endif
2027

2128
namespace facebook::glean::clangx {

glean/lang/clang/db.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,11 @@
1818
#include <folly/MapUtil.h>
1919
#include <folly/gen/Base.h>
2020

21+
#if GLEAN_FACEBOOK
2122
#include "glean/lang/clang/gleandiagnosticbuffer.h"
23+
#else
24+
#include "gleandiagnosticbuffer.h"
25+
#endif
2226
#include "glean/schema/cpp/schema.h"
2327

2428
namespace facebook::glean::clangx {

glean/lang/clang/glean-clang.cabal

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,16 @@ maintainer: Glean-team@fb.com
1414
copyright: (c) Facebook, All Rights Reserved
1515
build-type: Custom
1616

17+
extra-source-files:
18+
action.h,
19+
ast.h,
20+
db.h,
21+
gleandiagnosticbuffer.h,
22+
hash.h,
23+
index.h,
24+
path.h,
25+
preprocessor.h
26+
1727
-- These bits of code live in their own package because we want the custom setup
1828
-- to detect LLVM/clang, but this is not compatible with glean.cabal's use of
1929
-- multiple (public) libraries:

glean/lang/clang/index.cpp

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,10 +40,19 @@
4040
#include "glean/cpp/sender.h"
4141
#include "glean/interprocess/cpp/counters.h"
4242
#include "glean/interprocess/cpp/worklist.h"
43+
44+
#if GLEAN_FACEBOOK
4345
#include "glean/lang/clang/action.h"
4446
#include "glean/lang/clang/ast.h"
4547
#include "glean/lang/clang/gleandiagnosticbuffer.h"
4648
#include "glean/lang/clang/preprocessor.h"
49+
#else
50+
#include "action.h"
51+
#include "ast.h"
52+
#include "gleandiagnosticbuffer.h"
53+
#include "preprocessor.h"
54+
#endif
55+
4756
#include "glean/rts/binary.h"
4857
#include "glean/rts/inventory.h"
4958

glean/lang/clang/path.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,11 @@
66
* LICENSE file in the root directory of this source tree.
77
*/
88

9+
#if GLEAN_FACEBOOK
910
#include "glean/lang/clang/path.h"
11+
#else
12+
#include "path.h"
13+
#endif
1014

1115
#include <glog/logging.h>
1216
#include <algorithm>

0 commit comments

Comments
 (0)