1
0
mirror of https://github.com/facebook/proxygen.git synced 2025-08-08 18:02:05 +03:00
Files
Simon Marlow fc2595ea65 New Haskell Indexer
Summary:
Redesigned the schema and rewrote the indexer. Compared with the previous indexer:

* this captures a lot more xrefs (e.g. local variables)
* it has more information (distinguishes functions/classes/constructors etc.)
* it is much simpler and probably faster, because it doesn't go via hiedb, it reads .hie files directly.
* it is probably more correct, I fixed a lot of things.

The schema is carefully designed so that a Name uniquely identifies an entity and corresponds fairly closely to GHC's Name, including OccName. The main difference is we don't store Uniques, instead we distinguish local Names by including their ByteSpan.

There are a couple of snapshot tests, one for the plain indexer and one for the codemarkup layer, and a Glass regression test.

Not done yet:

* we can extract types from the .hie file too, and provide type hovers in Glass. That wouldn't be too hard.

* extracting more structure so that we can reconstruct data/class decls should be possible but it's not straightforward using .hie. I'm still thinking about how best to do that.

X-link: https://github.com/facebookincubator/Glean/pull/511

Reviewed By: rubmary

Differential Revision: D74400980

Pulled By: jjuliamolin

fbshipit-source-id: 6cb183b96ef1c7030c8b7278434f84a4d72ceb28
2025-05-30 06:27:39 -07:00

47 lines
911 B
Plaintext

[manifest]
name = glean
fbsource_path = fbcode/glean
shipit_project = facebookincubator/Glean
use_shipit = true
[shipit.pathmap]
# These are only used by target determinator to trigger builds, the
# real path mappings are in the ShipIt config.
fbcode/glean = glean
fbcode/common/hs = hsthrift
[subprojects]
hsthrift = hsthrift
[dependencies]
cabal
ghc
gflags
glog
folly
rocksdb
xxhash
llvm
clang
re2
[build]
builder = make
[make.build_args]
cabal-update
all
glean-hie
glass
glean-clang
EXTRA_GHC_OPTS=-j4 +RTS -A32m -n4m -RTS
CABAL_CONFIG_FLAGS=-f-hack-tests -f-typescript-tests -f-python-tests -f-dotnet-tests -f-go-tests -f-rust-tests -f-java-lsif-tests -f-flow-tests
[make.install_args]
install
[make.test_args]
test
EXTRA_GHC_OPTS=-j4 +RTS -A32m -n4m -RTS
CABAL_CONFIG_FLAGS=-f-hack-tests -f-typescript-tests -f-python-tests -f-dotnet-tests -f-go-tests -f-rust-tests -f-java-lsif-tests -f-flow-tests