Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add instructions on how to index the GHC code base #37

Open
jvanbruegge opened this issue May 13, 2019 · 2 comments
Open

Add instructions on how to index the GHC code base #37

jvanbruegge opened this issue May 13, 2019 · 2 comments

Comments

@jvanbruegge
Copy link

Hi, I am using the online version of your haskell-code-explorer to quickly jump around the GHC code base. That works great and thank you for creating this. But I was not able to setup the local version with a cloned repo of GHC, could you provide some documentation on how to do that?

@alexwl
Copy link
Owner

alexwl commented May 13, 2019

Hi,

Building and indexing release versions of GHC (from Hackage) is simple.

I used cabal with buildable flag to build and index GHC 8.6, 8.4 and 8.2. buildable flag is defined in ghc.cabal (http://hackage.haskell.org/package/ghc-8.6.5/ghc.cabal), it's an experimental feature, but I haven't encountered any problems with it.

Examples:

Building and indexing GHC-8.6.5 using globally installed ghc and cabal:

cabal unpack ghc-8.6.5
cd ghc-8.6.5
cabal new-configure -f buildable
cabal new-build
haskell-code-indexer -p .

Building and indexing GHC-8.6.5 using stack and ghc/cabal from lts-13.20 snapshot:

stack unpack ghc-8.6.5
cd ghc-8.6.5
stack --resolver=lts-13.20 exec --no-ghc-package-path cabal -- new-configure -w $(stack --resolver=lts-13.20 path --compiler-exe) -f buildable
stack --resolver=lts-13.20 exec --no-ghc-package-path cabal -- new-build
haskell-code-indexer -p .

I'm not sure if there is a simple way to index the development version of GHC (8.9.0.20190510).
It seems that the current master branch of GHC depends on Cabal-3.0.0.0 (I'm not familiar with the details of the GHC build system). Cabal-3.0.0.0 is not released yet and it is obviously not supported by cabal-helper (cabal-helper extracts command line options for GHC from setup-config file).

@jvanbruegge
Copy link
Author

Ok, thank you, having the local version would at least allow me to work offline better.
Still, would be nice to investigate how to index the cloned versions so you can inspect your changes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants