Skip to content
This repository has been archived by the owner on Apr 25, 2020. It is now read-only.

Test failures on Nix #335

Closed
Fuuzetsu opened this issue Aug 20, 2014 · 39 comments
Closed

Test failures on Nix #335

Fuuzetsu opened this issue Aug 20, 2014 · 39 comments

Comments

@Fuuzetsu
Copy link

Running 2 test suites...
Test suite doctest: RUNNING...
Test suite doctest: PASS
Test suite logged to: dist/test/ghc-mod-5.0.1-doctest.log
Test suite spec: RUNNING...
sed: can't read cabal.sandbox.config.in: No such file or directory
/bin/sh: cabal: command not found
The Glorious Glasgow Haskell Compilation System, version 7.8.3
unicode :: α -> α     -- Defined at test/data/Unicode.hs:4:1
ghc-mod was built with Cabal version 1.18.1.3
Root directory:      /tmp/nix-build-haskell-ghc-mod-ghc7.8.3-5.0.1-shared.drv-0/ghc-mod-5.0.1
Current directory:   /tmp/nix-build-haskell-ghc-mod-ghc7.8.3-5.0.1-shared.drv-0/ghc-mod-5.0.1
Cabal file:          Just "/tmp/nix-build-haskell-ghc-mod-ghc7.8.3-5.0.1-shared.drv-0/ghc-mod-5.0.1/ghc-mod.cabal"
GHC options:         -global-package-db -user-package-db -XConstraintKinds -XFlexibleContexts -XHaskell2010 -optP-include -optP/tmp/nix-build-haskell-ghc-mod-ghc7.8.3-5.0.1-shared.drv-0/ghc-mod-5.0.1/dist/build/autogen/cabal_macros.h
Include directories: /tmp/nix-build-haskell-ghc-mod-ghc7.8.3-5.0.1-shared.drv-0/ghc-mod-5.0.1 /tmp/nix-build-haskell-ghc-mod-ghc7.8.3-5.0.1-shared.drv-0/ghc-mod-5.0.1/dist/build /tmp/nix-build-haskell-ghc-mod-ghc7.8.3-5.0.1-shared.drv-0/ghc-mod-5.0.1/dist/build/autogen /tmp/nix-build-haskell-ghc-mod-ghc7.8.3-5.0.1-shared.drv-0/ghc-mod-5.0.1/src /tmp/nix-build-haskell-ghc-mod-ghc7.8.3-5.0.1-shared.drv-0/ghc-mod-5.0.1/test
Dependent packages:  Cabal-1.18.1.3, base-4.7.0.1, containers-0.5.5.1, deepseq-1.3.0.2, directory-1.2.1.0, djinn-ghc-0.0.2.2, filepath-1.3.0.2, ghc-7.8.3, ghc-paths-0.1.0.9, ghc-syb-utils-0.2.1.2, haskell-src-exts-1.15.0.1, hlint-1.9.3, io-choice-0.0.5, monad-control-0.3.3.0, monad-journal-0.2.3.0, mtl-2.1.2, old-time-1.1.0.2, process-1.2.0.0, split-0.2.2, syb-0.4.2, text-1.1.1.3, time-1.4.2, transformers-0.3.0.0, transformers-base-0.4.3, base-4.7.0.1, directory-1.2.1.0, filepath-1.3.0.2, ghc-7.8.3, mtl-2.1.2, base-4.7.0.1, containers-0.5.5.1, directory-1.2.1.0, filepath-1.3.0.2, ghc-7.8.3, split-0.2.2, base-4.7.0.1, doctest-0.9.11, Cabal-1.18.1.3, base-4.7.0.1, containers-0.5.5.1, deepseq-1.3.0.2, directory-1.2.1.0, djinn-ghc-0.0.2.2, filepath-1.3.0.2, ghc-7.8.3, ghc-paths-0.1.0.9, ghc-syb-utils-0.2.1.2, haskell-src-exts-1.15.0.1, hlint-1.9.3, hspec-1.11.3, io-choice-0.0.5, monad-control-0.3.3.0, monad-journal-0.2.3.0, mtl-2.1.2, old-time-1.1.0.2, process-1.2.0.0, split-0.2.2, syb-0.4.2, text-1.1.1.3, time-1.4.2, transformers-0.3.0.0, transformers-base-0.4.3
System libraries:    /nix/store/kb4kpcvmiiacvfabjldk7590js6v1f41-ghc-7.8.3/lib/ghc-7.8.3


Browse
  browse Data.Map
    - contains at least `differenceWithKey'

  browse -d Data.Either
    - contains functions (e.g. `either') including their type signature
    - contains type constructors (e.g. `Left') including their type signature

  `browse' in a project directory
    - lists symbols defined in a a local module (e.g. `Baz.baz) FAILED [1]

CabalApi
  parseCabalFile
    - throws an exception if the cabal file is broken

  getCompilerOptions
    - gets necessary CompilerOptions FAILED [2]

  cabalDependPackages
    - extracts dependent packages

  cabalSourceDirs
    - extracts all hs-source-dirs
    - extracts all hs-source-dirs including "."

  cabalAllBuildInfo
    - extracts build info

Check
  checkSyntax
    - works even if an executable depends on the library defined in the same cabal file FAILED [3]
    - works even if a module imports another module from a different directory FAILED [4]
    - detects cyclic imports FAILED [5]
    - works with modules using QuasiQuotes FAILED [6]
    - works with foreign exports FAILED [7]

    when no errors are found
      - doesn't output an empty line FAILED [8]

Flag
  flags
    - contains at least `-fno-warn-orphans'

GhcPkg
  getSandboxDb
    - can parse a config file and extract the sandbox package-db
    - throws an error if the sandbox config file is broken

Info
  types
    - shows types of the expression and its outers FAILED [9]
    - works with a module using TemplateHaskell FAILED [10]
    - works with a module that imports another module using TemplateHaskell FAILED [11]

  info
    - works for non-export functions FAILED [12]
    - works with a module using TemplateHaskell FAILED [13]
    - works with a module that imports another module using TemplateHaskell FAILED [14]
    - doesn't fail on unicode output

Lang
  languages
    - contains at lest `OverloadedStrings'

Lint
  lint
    - can detect a redundant import

    when no suggestions are given
      - doesn't output an empty line

List
  modules
    - contains at least `Data.Map'

Monad
  When using GhcModT in a do block
    - a pattern match failure causes a call to `fail` on ErrorT in the monad stack

  runGhcModT
    - complains if the cabal file fails to parse while a sandbox is present

  gmsGet/Put
    - work

1) Browse, `browse' in a project directory, lists symbols defined in a a local module (e.g. `Baz.baz)
uncaught exception: IOException (user error (Pattern match failure in do expression at test/TestUtils.hs:27:3-14))

2) CabalApi.getCompilerOptions gets necessary CompilerOptions
uncaught exception: IOException (user error (Pattern match failure in do expression at test/TestUtils.hs:27:3-14))

3) Check.checkSyntax works even if an executable depends on the library defined in the same cabal file
uncaught exception: IOException (user error (Pattern match failure in do expression at test/TestUtils.hs:27:3-14))

4) Check.checkSyntax works even if a module imports another module from a different directory
uncaught exception: IOException (user error (Pattern match failure in do expression at test/TestUtils.hs:27:3-14))

5) Check.checkSyntax detects cyclic imports
uncaught exception: IOException (user error (Pattern match failure in do expression at test/TestUtils.hs:27:3-14))

6) Check.checkSyntax works with modules using QuasiQuotes
uncaught exception: IOException (user error (Pattern match failure in do expression at test/TestUtils.hs:27:3-14))

7) Check.checkSyntax works with foreign exports
uncaught exception: IOException (user error (Pattern match failure in do expression at test/TestUtils.hs:27:3-14))

8) Check.checkSyntax, when no errors are found, doesn't output an empty line
uncaught exception: IOException (user error (Pattern match failure in do expression at test/TestUtils.hs:27:3-14))

9) Info.types shows types of the expression and its outers
uncaught exception: IOException (user error (Pattern match failure in do expression at test/TestUtils.hs:27:3-14))

10) Info.types works with a module using TemplateHaskell
uncaught exception: IOException (user error (Pattern match failure in do expression at test/TestUtils.hs:27:3-14))

11) Info.types works with a module that imports another module using TemplateHaskell
uncaught exception: IOException (user error (Pattern match failure in do expression at test/TestUtils.hs:27:3-14))

12) Info.info works for non-export functions
uncaught exception: IOException (user error (Pattern match failure in do expression at test/TestUtils.hs:27:3-14))

13) Info.info works with a module using TemplateHaskell
uncaught exception: IOException (user error (Pattern match failure in do expression at test/TestUtils.hs:27:3-14))

14) Info.info works with a module that imports another module using TemplateHaskell
uncaught exception: IOException (user error (Pattern match failure in do expression at test/TestUtils.hs:27:3-14))

Randomized with seed 1132737374

Finished in 6.6720 seconds
33 examples, 14 failures
Test suite spec: FAIL
Test suite logged to: dist/test/ghc-mod-5.0.1-spec.log
1 of 2 test suites (1 of 2 test cases) passed.
builder for `/nix/store/lmsy3paprqc296lqbgbsdwxb19fncjl0-haskell-ghc-mod-ghc7.8.3-5.0.1-shared.drv' failed with exit code 1
error: build of `/nix/store/lmsy3paprqc296lqbgbsdwxb19fncjl0-haskell-ghc-mod-ghc7.8.3-5.0.1-shared.drv' failed
@DanielG
Copy link
Owner

DanielG commented Aug 20, 2014

Try again with these two commits: 252341e, 5b32667

Also "/bin/sh: cabal: command not found" doesn't sound good either. ghc-mod's test suite needs cabal on the PATH.

@Fuuzetsu
Copy link
Author

With these two commits and cabal-install made available during build:

