Skip to content
This repository was archived by the owner on Oct 7, 2020. It is now read-only.

custom-setup causes HIE exception #1408

Closed
tim2CF opened this issue Oct 12, 2019 · 2 comments
Closed

custom-setup causes HIE exception #1408

tim2CF opened this issue Oct 12, 2019 · 2 comments

Comments

@tim2CF
Copy link

tim2CF commented Oct 12, 2019

  • MacOS
  • Atom text editor
  • Stack 2.1.3
  • lts-13.19
  • GHC 8.6.4

I'm using proto-lens library in my project. It implies usage of custom-setup in package.yaml. This causes exception in HIE which popups in my text editor with error message. Also in developer console of text editor I can see some warnings as well:

Screenshot 2019-10-12 at 03 00 22

I tried different builds of HIE for different LTS, but result is always the same. From debug logs I figured out that it's something about Cabal package, but looks like it's actually installed and even version is matching:

itkachuk$ cabal --version
cabal-install version 2.4.1.0
compiled using version 2.4.1.0 of the Cabal library

Without custom-setup it works just fine. This issue can be easily reproduced with any example from proto-lens github repo. Thanks for the help.

@jneira
Copy link
Member

jneira commented Nov 21, 2019

This one reminds me #1462 cause the error is the same step, both are using custom-setup with stack and package.yaml and they are trying to install Cabal-2.4.1.0.
In this case the cabal executable is in PATH but it cant find the package Cabal-2.4.1.0. Installing the library Cabal-2.4.1.0 is needed cause, although you have cabal-2.4.1.0 (the executable), ghc-8.6.4 has installed globally Cabal-2.4.0.1 (the library), and it dont know anything about the cabal excutable.

As the failing step is

The package list for `hackage.haskell.org` does not exist. You may to run `cabal update` to download it

i would follow the recommendation, running cabal update in a shell to make cabal create the necessary metadata under ~/.cabal. If cabal update fails, please attach the output of cabal update -v3.

@tim2CF
Copy link
Author

tim2CF commented Nov 21, 2019

Thanks a lot, cabal update solved the issue!

@tim2CF tim2CF closed this as completed Nov 21, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants