dcoutts 2017-01-31 09:48:57
ClaudiusMaximus: you can use ghc-pkg to re-generate that cache, but certainly it should not get corrupted in the first place. cabal is always careful to check that the version of ghc & ghc-pkg match to avoid such issues.
dcoutts 2017-01-31 09:49:10
ClaudiusMaximus: use ghc-pkg-8.0.1 recache --package-db= ...
dcoutts 2017-01-31 09:49:36
if you find out what causes it then do report it
ClaudiusMaximus 2017-01-31 09:53:38
dcoutts: ah, i used cabal exec -- runghc in a sandbox built with ghc-8.0.1 forgetting i had installed ghc-8.0.2, then cabal exec -- ghc-8.0.1 spat out that error (the directory is in the prefix where i have ghc installed, not the sandbox)
ClaudiusMaximus 2017-01-31 09:53:56
dcoutts: but i deleted the sandbox already and am recreating it with ghc-8.0.2
ClaudiusMaximus 2017-01-31 09:55:06
dcoutts: it's a cabal issue (perhaps limited to cabal exec), as ghc-8.0.1 alone works fine (but doesn't see the sandbox)
dcoutts 2017-01-31 09:56:13
ClaudiusMaximus: cabal exec sets up the environment to point to the package db in the sandbox, but yes if you run a different version of ghc in that context then it's not going to work
dcoutts 2017-01-31 09:56:46
it's unclear how cabal could prevent you from doing that
ClaudiusMaximus 2017-01-31 09:58:31
dcoutts: sandbox was working fine iwth ghc8.0.1 until i installed ghc-8.0.2, then cabal exec -- ghc-8.0.1 spat out the error, but ghc-8.0.1 (without cabal exec) didn't, and the path mentioned was in my ~/opt/lib/ghc-8.0.2/...
ClaudiusMaximus 2017-01-31 09:59:00
dcoutts: so perhaps cabal exec is adding paths from the current ghc version, instead of the ghc version corresponding to the sandbox?
dcoutts 2017-01-31 09:59:20
hmm, that's plausible
dcoutts 2017-01-31 09:59:43
ClaudiusMaximus: if so, this is something that'll work properly with the new-build stuff, since it's much more deliberate about what its configuration is
ClaudiusMaximus 2017-01-31 09:59:58
cool
dcoutts 2017-01-31 10:00:01
ClaudiusMaximus: but please do file a ticket with whatever details you have
ClaudiusMaximus 2017-01-31 10:00:28
ok
dcoutts 2017-01-31 10:00:30
ClaudiusMaximus: can't promise someone will fix it for the old sandbox code, but we can at least check it doesn't still happen with the new stuff
ClaudiusMaximus 2017-01-31 10:00:39
where should i file it?
dcoutts 2017-01-31 10:01:07
ClaudiusMaximus: the cabal github instance, see cabal info cabal-install
ClaudiusMaximus 2017-01-31 10:01:11
cool
ClaudiusMaximus 2017-01-31 10:16:30
dcoutts: filed, https://github.com/haskell/cabal/issues/4287
dcoutts 2017-01-31 10:16:37
ta
dcoutts 2017-01-31 10:19:02
ClaudiusMaximus: could you add one more thing, the result of: cabal exec -- echo '$GHC_PACKAGE_PATH'
dcoutts 2017-01-31 10:19:33
to confirm exactly what that gets set to, or if that escaping doesn't work, use cabal exec bash, and then use echo $GHC_PACKAGE_PATH from within that shell
Zemyla 2017-01-31 10:31:13
How do I kill a Haskell Platform installation on Windows and replace it with Stack?
Rem_ 2017-01-31 10:33:17
:)
ClaudiusMaximus 2017-01-31 10:34:56
dcoutts: ok