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

Hoogle failed database generation causes documentation to be unavailable #682

Open
marcozucchi opened this issue Mar 24, 2022 · 0 comments

Comments

@marcozucchi
Copy link

I am citing this issue, since I keep having this problem with IntelliJ's Haskell plugin

Problem

Hoogle Documentation is not available for me out-of-the-box

Explanation of the problem

Activating the Haskell logs and having a look at them, shows that the plugin executes a command similar to the following

/home/{username}/.cache/intellij-haskell/lts-18/bin/hoogle generate --local=/tmp/{project name}/.stack-work/install/x86_64-linux-tinfo6/c133d91acae5e16553a0fed130e42febc6425489b117552f09e66cb9be01b797/8.10.7/doc --local=/home/{username}/.stack/snapshots/x86_64-linux-tinfo6/c133d91acae5e16553a0fed130e42febc6425489b117552f09e66cb9be01b797/8.10.7/doc --database=/home/{username}/.cache/intellij-haskell/{projectName}/hoogle

The above script executes and tries to build the Hoogle database but at some point the build fails with the following message:

[70/155] hoogle...
hoogle: hseToItem failed, Add mode = embed support

Nevertheless, the plugin doesn't warn the user, that the build has failed (in fact, according to IntelliJ the plugin hasn't failed, you can only see the failed build status if you go to the Build tab). However, quick-documentation is unavailable as shown in the following screenshot:

image

Haskell Event Log shows that it can't access the Hoogle database since it's been trucated.

Haskell Event Log

224de1867a06ea1059bc17a3165e0d6a

Temporal fix

I tried to fix this problem and I found out that when the database is manually generated where the plugin expects it, it works fine. To achieve this, I removed both --local parameters from the hoogle command executed by the plugin:

/home/{USER}/.cache/intellij-haskell/lts-18/bin/hoogle generate --database=/home/{USER}/.cache/intellij-haskell/ProgramaTutorial/hoogle

The "hoogle generate" command will pull the whole Hoogle database from the Internet and Quick-Documentation (Ctrl+Q) will work as expected:

image

Originally posted by @marcozucchi in #659 (comment)

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

1 participant