haskell / haskell-ide-engine

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

Build does not respect job configuration (-j1) #1657

Closed oconnore closed 4 years ago

oconnore commented 4 years ago

I’ve passed the job limit both to the stack executable and to the install.hs script. Both are being ignored, because the build attempts to build Cabal and ghc-lib-parser in parallel. I do not have enough RAM in my VPS to do that simultaneously.

ubuntu@ip-10-0-0-24 ~/hs-ide> stack -j1 ./install.hs -j1 hie-8.6.5
# stack (for check)
# git (for submodules)
# git (for submodules)
# stack (for hie-8.6.5)
Cabal                > configure
Cabal                > Configuring Cabal-2.4.1.0...
Cabal                > build
ghc-lib-parser       > configure
Cabal                > Preprocessing library for Cabal-2.4.1.0..
Cabal                > Building library for Cabal-2.4.1.0..
ghc-lib-parser       > Configuring ghc-lib-parser-8.8.2...
ghc-lib-parser       > build
Cabal                > [  1 of 220] Compiling Distribution.Compat.Binary
Cabal                > [  2 of 220] Compiling Distribution.Compat.Directory
Cabal                > [  3 of 220] Compiling Distribution.Compat.Exception
ghc-lib-parser       > Preprocessing library for ghc-lib-parser-8.8.2..
^CCabal                > `gcc' failed in phase `Assembler'. (Exit code: -2)
Progress 0/149

********************************************************************************
Building failed, Try running `stack clean` and restart the build
If this does not work, open an issue at
        https://github.com/haskell/haskell-ide-engine
********************************************************************************

user interrupt
jneira commented 4 years ago
oconnore commented 4 years ago

Till now we have managed to not add argument handling to the build script for the shake of simplicity so the build is determined by the build config files (stack-${ghcVersion}.yaml for stack and cabal.project for cabal)

That’s weird, because the ./install.hs —help documents a —jobs option.

fendor commented 4 years ago

That manages the number of threads of the script itself and is a feature of shake that comes for free.

oconnore commented 4 years ago

@fendor ah, that makes sense. Sorry, I guess I was just confused then. Thanks for explaining. @jneira thanks for the workaround, I’ll close this since it’s already discussed in #1302

FWIW — re: #1302 — I would be fine with binaries so long as they’re distributed from a reasonable source (i.e. Github Releases vs. random S3 bucket).