haskell-ide-engine icon indicating copy to clipboard operation
haskell-ide-engine copied to clipboard

build does not complete with exit failure "import Language.Haskell.Brittany"

Open RheoTommy opened this issue 4 years ago • 5 comments

Hi! I'm Japanese. I use Manjaro KDEand installed hie through AUR. When I tried to update hie , the build process did not complete. This is the error code

haskell-ide-engine> /var/tmp/pamac-build-rheotommy/haskell-ide-engine/src/haskell-ide-engine-1.3/src/Haskell/Ide/Engine/Plugin/Brittany.hs:15:1: error:
haskell-ide-engine>     Bad interface file: /home/rheotommy/.stack/snapshots/x86_64-linux-tinfo6/7b26c292710a5d0bda384847da915cb8c2d4cefa5164c7ed4cb6cb182e3b9735/8.6.5/lib/x86_64-linux-ghc-8.6.5/brittany-0.12.1.1-JeNEfAw5a6fD9vYNdU6cjB/Language/Haskell/Brittany.hi
haskell-ide-engine>         Data.Binary.getPrim: end of file
haskell-ide-engine>    |
haskell-ide-engine> 15 | import           Language.Haskell.Brittany
haskell-ide-engine>    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Completed 2 action(s).

--  While building package haskell-ide-engine-1.3 using:
      /home/rheotommy/.stack/setup-exe-cache/x86_64-linux-tinfo6/Cabal-simple_mPHDZzAJ_2.4.0.1_ghc-8.6.5 --builddir=.stack-work/dist/x86_64-linux-tinfo6/Cabal-2.4.0.1 build lib:haskell-ide-engine lib:hie-test-utils exe:hie exe:hie-wrapper --ghc-options ""
    Process exited with code: ExitFailure 1
==> エラー: build() で問題が発生しました。
    中止...

Do you know how to fix it?

RheoTommy avatar Apr 10 '20 06:04 RheoTommy

Mmm, maybe the products of previous builds are causing this. have you tried to do a stack clean --full before installing it?

jneira avatar Apr 10 '20 21:04 jneira

I did stack clean --full and yay -Scc but it did not work...

RheoTommy avatar Apr 11 '20 07:04 RheoTommy

as the error comes from $HOME/.stack, you might have to clean that and not just the project's stack folder. Which can be annoying if you delete the whole HOME/.stack, but maybe you are lucky and just deleting /home/rheotommy/.stack/snapshots/x86_64-linux-tinfo6/7b26c292710a5d0bda384847da915cb8c2d4cefa5164c7ed4cb6cb182e3b9735/8.6.5/lib/x86_64-linux-ghc-8.6.5/brittany-0.12.1.1-JeNEfAw5a6fD9vYNdU6cjB would work? Not sure how well stack supports such "partial cleans" in its store.

lspitzner avatar Apr 21 '20 16:04 lspitzner

In my experience, delete entire snapshot dirs (inside $STACK_ROOT/../linux-tinfo6) usually dont cause problems, stack regenerates them

jneira avatar Apr 21 '20 17:04 jneira

@RheoTommy did it fix removing the snapshots dir?

jneira avatar May 28 '20 21:05 jneira