Documentation created: dist/doc/html/ghc-mod/index.html,
dist/doc/html/ghc-mod/ghc-mod.txt
Preprocessing executable 'ghc-mod' for ghc-mod-5.0.1...
Preprocessing executable 'ghc-modi' for ghc-mod-5.0.1...
Preprocessing test suite 'doctest' for ghc-mod-5.0.1...
Preprocessing test suite 'spec' for ghc-mod-5.0.1...
running tests
Running 2 test suites...
Test suite doctest: RUNNING...
Test suite doctest: PASS
Test suite logged to: dist/test/ghc-mod-5.0.1-doctest.log
Test suite spec: RUNNING...
cabal-install version 1.20.0.3
using version 1.20.0.2 of the Cabal library 
The Glorious Glasgow Haskell Compilation System, version 7.8.3
unicode :: α -> α     -- Defined at test/data/Unicode.hs:4:1
ghc-mod was built with Cabal version 1.18.1.3
Root directory:      /tmp/nix-build-haskell-ghc-mod-ghc7.8.3-5.0.1-shared.drv-0/git-export
Current directory:   /tmp/nix-build-haskell-ghc-mod-ghc7.8.3-5.0.1-shared.drv-0/git-export
Cabal file:          Just "/tmp/nix-build-haskell-ghc-mod-ghc7.8.3-5.0.1-shared.drv-0/git-export/ghc-mod.cabal"
GHC options:         -global-package-db -user-package-db -XConstraintKinds -XFlexibleContexts -XHaskell2010 -optP-include -optP/tmp/nix-build-haskell-ghc-mod-ghc7.8.3-5.0.1-shared.drv-0/git-export/dist/build/autogen/cabal_macros.h
Include directories: /tmp/nix-build-haskell-ghc-mod-ghc7.8.3-5.0.1-shared.drv-0/git-export /tmp/nix-build-haskell-ghc-mod-ghc7.8.3-5.0.1-shared.drv-0/git-export/dist/build /tmp/nix-build-haskell-ghc-mod-ghc7.8.3-5.0.1-shared.drv-0/git-export/dist/build/autogen /tmp/nix-build-haskell-ghc-mod-ghc7.8.3-5.0.1-shared.drv-0/git-export/src /tmp/nix-build-haskell-ghc-mod-ghc7.8.3-5.0.1-shared.drv-0/git-export/test
Dependent packages:  Cabal-1.18.1.3, base-4.7.0.1, containers-0.5.5.1, deepseq-1.3.0.2, directory-1.2.1.0, djinn-ghc-0.0.2.2, filepath-1.3.0.2, ghc-7.8.3, ghc-paths-0.1.0.9, ghc-syb-utils-0.2.1.2, haskell-src-exts-1.15.0.1, hlint-1.9.3, io-choice-0.0.5, monad-control-0.3.3.0, monad-journal-0.2.3.0, mtl-2.1.2, old-time-1.1.0.2, process-1.2.0.0, split-0.2.2, syb-0.4.2, text-1.1.1.3, time-1.4.2, transformers-0.3.0.0, transformers-base-0.4.3, base-4.7.0.1, directory-1.2.1.0, filepath-1.3.0.2, ghc-7.8.3, mtl-2.1.2, base-4.7.0.1, containers-0.5.5.1, directory-1.2.1.0, filepath-1.3.0.2, ghc-7.8.3, split-0.2.2, base-4.7.0.1, doctest-0.9.11, Cabal-1.18.1.3, base-4.7.0.1, containers-0.5.5.1, deepseq-1.3.0.2, directory-1.2.1.0, djinn-ghc-0.0.2.2, filepath-1.3.0.2, ghc-7.8.3, ghc-paths-0.1.0.9, ghc-syb-utils-0.2.1.2, haskell-src-exts-1.15.0.1, hlint-1.9.3, hspec-1.11.3, io-choice-0.0.5, monad-control-0.3.3.0, monad-journal-0.2.3.0, mtl-2.1.2, old-time-1.1.0.2, process-1.2.0.0, split-0.2.2, syb-0.4.2, text-1.1.1.3, time-1.4.2, transformers-0.3.0.0, transformers-base-0.4.3
System libraries:    /nix/store/kb4kpcvmiiacvfabjldk7590js6v1f41-ghc-7.8.3/lib/ghc-7.8.3


Browse
  browse Data.Map
    - contains at least `differenceWithKey'

  browse -d Data.Either
    - contains functions (e.g. `either') including their type signature
    - contains type constructors (e.g. `Left') including their type signature

  `browse' in a project directory
    - lists symbols defined in a a local module (e.g. `Baz.baz) FAILED [1]

CabalApi
  parseCabalFile
    - throws an exception if the cabal file is broken

  getCompilerOptions
    - gets necessary CompilerOptions FAILED [2]

  cabalDependPackages
    - extracts dependent packages

  cabalSourceDirs
    - extracts all hs-source-dirs
    - extracts all hs-source-dirs including "."

  cabalAllBuildInfo
    - extracts build info

Check
  checkSyntax
    - works even if an executable depends on the library defined in the same cabal file FAILED [3]
    - works even if a module imports another module from a different directory FAILED [4]
    - detects cyclic imports FAILED [5]
    - works with modules using QuasiQuotes FAILED [6]
    - works with foreign exports FAILED [7]

    when no errors are found
      - doesn't output an empty line FAILED [8]

Cradle
  findCradle
    - returns the current directory
    - finds a cabal file and a sandbox
    - works even if a sandbox config file is broken

Find
  db <- loadSymbolDb
    - lookupSymbol' db "head"  contains at least `Data.List' FAILED [9]

Flag
  flags
    - contains at least `-fno-warn-orphans'

GhcApi
  findModule
    - finds Data.List in `base' and `haskell2010' FAILED [10]

  moduleInfo
    - works for modules from global packages (e.g. base:Data.List) FAILED [11]
    - works for local modules FAILED [12]

GhcPkg
  getSandboxDb
    - can parse a config file and extract the sandbox package-db
    - throws an error if the sandbox config file is broken

Info
  types
    - shows types of the expression and its outers FAILED [13]
    - works with a module using TemplateHaskell FAILED [14]
    - works with a module that imports another module using TemplateHaskell FAILED [15]

  info
    - works for non-export functions FAILED [16]
    - works with a module using TemplateHaskell FAILED [17]
    - works with a module that imports another module using TemplateHaskell FAILED [18]
    - doesn't fail on unicode output

Lang
  languages
    - contains at lest `OverloadedStrings'

Lint
  lint
    - can detect a redundant import

    when no suggestions are given
      - doesn't output an empty line

List
  modules
    - contains at least `Data.Map'

Monad
  When using GhcModT in a do block
    - a pattern match failure causes a call to `fail` on ErrorT in the monad stack

  runGhcModT
    - complains if the cabal file fails to parse while a sandbox is present

  gmsGet/Put
    - work

Utils
  extractParens
    - extracts the part of a string surrounded by parentheses

  liftMonadError
    - converts IOErrors to GhcModError

1) Browse, `browse' in a project directory, lists symbols defined in a a local module (e.g. `Baz.baz)
uncaught exception: IOException (user error (Pattern match failure in do expression at test/TestUtils.hs:27:3-14))

2) CabalApi.getCompilerOptions gets necessary CompilerOptions
uncaught exception: IOException (user error (Pattern match failure in do expression at test/TestUtils.hs:27:3-14))

3) Check.checkSyntax works even if an executable depends on the library defined in the same cabal file
uncaught exception: IOException (user error (Pattern match failure in do expression at test/TestUtils.hs:27:3-14))

4) Check.checkSyntax works even if a module imports another module from a different directory
uncaught exception: IOException (user error (Pattern match failure in do expression at test/TestUtils.hs:27:3-14))

5) Check.checkSyntax detects cyclic imports
uncaught exception: IOException (user error (Pattern match failure in do expression at test/TestUtils.hs:27:3-14))

6) Check.checkSyntax works with modules using QuasiQuotes
uncaught exception: IOException (user error (Pattern match failure in do expression at test/TestUtils.hs:27:3-14))

7) Check.checkSyntax works with foreign exports
uncaught exception: IOException (user error (Pattern match failure in do expression at test/TestUtils.hs:27:3-14))

8) Check.checkSyntax, when no errors are found, doesn't output an empty line
uncaught exception: IOException (user error (Pattern match failure in do expression at test/TestUtils.hs:27:3-14))

9) Find, db <- loadSymbolDb, lookupSymbol' db "head"  contains at least `Data.List'
[] doesn't contain ["Data.List"]

10) GhcApi.findModule finds Data.List in `base' and `haskell2010'
uncaught exception: IOException (user error (Pattern match failure in do expression at test/TestUtils.hs:27:3-14))

11) GhcApi.moduleInfo works for modules from global packages (e.g. base:Data.List)
uncaught exception: IOException (user error (Pattern match failure in do expression at test/TestUtils.hs:27:3-14))

12) GhcApi.moduleInfo works for local modules
uncaught exception: IOException (user error (Pattern match failure in do expression at test/TestUtils.hs:27:3-14))

13) Info.types shows types of the expression and its outers
uncaught exception: IOException (user error (Pattern match failure in do expression at test/TestUtils.hs:27:3-14))

14) Info.types works with a module using TemplateHaskell
uncaught exception: IOException (user error (Pattern match failure in do expression at test/TestUtils.hs:27:3-14))

15) Info.types works with a module that imports another module using TemplateHaskell
uncaught exception: IOException (user error (Pattern match failure in do expression at test/TestUtils.hs:27:3-14))

16) Info.info works for non-export functions
uncaught exception: IOException (user error (Pattern match failure in do expression at test/TestUtils.hs:27:3-14))

17) Info.info works with a module using TemplateHaskell
uncaught exception: IOException (user error (Pattern match failure in do expression at test/TestUtils.hs:27:3-14))

18) Info.info works with a module that imports another module using TemplateHaskell
uncaught exception: IOException (user error (Pattern match failure in do expression at test/TestUtils.hs:27:3-14))

Randomized with seed 1973597273

Finished in 9.1379 seconds
42 examples, 18 failures
Test suite spec: FAIL
Test suite logged to: dist/test/ghc-mod-5.0.1-spec.log
1 of 2 test suites (1 of 2 test cases) passed.
builder for `/nix/store/gkxn59s49nals2aparsw1sqvddbzk5mj-haskell-ghc-mod-ghc7.8.3-5.0.1-shared.drv' failed with exit code 1
error: build of `/nix/store/gkxn59s49nals2aparsw1sqvddbzk5mj-haskell-ghc-mod-ghc7.8.3-5.0.1-shared.drv' failed

@DanielG
Copy link
Owner

DanielG commented Aug 21, 2014

Try again with this branch: https://github.com/DanielG/ghc-mod/tree/dev-issue-335

Looks like I accidentally dropped error information when running the test cases, this should print the actual error message.

@DanielG
Copy link
Owner

DanielG commented Aug 21, 2014

Make sure the branch head is b394b9f I had to rebase.

@Fuuzetsu
Copy link
Author

test/TestUtils.hs:30:23:
    No instance for (Show e) arising from a use of ‘show’
    Possible fix:
      add (Show e) to the context of
        the type signature for extract :: IO (Either e a, w) -> IO a
    In the second argument of ‘($)’, namely ‘show e’
    In the expression: error $ show e
    In a case alternative: Left e -> error $ show e
builder for `/nix/store/bvpwy7hjfv9miv1p0mpladq8rpvn0

@DanielG
Copy link
Owner

DanielG commented Aug 21, 2014

Ah damn I had --enable-tests turned off :x Try again now d09ac82

@Fuuzetsu
Copy link
Author

Ah, now it's fairly clear what happens. During nix builds, $HOME is not what it would usually be when regular user runs these tests.

We had a similar problem at dan-t/cabal-bounds#3 but the dev was unable to figure out how to get cabal to not use $HOME/.cabal for his tests.

1) Browse, `browse' in a project directory, lists symbols defined in a a local module (e.g. `Baz.baz)
uncaught exception: ErrorCall (GMECabalConfigure {gmeMsg = "user error (cabal configure (exit 1)\ncabal: /homeless-shelter/.cabal: does not exist\n)"})

2) CabalApi.getCompilerOptions gets necessary CompilerOptions
uncaught exception: ErrorCall (GMECabalConfigure {gmeMsg = "user error (cabal configure (exit 1)\ncabal: /homeless-shelter/.cabal: does not exist\n)"})

3) Check.checkSyntax works even if an executable depends on the library defined in the same cabal file
uncaught exception: ErrorCall (GMECabalConfigure {gmeMsg = "user error (cabal configure (exit 1)\ncabal: /homeless-shelter/.cabal: does not exist\n)"})

4) Check.checkSyntax works even if a module imports another module from a different directory
uncaught exception: ErrorCall (GMECabalConfigure {gmeMsg = "user error (cabal configure (exit 1)\ncabal: /homeless-shelter/.cabal: does not exist\n)"})

5) Check.checkSyntax detects cyclic imports
uncaught exception: ErrorCall (GMECabalConfigure {gmeMsg = "user error (cabal configure (exit 1)\ncabal: /homeless-shelter/.cabal: does not exist\n)"})

6) Check.checkSyntax works with modules using QuasiQuotes
uncaught exception: ErrorCall (GMECabalConfigure {gmeMsg = "user error (cabal configure (exit 1)\ncabal: /homeless-shelter/.cabal: does not exist\n)"})

7) Check.checkSyntax works with foreign exports
uncaught exception: ErrorCall (GMECabalConfigure {gmeMsg = "user error (cabal configure (exit 1)\ncabal: /homeless-shelter/.cabal: does not exist\n)"})

8) Check.checkSyntax, when no errors are found, doesn't output an empty line
uncaught exception: ErrorCall (GMECabalConfigure {gmeMsg = "user error (cabal configure (exit 1)\ncabal: /homeless-shelter/.cabal: does not exist\n)"})

9) Find, db <- loadSymbolDb, lookupSymbol' db "head"  contains at least `Data.List'
[] doesn't contain ["Data.List"]

10) GhcApi.findModule finds Data.List in `base' and `haskell2010'
uncaught exception: ErrorCall (GMECabalConfigure {gmeMsg = "user error (cabal configure (exit 1)\ncabal: /homeless-shelter/.cabal: does not exist\n)"})

11) GhcApi.moduleInfo works for modules from global packages (e.g. base:Data.List)
uncaught exception: ErrorCall (GMECabalConfigure {gmeMsg = "user error (cabal configure (exit 1)\ncabal: /homeless-shelter/.cabal: does not exist\n)"})

12) GhcApi.moduleInfo works for local modules
uncaught exception: ErrorCall (GMECabalConfigure {gmeMsg = "user error (cabal configure (exit 1)\ncabal: /homeless-shelter/.cabal: does not exist\n)"})

13) Info.types shows types of the expression and its outers
uncaught exception: ErrorCall (GMECabalConfigure {gmeMsg = "user error (cabal configure (exit 1)\ncabal: /homeless-shelter/.cabal: does not exist\n)"})

14) Info.types works with a module using TemplateHaskell
uncaught exception: ErrorCall (GMECabalConfigure {gmeMsg = "user error (cabal configure (exit 1)\ncabal: /homeless-shelter/.cabal: does not exist\n)"})

15) Info.types works with a module that imports another module using TemplateHaskell
uncaught exception: ErrorCall (GMECabalConfigure {gmeMsg = "user error (cabal configure (exit 1)\ncabal: /homeless-shelter/.cabal: does not exist\n)"})

16) Info.info works for non-export functions
uncaught exception: ErrorCall (GMECabalConfigure {gmeMsg = "user error (cabal configure (exit 1)\ncabal: /homeless-shelter/.cabal: does not exist\n)"})

17) Info.info works with a module using TemplateHaskell
uncaught exception: ErrorCall (GMECabalConfigure {gmeMsg = "user error (cabal configure (exit 1)\ncabal: /homeless-shelter/.cabal: does not exist\n)"})

18) Info.info works with a module that imports another module using TemplateHaskell
uncaught exception: ErrorCall (GMECabalConfigure {gmeMsg = "user error (cabal configure (exit 1)\ncabal: /homeless-shelter/.cabal: does not exist\n)"})

Randomized with seed 69258942

Finished in 8.9305 seconds
42 examples, 18 failures
Test suite spec: FAIL
Test suite logged to: dist/test/ghc-mod-5.0.1-spec.log
1 of 2 test suites (1 of 2 test cases) passed.
builder for `/nix/store/pldz0bp6d4r0hv210ygwmwm8wxdminzv-haskell-ghc-mod-ghc7.8.3-5.0.1-shared.drv' failed with exit code 1
error: build of `/nix/store/pldz0bp6d4r0hv210ygwmwm8wxdminzv-haskell-ghc-mod-ghc7.8.3-5.0.1-shared.drv' failed

@DanielG
Copy link
Owner

DanielG commented Aug 21, 2014

Can't you just set HOME to a directory that exists before running the test suite?

@DanielG
Copy link
Owner

DanielG commented Aug 24, 2014

Any news on this?

@alanz
Copy link
Collaborator

alanz commented Aug 24, 2014

Nope, maybe escalate to #haskell or haskell-cafe.

Just realised I may be answering the wrong question :)

@DanielG
Copy link
Owner

DanielG commented Aug 24, 2014

@alanz :p

@Fuuzetsu
Copy link
Author

Upon consulting some people it seems we may be able to set HOME for this project to a mutable directory for the purposes of the build but I did not have time to try it out. I'll do so today and let you know how it goes.

@DanielG
Copy link
Owner

DanielG commented Aug 24, 2014

Ok, cool

@DanielG DanielG changed the title Test failures Test failures on Nix Aug 24, 2014
@Fuuzetsu
Copy link
Author

OK, even with mutable directory + unset GHC_PACKAGE_PATH so that cabal is not upset, we end up with errors of the following kind:

1) Browse, browse Data.Map, contains at least `differenceWithKey'
uncaught exception: GhcException (<command line>: cannot satisfy -package-id transformers-base-0.4.3-9254ca8b05a23ee391f6aaa22b4eb29e
    (use -v for more information))

It seems that you could close this issue and we'll have to deal with this ourselves, perhaps we need to do some more hacking so that cabal-install sees the packages.

In the meantime, maybe you could consider a flag which turns off cabal-install-dependend tests so that we could still run the rest.

cc @peti maybe he knows how to fix this properly

@DanielG
Copy link
Owner

DanielG commented Aug 24, 2014

From: Mateusz Kowalczyk notifications@github.com
Subject: Re: [ghc-mod] Test failures on Nix (#335)
Date: Sun, 24 Aug 2014 10:37:01 -0700

OK, even with mutable directory + unset GHC_PACKAGE_PATH so that
cabal is not upset, we end up with errors of the following kind:

1) Browse, browse Data.Map, contains at least `differenceWithKey'
uncaught exception: GhcException (<command line>: cannot satisfy
-package-id transformers-base-0.4.3-9254ca8b05a23ee391f6aaa22b4eb29e
    (use -v for more information))

That kind of sounds like the problem we were having in #269 but it
might be unrelated.

It seems that you could close this issue and we'll have to deal
with this ourselves, perhaps we need to do some more hacking so
that cabal-install sees the packages.

In the meantime, maybe you could consider a flag which turns off
cabal-install-dependend tests so that we could still run the rest.

Unless the environment is vastly different once ghc-mod is installed
through Nix those sound like legitimate failures.

ghc-mod needs access to all the cabal packages the projects it's being
run in depend on otherwise it can't funtion. I think the exception
above is happening because ghc-mod gets the list of packages being
depended on by the current project out of dist/setup-config which is
created by cabal configure but it doesn't actually have access to
the packages listed there because of the way Nix works. I think
cabal-install must have some kind of special handling otherwise how
would it be able to find out about that package listed in the frist
place while ghc-mod can't see it?

