kazu-yamamoto / hhp

Happy Haskell Programming
BSD 3-Clause "New" or "Revised" License
67 stars 5 forks source link

getPackageDbStack: Default PackageDb stack is empty #5

Closed ttuegel closed 3 years ago

ttuegel commented 5 years ago

Without a sandbox, return an empty PackageDb stack. This does the correct thing in most environments:

rikvdkleij commented 5 years ago

@ttuegel I have tried your change to get hhp working on a Cabal project that's build with new-build but without succes. See also #7 . It looks like the .ghc.environment.x86_64-darwin-8.4.4 file is not read.

ttuegel commented 5 years ago

@rikvdkleij I am testing by launching HHP inside cabal v2-exec; does that help?

rikvdkleij commented 5 years ago

@ttuegel Yes, that helps. Thanks!

But it would be nicer if the .ghc.environment.x86_64-darwin-8.4.4 would be used 😄

Btw, this error is displayed as first

Dummy:0:0:Error:Loaded package environment from /Users/rik/haskell/quicksort/dist-newstyle/tmp/environment.-5663/.ghc.environment.x86_64-darwin-8.4.4
ttuegel commented 5 years ago

But it would be nicer if the .ghc.environment.x86_64-darwin-8.4.4 would be used

Yes, and I will certainly investigate why it is not!

ttuegel commented 5 years ago

One problem with this pull request is that ghc-pkg does not respect GHC_ENVIRONMENT, although ghci does; this breaks Hhp.GhcPkg.ghcPkgListEx.