hdevtools icon indicating copy to clipboard operation
hdevtools copied to clipboard

Not working under hsenv

Open lightquake opened this issue 12 years ago • 14 comments

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.

lightquake avatar Feb 15 '13 07:02 lightquake

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?

bitc avatar Feb 15 '13 14:02 bitc

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.

lightquake avatar Feb 15 '13 16:02 lightquake

This doesn't work for me either, with the latest hdevtools and hsenv in Hackage.

jwiegley avatar May 15 '13 06:05 jwiegley

@jwiegley Which operating system?

bitc avatar May 15 '13 19:05 bitc

Mac OS X 10.8.3, using GHC 7.4.2

jwiegley avatar May 15 '13 21:05 jwiegley

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.

bitc avatar May 16 '13 18:05 bitc

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!!

jwiegley avatar May 16 '13 22:05 jwiegley

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

bitc avatar Jul 04 '13 23:07 bitc

/sub

polux avatar Jul 16 '13 19:07 polux

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 avatar Jul 16 '13 20:07 jwiegley

@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

neko-kai avatar Jul 28 '13 10:07 neko-kai

For example, I have the following files:

  • Foo/Bar.hs
  • Foo/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 avatar Jul 28 '13 22:07 jwiegley

@jwiegley Works for me. Can you provide a testcase?

neko-kai avatar Jul 29 '13 06:07 neko-kai

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.

jwiegley avatar Jul 29 '13 07:07 jwiegley