Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not working under hsenv #12

Open
lightquake opened this issue Feb 15, 2013 · 14 comments
Open

Not working under hsenv #12

lightquake opened this issue Feb 15, 2013 · 14 comments

Comments

@lightquake
Copy link

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.

@bitc
Copy link
Owner

bitc commented Feb 15, 2013

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?

@lightquake
Copy link
Author

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.

@jwiegley
Copy link

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

@bitc
Copy link
Owner

bitc commented May 15, 2013

@jwiegley Which operating system?

@jwiegley
Copy link

Mac OS X 10.8.3, using GHC 7.4.2

@bitc
Copy link
Owner

bitc commented May 16, 2013

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.

@jwiegley
Copy link

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

@bitc
Copy link
Owner

bitc commented Jul 4, 2013

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

@polux
Copy link

polux commented Jul 16, 2013

/sub

@jwiegley
Copy link

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.

@neko-kai
Copy link

@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

@jwiegley
Copy link

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.

@neko-kai
Copy link

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

@jwiegley
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants