haskell / haskell-ide-engine

The engine for haskell ide-integration. Not an IDE
BSD 3-Clause "New" or "Revised" License
2.38k stars 213 forks source link

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

Open RheoTommy opened 4 years ago

RheoTommy commented 4 years ago

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?

jneira commented 4 years ago

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

RheoTommy commented 4 years ago

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

lspitzner commented 4 years ago

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.

jneira commented 4 years ago

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

jneira commented 4 years ago

@RheoTommy did it fix removing the snapshots dir?