Skip to content

Parallel install strips whitespace from failure output #1070

Closed
dag opened this Issue Oct 17, 2012 · 4 comments

3 participants

@dag
dag commented Oct 17, 2012

With one job, the output is fine:

$ cabal install -j1
Resolving dependencies...
In order, the following will be installed:
safecopy-0.7.1 (reinstall)
Warning: Note that reinstalls are always dangerous. Continuing anyway...
Configuring safecopy-0.7.1...
Building safecopy-0.7.1...
Preprocessing library safecopy-0.7.1...

src/Data/SafeCopy/SafeCopy.hs:6:14:
    Cannot parse LANGUAGE pragma
    Expecting comma-separated list of language options,
    each starting with a capital letter
      E.g. {-# LANGUAGE RecordPuns, Generics #-}
Failed to install safecopy-0.7.1
cabal: Error: some packages failed to install:
safecopy-0.7.1 failed during the building phase. The exception was:
ExitFailure 1

With multiple jobs, leading whitespace is stripped from the output:

$ cabal install -j
Resolving dependencies...
In order, the following will be installed:
safecopy-0.7.1 (reinstall)
Warning: Note that reinstalls are always dangerous. Continuing anyway...
Configuring safecopy-0.7.1...
Building safecopy-0.7.1...
Failed to install safecopy-0.7.1
Last 10 lines of the build log ( /home/dag/.cabal/logs/safecopy-0.7.1.log ):
E.g. {-# LANGUAGE RecordPuns, Generics #-}
Configuring safecopy-0.7.1...
Building safecopy-0.7.1...
Preprocessing library safecopy-0.7.1...
src/Data/SafeCopy/SafeCopy.hs:6:14:
Cannot parse LANGUAGE pragma
Expecting comma-separated list of language options,
each starting with a capital letter
E.g. {-# LANGUAGE RecordPuns, Generics #-}
cabal: Error: some packages failed to install:
safecopy-0.7.1 failed during the building phase. The exception was:
ExitFailure 1

For reference:

$ cabal --version
cabal-install version 1.16.0
using version 1.16.0.1 of the Cabal library 
@tibbe
Haskell member
tibbe commented Oct 17, 2012

@23Skidoo could you please take a look?

@23Skidoo
Haskell member

Is the leading whitespace also stripped from the build log (/home/dag/.cabal/logs/safecopy-0.7.1.log)?

@tibbe
Haskell member
tibbe commented Oct 17, 2012

Ack, so it seems we need to fix the build log.

@23Skidoo
Haskell member

OK, I reproduced this. This happens because we use notice to print last 10 lines from the build log, and notice is implemented using wrapText.

@tibbe tibbe closed this in 48536df Oct 18, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.