bad error message when incorrect format package db is supplied
|Reported by:||gfxmonk||Owned by:||pcapriotti|
|Type of failure:||Compile-time crash||Test Case:|
|Related Tickets:||Differential Rev(s):|
I built a standalone package using cabal, and then ran:
cabal register --gen-pkg-config="$BUILDDIR/package.conf" --builddir="$BUILDDIR"
When I tried to compile or run a haskell file (using ghc or runghc), with GHC_PACKAGE_PATH="$BUILDDIR/package.conf", I get:
ghc: panic! (the 'impossible' happened) (GHC version 7.0.4 for x86_64-unknown-linux): Prelude.read: no parse Please report this as a GHC bug: http://www.haskell.org/ghc/reportabug
Curiosity and exploration reveals (I think - I am largely guessing) that the thing that's supposed to be in GHC_PACKAGE_PATH is the haskell-syntax "package.conf.inplace", not "package.conf". This took me a while and a lot of frustration however, so a better error would be appreciated for next time I forget how this works.
I'm also not entirely sure where package.conf.inplace comes from, it seems to be a side process of the registration but I can't find any documentation or instructions on building one speicifically (rather than accidentally).
Change History (6)
comment:3 in reply to: ↑ 2 Changed 4 years ago by duncan
- Summary changed from ghc dies when I use a package.conf in $GHC_PACKAGE_PATH to bad error message when incorrect format package db is supplied