hdevtools
hdevtools copied to clipboard
Not working under hsenv
I'm testing out hsenv to manage my packages; I created a new hsenv and installed hdevtools under it; however, unless I also manually specify the -package-conf with -g, it doesn't find packages inside the hsenv. I'm 100% sure I'm using the sandboxed hdevtools, so that's not the problem.
I use hsenv and hdevtools works fine with it. Which version of hsenv are you using? The recommended version is this fork: https://github.com/tmhedberg/hsenv
Can you give more details about your setup?
I'm using GHC 7.4.1, hsenv 0.3 (just cloned it from that repo since I was using the old one), hdevtools 0.1.0.5 (installed from hackage), on OS X 10.8. When I run the hsenv's hdevtools with -g -v it does say that it's using the 'default' user package cache, even though I built it from source under my hsenv.
This doesn't work for me either, with the latest hdevtools and hsenv in Hackage.
@jwiegley Which operating system?
Mac OS X 10.8.3, using GHC 7.4.2
It seems that this an issue only on Mac OS X then, which I don't use so unfortunately I can't help much. If someone else could figure out what's going on that would be great.
I've tried setting -g --package-conf=..., but then I get other errors, like the Text type not matching "...explicit package..Text", when the package mentioned as the explicit package is exactly the one I have installed. Haven't been able to progress beyond that point yet, but I'll keep thinking about it. I miss hdevtools!!
Ok, I can confirm that this does not work for regular hsenv usage.
I always use hsenv with the --ghc option to install an internal GHC version, and with this usage hdevtools works fine inside the hsenv.
Advice/patches on how to fix hdevtools for regular hsenv usage are welcome
/sub
I can confirm that hsenv with the --ghc option is working great for me too.
The only flaw in hdevtools that I can see now, compared to just using ghc, is that I cannot type check against modules in a Cabal project that has never been cabal-install'd. I constantly find myself having downgrade to plain ghc to get checking in these situations.
@jwiegley
The only flaw in hdevtools that I can see now, compared to just using ghc, is that I cannot type check against modules in a Cabal project that has never been cabal-install'd
You mean configured, not installed? I can check configured, non-installed packages just fine with
hdevtools check -g -package-confdist/package.conf.inplace \
-g -idist/build/autogen -g -optP-include -g -optPdist/build/autogen/cabal_macros.h
For example, I have the following files:
Foo/Bar.hsFoo/Bar/Baz.hs
I edit Bar.hs, then edit Baz.hs. hdevtools does not see the edits to Bar.hs while checking Baz.hs, while ghc always does.
@jwiegley Works for me. Can you provide a testcase?
Hmm.. I'm having difficulty reproducing in a sample test case, actually. I'll keep an eye out for commonalities in the situations where I'm forced to switch back to ghc.