Maybe you should look at how cabal-install is packaged?

@Fuuzetsu
Copy link
Author

#269 looks like the resulting binary wasn't being wrapped properly at the time

Unless the environment is vastly different once ghc-mod is installed
through Nix those sound like legitimate failures.

It is, we have wrappers in place which will pass available packages to ghc-mod on per-project basis. So in one project it will be passed all its dependencies and in another project all the other ones. This means that it can see the packages. We're basically passing it the list of packages it should use. I suspect the issue here is that something (cabal-install?) is not being wrapped during the testing phase while it should.

So for reference, if in my project I depend on the (wrapped) ghc-mod then it will be able to see all the packages in the project: it just shows that the final product works as long as we skip the tests. I think the problem is just confined to testing phase.

@DanielG
Copy link
Owner

DanielG commented Aug 24, 2014

Ah, ok :)

@peti
Copy link
Contributor

peti commented Aug 24, 2014

I tried running the test suite of the latest release in NixOS, and it fails with the following errors:

1) Browse, `browse' in a project directory, lists symbols defined in a a local module (e.g. `Baz.baz)
uncaught exception: ErrorCall (GMECabalConfigure {gmeMsg = "cabal: readProcessWithExitCode: runInteractiveProcess: exec: does not exist (No such file or directory)"})

2) CabalApi.getCompilerOptions gets necessary CompilerOptions
uncaught exception: ErrorCall (GMECabalConfigure {gmeMsg = "cabal: readProcessWithExitCode: runInteractiveProcess: exec: does not exist (No such file or directory)"})

3) Check.checkSyntax works even if an executable depends on the library defined in the same cabal file
uncaught exception: ErrorCall (GMECabalConfigure {gmeMsg = "cabal: readProcessWithExitCode: runInteractiveProcess: exec: does not exist (No such file or directory)"})

4) Check.checkSyntax works even if a module imports another module from a different directory
uncaught exception: ErrorCall (GMECabalConfigure {gmeMsg = "cabal: readProcessWithExitCode: runInteractiveProcess: exec: does not exist (No such file or directory)"})

5) Check.checkSyntax detects cyclic imports
uncaught exception: ErrorCall (GMECabalConfigure {gmeMsg = "cabal: readProcessWithExitCode: runInteractiveProcess: exec: does not exist (No such file or directory)"})

6) Check.checkSyntax works with modules using QuasiQuotes
uncaught exception: ErrorCall (GMECabalConfigure {gmeMsg = "cabal: readProcessWithExitCode: runInteractiveProcess: exec: does not exist (No such file or directory)"})

7) Check.checkSyntax works with foreign exports
uncaught exception: ErrorCall (GMECabalConfigure {gmeMsg = "cabal: readProcessWithExitCode: runInteractiveProcess: exec: does not exist (No such file or directory)"})

8) Check.checkSyntax, when no errors are found, doesn't output an empty line
uncaught exception: ErrorCall (GMECabalConfigure {gmeMsg = "cabal: readProcessWithExitCode: runInteractiveProcess: exec: does not exist (No such file or directory)"})

9) Info.types shows types of the expression and its outers
uncaught exception: ErrorCall (GMECabalConfigure {gmeMsg = "cabal: readProcessWithExitCode: runInteractiveProcess: exec: does not exist (No such file or directory)"})

10) Info.types works with a module using TemplateHaskell
uncaught exception: ErrorCall (GMECabalConfigure {gmeMsg = "cabal: readProcessWithExitCode: runInteractiveProcess: exec: does not exist (No such file or directory)"})

11) Info.types works with a module that imports another module using TemplateHaskell
uncaught exception: ErrorCall (GMECabalConfigure {gmeMsg = "cabal: readProcessWithExitCode: runInteractiveProcess: exec: does not exist (No such file or directory)"})

12) Info.info works for non-export functions
uncaught exception: ErrorCall (GMECabalConfigure {gmeMsg = "cabal: readProcessWithExitCode: runInteractiveProcess: exec: does not exist (No such file or directory)"})

13) Info.info works with a module using TemplateHaskell
uncaught exception: ErrorCall (GMECabalConfigure {gmeMsg = "cabal: readProcessWithExitCode: runInteractiveProcess: exec: does not exist (No such file or directory)"})

14) Info.info works with a module that imports another module using TemplateHaskell
uncaught exception: ErrorCall (GMECabalConfigure {gmeMsg = "cabal: readProcessWithExitCode: runInteractiveProcess: exec: does not exist (No such file or directory)"})

A complete build log is at http://hydra.cryp.to/build/180776/nixlog/1/raw.

I'm not sure how to interpret that error message. It would be great if the log contained the command that failed; apparently the test suite tries to execute a program that's not in $PATH?

@DanielG
Copy link
Owner

DanielG commented Aug 24, 2014

It does contain the command it's "cabal" ;)

@peti
Copy link
Contributor

peti commented Aug 24, 2014

Ah, I suppose cabal is the executable that the test suite attempts to execute? Is that right? If it is, then the Cabal file should probably declare the dependency to cabal-install in the Build-Tools stanza.

@Fuuzetsu
Copy link
Author

I already tried all this, skim through the thread a bit and you'll see that first I let it use cabal-install (through buildTools but I also tried buildDepends/testDepends) then I ran into homeless-shelter problem so I set HOME to TMPDIR and then we ran into the can't-find-package problem which is where we're stuck now.

This is with 5.0.1.1

@peti
Copy link
Contributor

peti commented Aug 24, 2014

I guess the problem is that the test suite doesn't know how to find the 3rd party libraries required for the build because it doesn't take advantage of the contents of $GHC_PACKAGE_PATH.

@DanielG
Copy link
Owner

DanielG commented Aug 24, 2014

Is $GHC_PACKAGE_PATH something GHC handles or is it provided by the ghc wrappers?

@peti
Copy link
Contributor

peti commented Aug 24, 2014

@DanielG
Copy link
Owner

DanielG commented Aug 24, 2014

Ah, it overrides -package-db on the command line unless you append ":" at the end. I can see how that might cause trouble.

@peti BTW: cabal: Unknown build tool cabal-install

@peti
Copy link
Contributor

peti commented Aug 24, 2014

@DanielG, the build-tool stanza contains executable names, not Haskell package names. If you add cabal there (instead of cabal-install), then it should work.

@Fuuzetsu
Copy link
Author

@peti I had to unset GHC_PACKAGE_PATH when cabal-install is present or the tests don't even begin to run and the build fails so if that's the problem, there needs to be a way to keep $GHC_PACKAGE_PATH for the checkPhase but have cabal not complain about it being set somehow.

@DanielG
Copy link
Owner

DanielG commented Aug 24, 2014

Ah, sorry.

@peti
Copy link
Contributor

peti commented Aug 24, 2014

A possible solution to this situation would be to translate the contents of $GHC_PACKAGE_PATH into command line flags that are passed to cabal. I'm just wondering what would be the best place to implement such a mechanism.

@DanielG, if we pass the paths to all those dependencies in the configure phase to the build of ghc-mod, would those flags be passed on to the cabal invocation in the test suite? If that were the case, then we could solve this fairly easily within the Nix build.

@DanielG
Copy link
Owner

DanielG commented Aug 24, 2014

