1

So it looks like hdevtools cannot be directly used with ghcjs. Using stack install hdevtools within a GHCJS stack project gives me:

Error: While constructing the build plan, the following exceptions were encountered:

In the dependencies for hdevtools-0.1.5.0:
    ghc must match >=7.2, but the stack configuration has no specified version

Plan construction failed.

But since GHCJS and GHC should (I hope) both give the same errors and have the same types and things in scope for the same codebase. Then I would be happy if I also had GHC + dependencies simultaneously installed, purely for hdevtools (and perhaps for GHCI, as GHCJS doesn't support interpreted mode). Anyone know the best way to do this?

stack install ghc errors out purely with:

Error: While constructing the build plan, the following exceptions were encountered:

Plan construction failed.

So that does not appear to be a solution.

I would rather not switch back and forth every time I deploy or anything like that. But I also wouldn't completely rule it out.

semicolon
  • 2,530
  • 27
  • 37
  • This has all of the hallmarks of a `stack` misconfiguration. Are you building `hdevtools` from source or are you using the `stack` global project to build `hdevtools`? – scooter me fecit Mar 01 '17 at 01:32
  • Also, you don't `stack install ghc`. You could `stack build --install-ghc` to get the proper `ghc` version installed. – scooter me fecit Mar 01 '17 at 01:32
  • @scootermefecit For all my other projects I just use `stack install hdevtools` and everything works wonderfully. I assume I can't use the global project, since `hdevtools` needs to know about local library installs? Or am I wrong on that? Also I tried `stack build --install-ghc` and it didn't change anything, still can't install or use `hdevtools`. – semicolon Mar 01 '17 at 05:49
  • @scootermefecit It does seem like hdevtools does have to be compiled with the same version/compiler as the files it is checking, so idk how to compile it with ghc then use it on what are essentially ghcjs files. – semicolon Mar 01 '17 at 05:52
  • Hmm this is confusing, when I do `--start-server` it will create the `.hevtools.sock` file (`ls` shows it), but it will be deleted very shortly after, (next `ls` doesn't show it). – semicolon Mar 01 '17 at 05:55
  • Keep in mind that the `stack`' "global" configuration will do something similar to `cabal install`: fetch package from hackage, unpack, build, install. So, you're at the mercy of hackage in terms of whether the code you're building is current or close to current. Best bet (what I do): clone the appropriate git repo, then build within the cloned repo. – scooter me fecit Mar 14 '17 at 17:50
  • If you `ps`, is there a `hdevtools` process still running? If not, it likely died. – scooter me fecit Mar 14 '17 at 17:57
  • I ended up figuring it out, but I totally forgot about this question and I don't think I remember how I fixed it. – semicolon Mar 15 '17 at 00:33

0 Answers0