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

No documentation available as Hoogle (database) isn't available #659

Closed
mhusmann opened this issue Jun 3, 2021 · 6 comments
Closed

No documentation available as Hoogle (database) isn't available #659

mhusmann opened this issue Jun 3, 2021 · 6 comments

Comments

@mhusmann
Copy link

mhusmann commented Jun 3, 2021

Installed intellij-haskell unfortunately getting above error message and I don't find a way to get hoogle running
hoogle runs perfectly in a shell window.

Running idea 2021.1.1 Community Edition on Arch Linux

@alleksandrgall
Copy link

Did you try building your project with haddock?
stack build --haddock

@mhusmann
Copy link
Author

mhusmann commented Jun 3, 2021 via email

@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

@amryounis
Copy link

hi, i am running on windows. stack build --haddock did not work

image

@marcozucchi
Copy link

@amryounis try following the temporal fix I describe above your reply in CMD or Powershell

@amryounis
Copy link

thanks @marcozucchi . May I ask you to show the syntax for Windows?

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

5 participants