From: Peter Simons notifications@github.com
Subject: Re: [ghc-mod] Test failures on Nix (#335)
Date: Sun, 24 Aug 2014 11:38:44 -0700

A possible solution to this situation would be to translate the
contents of $GHC_PACKAGE_PATH into command line flags that are
passed to cabal. I'm just wondering what would be the best place
to implement such a mechanism.

@DanielG, if we pass the paths to all those dependencies in the
configure phase to the build of ghc-mod, would those flags be
passed on to the cabal invocation in the test suite?

I'm afraid not.

cabal configure is being called to generate dist/setup-config
during ghc-mod's normal course of operation now. So the build flags
have nothing to do with how cabal configure will be invoked while
running the test suite.

@DanielG
Copy link
Owner

DanielG commented Aug 24, 2014

@peti cabal: Unknown build tool cabal :/

@DanielG
Copy link
Owner

DanielG commented Aug 17, 2015

Is this still a problem or have you guys been able to work around all this stuff somehow?

@peti
Copy link
Contributor

peti commented Aug 17, 2015

these derivations will be built:
  /nix/store/0l3zr54ajr29mpg7njcp7fv543i2m9fk-haskell-ghc-mod-5.3.0.0.drv
building path(s) ‘/nix/store/m1xl272ggf2qj58x5hwg4zgdkm7kp8z0-haskell-ghc-mod-5.3.0.0’
setupCompilerEnvironmentPhase
Build with /nix/store/ys8598yzg0sn6vad400v1mx4wr386hsl-ghc-7.10.2.
unpacking sources
unpacking source archive /nix/store/vwi6j38f5ckga3f5fxzzk00h0zvbszsl-ghc-mod-5.3.0.0.tar.gz
source root is ghc-mod-5.3.0.0
patching sources
compileBuildDriverPhase
setupCompileFlags: -package-db=/tmp/nix-build-haskell-ghc-mod-5.3.0.0.drv-0/package.conf.d -j4 -threaded
[1 of 5] Compiling NotCPP.Utils     ( NotCPP/Utils.hs, /tmp/nix-build-haskell-ghc-mod-5.3.0.0.drv-0/NotCPP/Utils.o )
[2 of 5] Compiling NotCPP.LookupValueName ( NotCPP/LookupValueName.hs, /tmp/nix-build-haskell-ghc-mod-5.3.0.0.drv-0/NotCPP/LookupValueName.o )
[3 of 5] Compiling NotCPP.Declarations ( NotCPP/Declarations.hs, /tmp/nix-build-haskell-ghc-mod-5.3.0.0.drv-0/NotCPP/Declarations.o )
[4 of 5] Compiling SetupCompat      ( SetupCompat.hs, /tmp/nix-build-haskell-ghc-mod-5.3.0.0.drv-0/SetupCompat.o )
[5 of 5] Compiling Main             ( Setup.hs, /tmp/nix-build-haskell-ghc-mod-5.3.0.0.drv-0/Main.o )
Linking Setup ...
configuring
configureFlags: --verbose --prefix=/nix/store/m1xl272ggf2qj58x5hwg4zgdkm7kp8z0-haskell-ghc-mod-5.3.0.0 --libdir=$prefix/lib/$compiler --libsubdir=$pkgid --with-gcc=gcc --package-db=/tmp/nix-build-haskell-ghc-mod-5.3.0.0.drv-0/package.conf.d --ghc-option=-optl=-Wl,-rpath=/nix/store/m1xl272ggf2qj58x5hwg4zgdkm7kp8z0-haskell-ghc-mod-5.3.0.0/lib/ghc-7.10.2/ghc-mod-5.3.0.0 --enable-split-objs --disable-library-profiling --enable-shared --enable-library-vanilla --enable-executable-dynamic --enable-tests
Configuring ghc-mod-5.3.0.0...
Dependency async -any: using async-2.0.2
Dependency base >=4.0 && <5: using base-4.8.1.0
Dependency bytestring -any: using bytestring-0.10.6.0
Dependency cabal-helper >=0.5.1.0 && <0.6: using cabal-helper-0.5.1.0
Dependency cereal >=0.4: using cereal-0.4.1.1
Dependency containers -any: using containers-0.5.6.2
Dependency deepseq -any: using deepseq-1.4.1.1
Dependency directory -any: using directory-1.2.2.0
Dependency djinn-ghc >=0.0.2.2: using djinn-ghc-0.0.2.3
Dependency doctest >=0.9.3: using doctest-0.10.1
Dependency fclabels -any: using fclabels-2.0.2.2
Dependency filepath -any: using filepath-1.4.0.0
Dependency ghc -any: using ghc-7.10.2
Dependency ghc-mod -any: using ghc-mod-5.3.0.0
Dependency ghc-paths -any: using ghc-paths-0.1.0.9
Dependency ghc-syb-utils -any: using ghc-syb-utils-0.2.3
Dependency haskell-src-exts -any: using haskell-src-exts-1.16.0.1
Dependency hlint >=1.8.61: using hlint-1.9.21
Dependency hspec >=2.0.0: using hspec-2.1.10
Dependency monad-control >=1: using monad-control-1.0.0.4
Dependency monad-journal >=0.4: using monad-journal-0.7.1
Dependency mtl >=2.0: using mtl-2.2.1
Dependency old-time -any: using old-time-1.1.0.3
Dependency pretty -any: using pretty-1.1.2.0
Dependency process -any: using process-1.2.3.0
Dependency split -any: using split-0.2.2
Dependency syb -any: using syb-0.5.1
Dependency temporary -any: using temporary-1.2.0.3
Dependency text -any: using text-1.2.1.3
Dependency time -any: using time-1.5.0.1
Dependency transformers -any: using transformers-0.4.2.0
Dependency transformers-base -any: using transformers-base-0.4.4
Using Cabal-1.22.4.0 compiled by ghc-7.10
Using compiler: ghc-7.10.2
Using install prefix:
/nix/store/m1xl272ggf2qj58x5hwg4zgdkm7kp8z0-haskell-ghc-mod-5.3.0.0
Binaries installed in:
/nix/store/m1xl272ggf2qj58x5hwg4zgdkm7kp8z0-haskell-ghc-mod-5.3.0.0/bin
Libraries installed in:
/nix/store/m1xl272ggf2qj58x5hwg4zgdkm7kp8z0-haskell-ghc-mod-5.3.0.0/lib/ghc-7.10.2/ghc-mod-5.3.0.0
Private binaries installed in:
/nix/store/m1xl272ggf2qj58x5hwg4zgdkm7kp8z0-haskell-ghc-mod-5.3.0.0/libexec
Data files installed in:
/nix/store/m1xl272ggf2qj58x5hwg4zgdkm7kp8z0-haskell-ghc-mod-5.3.0.0/share/x86_64-linux-ghc-7.10.2/ghc-mod-5.3.0.0
Documentation installed in:
/nix/store/m1xl272ggf2qj58x5hwg4zgdkm7kp8z0-haskell-ghc-mod-5.3.0.0/share/doc/x86_64-linux-ghc-7.10.2/ghc-mod-5.3.0.0
Configuration files installed in:
/nix/store/m1xl272ggf2qj58x5hwg4zgdkm7kp8z0-haskell-ghc-mod-5.3.0.0/etc
No alex found
Using ar found on system at:
/nix/store/7y7gwvc46y2qfzr683p8zivi277mq0id-binutils-2.23.1/bin/ar
No c2hs found
Using cpphs version 1.19.2 found on system at:
/nix/store/ml29miycylamzvypablb0v13m92hqg57-haskell-cpphs-1.19.2/bin/cpphs
Using gcc version 4.9.3 given by user at:
/nix/store/47sfpm2qclpqvrzijizimk4md1739b1b-gcc-wrapper-4.9.3/bin/gcc
Using ghc version 7.10.2 found on system at:
/nix/store/ys8598yzg0sn6vad400v1mx4wr386hsl-ghc-7.10.2/bin/ghc
Using ghc-pkg version 7.10.2 found on system at:
/nix/store/ys8598yzg0sn6vad400v1mx4wr386hsl-ghc-7.10.2/bin/ghc-pkg
No ghcjs found
No ghcjs-pkg found
No greencard found
Using haddock version 2.16.1 found on system at:
/nix/store/ys8598yzg0sn6vad400v1mx4wr386hsl-ghc-7.10.2/bin/haddock
No happy found
Using haskell-suite found on system at: haskell-suite-dummy-location
Using haskell-suite-pkg found on system at: haskell-suite-pkg-dummy-location
No hmake found
Using hpc version 0.67 found on system at:
/nix/store/ys8598yzg0sn6vad400v1mx4wr386hsl-ghc-7.10.2/bin/hpc
Using hsc2hs version 0.67 found on system at:
/nix/store/ys8598yzg0sn6vad400v1mx4wr386hsl-ghc-7.10.2/bin/hsc2hs
Using hscolour version 1.22 found on system at:
/nix/store/rmvc4v8g4qqc4wajbxdi4afwwdl92si3-hscolour-1.23/bin/HsColour
No jhc found
Using ld found on system at:
/nix/store/47sfpm2qclpqvrzijizimk4md1739b1b-gcc-wrapper-4.9.3/bin/ld
No lhc found
No lhc-pkg found
No pkg-config found
Using strip version 2.23 found on system at:
/nix/store/7y7gwvc46y2qfzr683p8zivi277mq0id-binutils-2.23.1/bin/strip
Using tar found on system at:
/nix/store/rsinzxmvhcng9gggixrvkbs8j9ah24f1-gnutar-1.28/bin/tar
No uhc found
building
Building ghc-mod-5.3.0.0...
Preprocessing library ghc-mod-5.3.0.0...
[ 1 of 41] Compiling Language.Haskell.GhcMod.Read ( Language/Haskell/GhcMod/Read.hs, dist/build/Language/Haskell/GhcMod/Read.o )
[ 2 of 41] Compiling Paths_ghc_mod    ( dist/build/autogen/Paths_ghc_mod.hs, dist/build/Paths_ghc_mod.o )
[ 3 of 41] Compiling Utils            ( Utils.hs, dist/build/Utils.o )
[ 4 of 41] Compiling Language.Haskell.GhcMod.Caching.Types ( Language/Haskell/GhcMod/Caching/Types.hs, dist/build/Language/Haskell/GhcMod/Caching/Types.o )
[ 5 of 41] Compiling Language.Haskell.GhcMod.Types ( Language/Haskell/GhcMod/Types.hs, dist/build/Language/Haskell/GhcMod/Types.o )
[ 6 of 41] Compiling Language.Haskell.GhcMod.Gap ( Language/Haskell/GhcMod/Gap.hs, dist/build/Language/Haskell/GhcMod/Gap.o )
[ 7 of 41] Compiling Language.Haskell.GhcMod.DynFlags ( Language/Haskell/GhcMod/DynFlags.hs, dist/build/Language/Haskell/GhcMod/DynFlags.o )
[ 8 of 41] Compiling Language.Haskell.GhcMod.Doc ( Language/Haskell/GhcMod/Doc.hs, dist/build/Language/Haskell/GhcMod/Doc.o )
[ 9 of 41] Compiling Language.Haskell.GhcMod.SrcUtils ( Language/Haskell/GhcMod/SrcUtils.hs, dist/build/Language/Haskell/GhcMod/SrcUtils.o )
[10 of 41] Compiling Language.Haskell.GhcMod.Monad.Types ( Language/Haskell/GhcMod/Monad/Types.hs, dist/build/Language/Haskell/GhcMod/Monad/Types.o )
[11 of 41] Compiling Language.Haskell.GhcMod.Output ( Language/Haskell/GhcMod/Output.hs, dist/build/Language/Haskell/GhcMod/Output.o )
[12 of 41] Compiling Language.Haskell.GhcMod.Convert ( Language/Haskell/GhcMod/Convert.hs, dist/build/Language/Haskell/GhcMod/Convert.o )
[13 of 41] Compiling Language.Haskell.GhcMod.Pretty ( Language/Haskell/GhcMod/Pretty.hs, dist/build/Language/Haskell/GhcMod/Pretty.o )
[14 of 41] Compiling Language.Haskell.GhcMod.Error ( Language/Haskell/GhcMod/Error.hs, dist/build/Language/Haskell/GhcMod/Error.o )
[15 of 41] Compiling Language.Haskell.GhcMod.Logger ( Language/Haskell/GhcMod/Logger.hs, dist/build/Language/Haskell/GhcMod/Logger.o )
[16 of 41] Compiling Language.Haskell.GhcMod.Utils ( Language/Haskell/GhcMod/Utils.hs, dist/build/Language/Haskell/GhcMod/Utils.o )
[17 of 41] Compiling Language.Haskell.GhcMod.Logging ( Language/Haskell/GhcMod/Logging.hs, dist/build/Language/Haskell/GhcMod/Logging.o )
[18 of 41] Compiling Language.Haskell.GhcMod.Caching ( Language/Haskell/GhcMod/Caching.hs, dist/build/Language/Haskell/GhcMod/Caching.o )
[19 of 41] Compiling Language.Haskell.GhcMod.PathsAndFiles ( Language/Haskell/GhcMod/PathsAndFiles.hs, dist/build/Language/Haskell/GhcMod/PathsAndFiles.o )
[20 of 41] Compiling Language.Haskell.GhcMod.CabalHelper ( Language/Haskell/GhcMod/CabalHelper.hs, dist/build/Language/Haskell/GhcMod/CabalHelper.o )
[21 of 41] Compiling Language.Haskell.GhcMod.GhcPkg ( Language/Haskell/GhcMod/GhcPkg.hs, dist/build/Language/Haskell/GhcMod/GhcPkg.o )
[22 of 41] Compiling Language.Haskell.GhcMod.World ( Language/Haskell/GhcMod/World.hs, dist/build/Language/Haskell/GhcMod/World.o )
[23 of 41] Compiling Language.Haskell.GhcMod.HomeModuleGraph ( Language/Haskell/GhcMod/HomeModuleGraph.hs, dist/build/Language/Haskell/GhcMod/HomeModuleGraph.o )
[24 of 41] Compiling Language.Haskell.GhcMod.Target ( Language/Haskell/GhcMod/Target.hs, dist/build/Language/Haskell/GhcMod/Target.o )
[25 of 41] Compiling Language.Haskell.GhcMod.Cradle ( Language/Haskell/GhcMod/Cradle.hs, dist/build/Language/Haskell/GhcMod/Cradle.o )
[26 of 41] Compiling Language.Haskell.GhcMod.Monad ( Language/Haskell/GhcMod/Monad.hs, dist/build/Language/Haskell/GhcMod/Monad.o )
[27 of 41] Compiling Language.Haskell.GhcMod.FillSig ( Language/Haskell/GhcMod/FillSig.hs, dist/build/Language/Haskell/GhcMod/FillSig.o )
[28 of 41] Compiling Language.Haskell.GhcMod.Find ( Language/Haskell/GhcMod/Find.hs, dist/build/Language/Haskell/GhcMod/Find.o )
[29 of 41] Compiling Language.Haskell.GhcMod.Flag ( Language/Haskell/GhcMod/Flag.hs, dist/build/Language/Haskell/GhcMod/Flag.o )
[30 of 41] Compiling Language.Haskell.GhcMod.Info ( Language/Haskell/GhcMod/Info.hs, dist/build/Language/Haskell/GhcMod/Info.o )
[31 of 41] Compiling Language.Haskell.GhcMod.Lang ( Language/Haskell/GhcMod/Lang.hs, dist/build/Language/Haskell/GhcMod/Lang.o )
[32 of 41] Compiling Language.Haskell.GhcMod.Lint ( Language/Haskell/GhcMod/Lint.hs, dist/build/Language/Haskell/GhcMod/Lint.o )
[33 of 41] Compiling Language.Haskell.GhcMod.Modules ( Language/Haskell/GhcMod/Modules.hs, dist/build/Language/Haskell/GhcMod/Modules.o )
[34 of 41] Compiling Language.Haskell.GhcMod.PkgDoc ( Language/Haskell/GhcMod/PkgDoc.hs, dist/build/Language/Haskell/GhcMod/PkgDoc.o )
[35 of 41] Compiling Language.Haskell.GhcMod.Internal ( Language/Haskell/GhcMod/Internal.hs, dist/build/Language/Haskell/GhcMod/Internal.o )
[36 of 41] Compiling Language.Haskell.GhcMod.Debug ( Language/Haskell/GhcMod/Debug.hs, dist/build/Language/Haskell/GhcMod/Debug.o )
[37 of 41] Compiling Language.Haskell.GhcMod.Check ( Language/Haskell/GhcMod/Check.hs, dist/build/Language/Haskell/GhcMod/Check.o )
[38 of 41] Compiling Language.Haskell.GhcMod.CaseSplit ( Language/Haskell/GhcMod/CaseSplit.hs, dist/build/Language/Haskell/GhcMod/CaseSplit.o )
[39 of 41] Compiling Language.Haskell.GhcMod.Browse ( Language/Haskell/GhcMod/Browse.hs, dist/build/Language/Haskell/GhcMod/Browse.o )
[40 of 41] Compiling Language.Haskell.GhcMod.Boot ( Language/Haskell/GhcMod/Boot.hs, dist/build/Language/Haskell/GhcMod/Boot.o )
[41 of 41] Compiling Language.Haskell.GhcMod ( Language/Haskell/GhcMod.hs, dist/build/Language/Haskell/GhcMod.o )
In-place registering ghc-mod-5.3.0.0...
Preprocessing executable 'ghc-mod' for ghc-mod-5.3.0.0...
[1 of 3] Compiling Misc             ( src/Misc.hs, dist/build/ghc-mod/ghc-mod-tmp/Misc.dyn_o )
[2 of 3] Compiling Paths_ghc_mod    ( dist/build/autogen/Paths_ghc_mod.hs, dist/build/ghc-mod/ghc-mod-tmp/Paths_ghc_mod.dyn_o )
[3 of 3] Compiling Main             ( src/GHCMod.hs, dist/build/ghc-mod/ghc-mod-tmp/Main.dyn_o )
Linking dist/build/ghc-mod/ghc-mod ...
Preprocessing executable 'ghc-modi' for ghc-mod-5.3.0.0...
[1 of 3] Compiling Utils            ( Utils.hs, dist/build/ghc-modi/ghc-modi-tmp/Utils.dyn_o )
[2 of 3] Compiling Paths_ghc_mod    ( dist/build/autogen/Paths_ghc_mod.hs, dist/build/ghc-modi/ghc-modi-tmp/Paths_ghc_mod.dyn_o )
[3 of 3] Compiling Main             ( src/GHCModi.hs, dist/build/ghc-modi/ghc-modi-tmp/Main.dyn_o )
Linking dist/build/ghc-modi/ghc-modi ...
Preprocessing test suite 'doctest' for ghc-mod-5.3.0.0...
[1 of 1] Compiling Main             ( test/doctests.hs, dist/build/doctest/doctest-tmp/Main.dyn_o )
Linking dist/build/doctest/doctest ...
Preprocessing test suite 'spec' for ghc-mod-5.3.0.0...
[ 1 of 54] Compiling Utils            ( Utils.hs, dist/build/spec/spec-tmp/Utils.dyn_o )
[ 2 of 54] Compiling Language.Haskell.GhcMod.Caching.Types ( Language/Haskell/GhcMod/Caching/Types.hs, dist/build/spec/spec-tmp/Language/Haskell/GhcMod/Caching/Types.dyn_o )
[ 3 of 54] Compiling Language.Haskell.GhcMod.Types ( Language/Haskell/GhcMod/Types.hs, dist/build/spec/spec-tmp/Language/Haskell/GhcMod/Types.dyn_o )
[ 4 of 54] Compiling Language.Haskell.GhcMod.Gap ( Language/Haskell/GhcMod/Gap.hs, dist/build/spec/spec-tmp/Language/Haskell/GhcMod/Gap.dyn_o )
[ 5 of 54] Compiling Language.Haskell.GhcMod.Doc ( Language/Haskell/GhcMod/Doc.hs, dist/build/spec/spec-tmp/Language/Haskell/GhcMod/Doc.dyn_o )
[ 6 of 54] Compiling Language.Haskell.GhcMod.DynFlags ( Language/Haskell/GhcMod/DynFlags.hs, dist/build/spec/spec-tmp/Language/Haskell/GhcMod/DynFlags.dyn_o )
[ 7 of 54] Compiling Language.Haskell.GhcMod.SrcUtils ( Language/Haskell/GhcMod/SrcUtils.hs, dist/build/spec/spec-tmp/Language/Haskell/GhcMod/SrcUtils.dyn_o )
[ 8 of 54] Compiling Language.Haskell.GhcMod.Monad.Types ( Language/Haskell/GhcMod/Monad/Types.hs, dist/build/spec/spec-tmp/Language/Haskell/GhcMod/Monad/Types.dyn_o )
[ 9 of 54] Compiling Language.Haskell.GhcMod.Convert ( Language/Haskell/GhcMod/Convert.hs, dist/build/spec/spec-tmp/Language/Haskell/GhcMod/Convert.dyn_o )
[10 of 54] Compiling Language.Haskell.GhcMod.Output ( Language/Haskell/GhcMod/Output.hs, dist/build/spec/spec-tmp/Language/Haskell/GhcMod/Output.dyn_o )
[11 of 54] Compiling Language.Haskell.GhcMod.Pretty ( Language/Haskell/GhcMod/Pretty.hs, dist/build/spec/spec-tmp/Language/Haskell/GhcMod/Pretty.dyn_o )
[12 of 54] Compiling Language.Haskell.GhcMod.Logging ( Language/Haskell/GhcMod/Logging.hs, dist/build/spec/spec-tmp/Language/Haskell/GhcMod/Logging.dyn_o )
[13 of 54] Compiling Paths_ghc_mod    ( dist/build/autogen/Paths_ghc_mod.hs, dist/build/spec/spec-tmp/Paths_ghc_mod.dyn_o )
[14 of 54] Compiling Language.Haskell.GhcMod.Caching ( Language/Haskell/GhcMod/Caching.hs, dist/build/spec/spec-tmp/Language/Haskell/GhcMod/Caching.dyn_o )
[15 of 54] Compiling Language.Haskell.GhcMod.Error ( Language/Haskell/GhcMod/Error.hs, dist/build/spec/spec-tmp/Language/Haskell/GhcMod/Error.dyn_o )
[16 of 54] Compiling Language.Haskell.GhcMod.Logger ( Language/Haskell/GhcMod/Logger.hs, dist/build/spec/spec-tmp/Language/Haskell/GhcMod/Logger.dyn_o )
[17 of 54] Compiling Language.Haskell.GhcMod.HomeModuleGraph ( Language/Haskell/GhcMod/HomeModuleGraph.hs, dist/build/spec/spec-tmp/Language/Haskell/GhcMod/HomeModuleGraph.dyn_o )
[18 of 54] Compiling Language.Haskell.GhcMod.Utils ( Language/Haskell/GhcMod/Utils.hs, dist/build/spec/spec-tmp/Language/Haskell/GhcMod/Utils.dyn_o )
[19 of 54] Compiling Language.Haskell.GhcMod.PathsAndFiles ( Language/Haskell/GhcMod/PathsAndFiles.hs, dist/build/spec/spec-tmp/Language/Haskell/GhcMod/PathsAndFiles.dyn_o )
[20 of 54] Compiling Language.Haskell.GhcMod.CabalHelper ( Language/Haskell/GhcMod/CabalHelper.hs, dist/build/spec/spec-tmp/Language/Haskell/GhcMod/CabalHelper.dyn_o )
[21 of 54] Compiling Language.Haskell.GhcMod.Cradle ( Language/Haskell/GhcMod/Cradle.hs, dist/build/spec/spec-tmp/Language/Haskell/GhcMod/Cradle.dyn_o )
[22 of 54] Compiling Language.Haskell.GhcMod.GhcPkg ( Language/Haskell/GhcMod/GhcPkg.hs, dist/build/spec/spec-tmp/Language/Haskell/GhcMod/GhcPkg.dyn_o )
[23 of 54] Compiling Language.Haskell.GhcMod.Target ( Language/Haskell/GhcMod/Target.hs, dist/build/spec/spec-tmp/Language/Haskell/GhcMod/Target.dyn_o )
[24 of 54] Compiling Language.Haskell.GhcMod.Monad ( Language/Haskell/GhcMod/Monad.hs, dist/build/spec/spec-tmp/Language/Haskell/GhcMod/Monad.dyn_o )
[25 of 54] Compiling Language.Haskell.GhcMod.Browse ( Language/Haskell/GhcMod/Browse.hs, dist/build/spec/spec-tmp/Language/Haskell/GhcMod/Browse.dyn_o )
[26 of 54] Compiling Language.Haskell.GhcMod.CaseSplit ( Language/Haskell/GhcMod/CaseSplit.hs, dist/build/spec/spec-tmp/Language/Haskell/GhcMod/CaseSplit.dyn_o )
[27 of 54] Compiling Language.Haskell.GhcMod.Check ( Language/Haskell/GhcMod/Check.hs, dist/build/spec/spec-tmp/Language/Haskell/GhcMod/Check.dyn_o )
[28 of 54] Compiling Language.Haskell.GhcMod.FillSig ( Language/Haskell/GhcMod/FillSig.hs, dist/build/spec/spec-tmp/Language/Haskell/GhcMod/FillSig.dyn_o )
[29 of 54] Compiling Language.Haskell.GhcMod.Flag ( Language/Haskell/GhcMod/Flag.hs, dist/build/spec/spec-tmp/Language/Haskell/GhcMod/Flag.dyn_o )
[30 of 54] Compiling Language.Haskell.GhcMod.Info ( Language/Haskell/GhcMod/Info.hs, dist/build/spec/spec-tmp/Language/Haskell/GhcMod/Info.dyn_o )
[31 of 54] Compiling Language.Haskell.GhcMod.Lang ( Language/Haskell/GhcMod/Lang.hs, dist/build/spec/spec-tmp/Language/Haskell/GhcMod/Lang.dyn_o )
[32 of 54] Compiling Language.Haskell.GhcMod.Lint ( Language/Haskell/GhcMod/Lint.hs, dist/build/spec/spec-tmp/Language/Haskell/GhcMod/Lint.dyn_o )
[33 of 54] Compiling Language.Haskell.GhcMod.Modules ( Language/Haskell/GhcMod/Modules.hs, dist/build/spec/spec-tmp/Language/Haskell/GhcMod/Modules.dyn_o )
[34 of 54] Compiling Language.Haskell.GhcMod.Boot ( Language/Haskell/GhcMod/Boot.hs, dist/build/spec/spec-tmp/Language/Haskell/GhcMod/Boot.dyn_o )
[35 of 54] Compiling Language.Haskell.GhcMod.PkgDoc ( Language/Haskell/GhcMod/PkgDoc.hs, dist/build/spec/spec-tmp/Language/Haskell/GhcMod/PkgDoc.dyn_o )
[36 of 54] Compiling Language.Haskell.GhcMod.World ( Language/Haskell/GhcMod/World.hs, dist/build/spec/spec-tmp/Language/Haskell/GhcMod/World.dyn_o )
[37 of 54] Compiling Language.Haskell.GhcMod.Find ( Language/Haskell/GhcMod/Find.hs, dist/build/spec/spec-tmp/Language/Haskell/GhcMod/Find.dyn_o )
[38 of 54] Compiling Language.Haskell.GhcMod.Internal ( Language/Haskell/GhcMod/Internal.hs, dist/build/spec/spec-tmp/Language/Haskell/GhcMod/Internal.dyn_o )
[39 of 54] Compiling Language.Haskell.GhcMod.Debug ( Language/Haskell/GhcMod/Debug.hs, dist/build/spec/spec-tmp/Language/Haskell/GhcMod/Debug.dyn_o )
[40 of 54] Compiling Language.Haskell.GhcMod ( Language/Haskell/GhcMod.hs, dist/build/spec/spec-tmp/Language/Haskell/GhcMod.dyn_o )
[41 of 54] Compiling TestUtils        ( test/TestUtils.hs, dist/build/spec/spec-tmp/TestUtils.dyn_o )

test/TestUtils.hs:21:1: Warning:
    The import of ‘Control.Applicative’ is redundant
      except perhaps to import instances from ‘Control.Applicative’
    To import instances alone, use: import Control.Applicative()
[42 of 54] Compiling FlagSpec         ( test/FlagSpec.hs, dist/build/spec/spec-tmp/FlagSpec.dyn_o )

test/FlagSpec.hs:3:1: Warning:
    The import of ‘Control.Applicative’ is redundant
      except perhaps to import instances from ‘Control.Applicative’
    To import instances alone, use: import Control.Applicative()
[43 of 54] Compiling HomeModuleGraphSpec ( test/HomeModuleGraphSpec.hs, dist/build/spec/spec-tmp/HomeModuleGraphSpec.dyn_o )
[44 of 54] Compiling InfoSpec         ( test/InfoSpec.hs, dist/build/spec/spec-tmp/InfoSpec.dyn_o )

test/InfoSpec.hs:4:1: Warning:
    The import of ‘Control.Applicative’ is redundant
      except perhaps to import instances from ‘Control.Applicative’
    To import instances alone, use: import Control.Applicative()
[45 of 54] Compiling LangSpec         ( test/LangSpec.hs, dist/build/spec/spec-tmp/LangSpec.dyn_o )

test/LangSpec.hs:3:1: Warning:
    The import of ‘Control.Applicative’ is redundant
      except perhaps to import instances from ‘Control.Applicative’
    To import instances alone, use: import Control.Applicative()
[46 of 54] Compiling LintSpec         ( test/LintSpec.hs, dist/build/spec/spec-tmp/LintSpec.dyn_o )
[47 of 54] Compiling ListSpec         ( test/ListSpec.hs, dist/build/spec/spec-tmp/ListSpec.dyn_o )

test/ListSpec.hs:3:1: Warning:
    The import of ‘Control.Applicative’ is redundant
      except perhaps to import instances from ‘Control.Applicative’
    To import instances alone, use: import Control.Applicative()
[48 of 54] Compiling MonadSpec        ( test/MonadSpec.hs, dist/build/spec/spec-tmp/MonadSpec.dyn_o )
[49 of 54] Compiling PathsAndFilesSpec ( test/PathsAndFilesSpec.hs, dist/build/spec/spec-tmp/PathsAndFilesSpec.dyn_o )
[50 of 54] Compiling Dir              ( test/Dir.hs, dist/build/spec/spec-tmp/Dir.dyn_o )
[51 of 54] Compiling BrowseSpec       ( test/BrowseSpec.hs, dist/build/spec/spec-tmp/BrowseSpec.dyn_o )

test/BrowseSpec.hs:3:1: Warning:
    The import of ‘Control.Applicative’ is redundant
      except perhaps to import instances from ‘Control.Applicative’
    To import instances alone, use: import Control.Applicative()
[52 of 54] Compiling CheckSpec        ( test/CheckSpec.hs, dist/build/spec/spec-tmp/CheckSpec.dyn_o )
[53 of 54] Compiling Spec             ( test/Spec.hs, dist/build/spec/spec-tmp/Spec.dyn_o )
[54 of 54] Compiling Main             ( test/Main.hs, dist/build/spec/spec-tmp/Main.dyn_o )
Linking dist/build/spec/spec ...
running tests
Running 2 test suites...
Test suite doctest: RUNNING...
Test suite doctest: PASS
Test suite logged to: dist/test/ghc-mod-5.3.0.0-doctest.log
Test suite spec: RUNNING...
cabal-install version 1.22.6.0
using version 1.22.4.0 of the Cabal library 
The Glorious Glasgow Haskell Compilation System, version 7.10.2
DEBUG: setup configuration is out of date, reconfiguring Cabal project.
cabal: /homeless-shelter: permission denied
DEBUG: setup configuration is out of date, reconfiguring Cabal project.
cabal: /homeless-shelter: permission denied
DEBUG: setup configuration is out of date, reconfiguring Cabal project.
cabal: /homeless-shelter: permission denied
Config file path source is default config file.
Config file /homeless-shelter/.cabal/config not found.
Writing default configuration to /homeless-shelter/.cabal/config
cabal: /homeless-shelter: permission denied
DEBUG: setup configuration is out of date, reconfiguring Cabal project.
cabal: /homeless-shelter: permission denied
DEBUG: loadTargets: Loading: Mutual1.hs
info: loadTargets:
      Target needs interpeter, switching to LinkInMemory/HscInterpreted. Perfectly normal if anything is using TemplateHaskell, QuasiQuotes or PatternSynonyms.
DEBUG: loadTargets: Loading: QuasiQuotes.hs
info: loadTargets:
      Target needs interpeter, switching to LinkInMemory/HscInterpreted. Perfectly normal if anything is using TemplateHaskell, QuasiQuotes or PatternSynonyms.
DEBUG: setup configuration is out of date, reconfiguring Cabal project.
cabal: /homeless-shelter: permission denied
DEBUG: loadTargets: Loading: ForeignExport.hs
DEBUG: setup configuration is out of date, reconfiguring Cabal project.
cabal: /homeless-shelter: permission denied
DEBUG: loadTargets: Loading: DesugarWarnings.hs
cleaning...
Package has never been configured. Configuring with default flags. If this
fails, please run configure manually.
Config file path source is default config file.
Config file /homeless-shelter/.cabal/config not found.
Writing default configuration to /homeless-shelter/.cabal/config
cabal: /homeless-shelter: permission denied
DEBUG: setup configuration is out of date, reconfiguring Cabal project.
cabal: /homeless-shelter: permission denied
Warning: preprocess "A1.hs": phase `C pre-processor' failed (exitcode = 1)
DEBUG: setup configuration is out of date, reconfiguring Cabal project.
cabal: /homeless-shelter: permission denied
EXCEPTION: types:
           readCreateProcess: cabal "configure" "--with-ghc=ghc" (exit 1): failed
DEBUG: loadTargets: Loading: Bar.hs
info: loadTargets:
      Target needs interpeter, switching to LinkInMemory/HscInterpreted. Perfectly normal if anything is using TemplateHaskell, QuasiQuotes or PatternSynonyms.
DEBUG: loadTargets: Loading: ImportsTH.hs
info: loadTargets:
      Target needs interpeter, switching to LinkInMemory/HscInterpreted. Perfectly normal if anything is using TemplateHaskell, QuasiQuotes or PatternSynonyms.
DEBUG: loadTargets: Loading: Fib.hs
info: loadTargets:
      Target needs interpeter, switching to LinkInMemory/HscInterpreted. Perfectly normal if anything is using TemplateHaskell, QuasiQuotes or PatternSynonyms.
DEBUG: loadTargets: Loading: Bar.hs
info: loadTargets:
      Target needs interpeter, switching to LinkInMemory/HscInterpreted. Perfectly normal if anything is using TemplateHaskell, QuasiQuotes or PatternSynonyms.
DEBUG: loadTargets: Loading: ImportsTH.hs
info: loadTargets:
      Target needs interpeter, switching to LinkInMemory/HscInterpreted. Perfectly normal if anything is using TemplateHaskell, QuasiQuotes or PatternSynonyms.
$ find test \( -name setup-config -o  -name setup-config.ghc-mod.cabal-helper -o  -name setup-config.ghc-mod.cabal-components -o  -name setup-config.ghc-mod.resolved-components -o  -name setup-config.ghc-mod.package-options -o  -name setup-config.ghc-mod.package-db-stack -o  -name ghc-mod.cache \) -exec rm {} \;
Root directory:       /tmp/nix-build-haskell-ghc-mod-5.3.0.0.drv-0/ghc-mod-5.3.0.0
Current directory:    /tmp/nix-build-haskell-ghc-mod-5.3.0.0.drv-0/ghc-mod-5.3.0.0
GHC Package flags:
    -i/tmp/nix-build-haskell-ghc-mod-5.3.0.0.drv-0/ghc-mod-5.3.0.0
    -i/tmp/nix-build-haskell-ghc-mod-5.3.0.0.drv-0/ghc-mod-5.3.0.0
    -global-package-db -user-package-db -Wall
GHC System libraries: /nix/store/ys8598yzg0sn6vad400v1mx4wr386hsl-ghc-7.10.2/lib/ghc-7.10.2
GHC user options:



Browse
  browse Data.Map
    contains at least `differenceWithKey'
  browse -d Data.Either
    contains functions (e.g. `either') including their type signature
    contains type constructors (e.g. `Left') including their type signature
  `browse' in a project directory
    can list symbols defined in a a local module FAILED [1]
Check
  checkSyntax
    works even if an executable depends on the library defined in the same cabal file FAILED [2]
    works even if a module imports another module from a different directory FAILED [3]
    detects cyclic imports
    works with modules using QuasiQuotes
    works with modules using PatternSynonyms FAILED [4]
    works with foreign exports
    when no errors are found
      doesn't output an empty line FAILED [5]
    emits warnings generated in GHC's desugar stage
    works with cabal builtin preprocessors FAILED [6]
Flag
  flags
    contains at least `-fno-warn-orphans'
HomeModuleGraph
  reachable
    reachable Set.empty g == Set.empty
    lists only reachable nodes
  homeModuleGraph
    cycles don't break it
    follows imports
    returns partial results on parse errors
    returns partial results on CPP errors
  updateHomeModuleGraph
    removes unreachable nodes
Info
  types
    shows types of the expression and its outers FAILED [7]
    works with a module using TemplateHaskell
    works with a module that imports another module using TemplateHaskell
  info
    works for non exported functions
    works with a module using TemplateHaskell
    works with a module that imports another module using TemplateHaskell
Lang
  languages
    contains at lest `OverloadedStrings'
Lint
  lint
    can detect a redundant import
    when no suggestions are given
      doesn't output an empty line
List
  modules
    contains at least `Data.Map'
Monad
  When using GhcModT in a do block
    a pattern match failure causes a call to `fail` on ErrorT in the monad stack
PathsAndFiles
  getSandboxDb
    can parse a config file and extract the sandbox package-db
    returns Nothing if the sandbox config file is broken
  findCabalFile
    works
    finds cabal files in parent directories
  findCabalSandboxDir
    works
    finds sandboxes in parent directories

Failures:

  test/BrowseSpec.hs:29:
  1) Browse, `browse' in a project directory, can list symbols defined in a a local module
       test/BrowseSpec.hs:32:
       [] does not contain ["foo"]

  test/CheckSpec.hs:16:
  2) Check.checkSyntax works even if an executable depends on the library defined in the same cabal file
       uncaught exception: IOException of type OtherError (readCreateProcess: cabal "configure" "--with-ghc=ghc" (exit 1): failed)

  test/CheckSpec.hs:22:
  3) Check.checkSyntax works even if a module imports another module from a different directory
       uncaught exception: IOException of type OtherError (readCreateProcess: cabal "configure" "--with-ghc=ghc" (exit 1): failed)

  test/CheckSpec.hs:39:
  4) Check.checkSyntax works with modules using PatternSynonyms
       uncaught exception: IOException of type OtherError (readCreateProcess: cabal "configure" "--with-ghc=ghc" (exit 1): failed)

  test/CheckSpec.hs:51:
  5) Check.checkSyntax, when no errors are found, doesn't output an empty line
       uncaught exception: IOException of type OtherError (readCreateProcess: cabal "configure" "--with-ghc=ghc" (exit 1): failed)

  test/CheckSpec.hs:64:
  6) Check.checkSyntax works with cabal builtin preprocessors
       uncaught exception: IOException of type OtherError (readCreateProcess: cabal "configure" "--with-ghc=ghc" (exit 1): failed)

  test/InfoSpec.hs:19:
  7) Info.types shows types of the expression and its outers
       test/InfoSpec.hs:22:
       expected: "9 5 11 40 \"Int -> a -> a -> a\"\n7 1 11 40 \"Int -> Integer\"\n"
        but got: ""

Randomized with seed 18159604

Finished in 1.9541 seconds
38 examples, 7 failures
Test suite spec: FAIL
Test suite logged to: dist/test/ghc-mod-5.3.0.0-spec.log
1 of 2 test suites (1 of 2 test cases) passed.
builder for ‘/nix/store/0l3zr54ajr29mpg7njcp7fv543i2m9fk-haskell-ghc-mod-5.3.0.0.drv’ failed with exit code 1
error: build of ‘/nix/store/0l3zr54ajr29mpg7njcp7fv543i2m9fk-haskell-ghc-mod-5.3.0.0.drv’ failed

@DanielG
Copy link
Owner

DanielG commented Aug 17, 2015

...Ok? So I see a bunch of $HOME not being there things because of cabal and some package-db problems.

@peti
Copy link
Contributor

peti commented Aug 17, 2015

I guess that answers your question, no?

@DanielG
Copy link
Owner

DanielG commented Aug 17, 2015

Well yeah, now the question is do you actually want to do something about it :P

@peti
Copy link
Contributor

peti commented Aug 17, 2015

No, I don't. ghc-mod makes a lot of assumptions about the build environment that clearly don't hold, and I don't want my to spend my time building a custom environment just for this project. My preferred "solution" for Nix is to just not run the test suite. If someone else steps up and figures this out, then I'd be hugely in favor of it, but I won't do it.

@DanielG
Copy link
Owner

DanielG commented Aug 17, 2015

Fine, whatever.

@DanielG DanielG closed this as completed Aug 17, 2015
@domenkozar
Copy link

I'm getting this error using ghc-mod with atom on Nix

EDIT: installing cabal-install works, but then it wants all the packages in environment..

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants