lukexi / halive

Live recompiler for Haskell
BSD 2-Clause "Simplified" License
263 stars 18 forks source link

Can't install #29

Closed Eoksni closed 6 years ago

Eoksni commented 6 years ago

stack install halive results in this

    Configuring halive-0.1.3...
    Preprocessing library for halive-0.1.3..
    Building library for halive-0.1.3..
    [1 of 6] Compiling Halive.Concurrent ( src\Halive\Concurrent.hs, .stack-work\dist\5c8418a7\build\Halive\Concurrent.o )
    [2 of 6] Compiling Halive.FileListener ( src\Halive\FileListener.hs, .stack-work\dist\5c8418a7\build\Halive\FileListener.o )
    [3 of 6] Compiling Halive.FindPackageDBs ( src\Halive\FindPackageDBs.hs, .stack-work\dist\5c8418a7\build\Halive\FindPackageDBs.o )

    src\Halive\FindPackageDBs.hs:33:7: error:
        Not in scope: `extraPkgConfs'
       |
    33 |     { extraPkgConfs =
       |       ^^^^^^^^^^^^^

    src\Halive\FindPackageDBs.hs:56:29: error:
        Not in scope: `extraPkgConfs'
       |
    56 |             return dflags { extraPkgConfs = (pkgs ++) . extraPkgConfs dflags }
       |                             ^^^^^^^^^^^^^

    src\Halive\FindPackageDBs.hs:78:29: error:
        Not in scope: `extraPkgConfs'
       |
    78 |             return dflags { extraPkgConfs = (pkgs ++) . extraPkgConfs dflags }
       |                             ^^^^^^^^^^^^^

    src\Halive\FindPackageDBs.hs:85:38: error:
        Not in scope: `extraPkgConfs'
       |
    85 |         [pkgconf] -> return dflags { extraPkgConfs = (PkgConfFile pkgconf :) . extraPkgConfs dflags }
       |                                      ^^^^^^^^^^^^^

OS Windows 10

schell commented 6 years ago

@Eoksni which version of GHC are you using?

schell commented 6 years ago

Wait - I think I can tell from the nice underlining there. It looks like you're using 8.2. I have a PR up for GHC 8.2 here. In the meantime you can configure stack to pull from my commit and see if that works. Please let me know how it goes!

Eoksni commented 6 years ago

@schell Hey, I'm new to the Haskell world and not sure how to "configure stack to pull from my commit". What I did is I cloned you repo, switched to the ghc8.2 branch and used stack build there. It downloaded ghc 8.2.1 and started doing a loooooot of text which ended with:

... a lot of similar lines ...
Extracting  ghc-8.2.1\mingw\x86_64-w64-mingw32\lib\libxaudio2_8.a
Extracting  ghc-8.2.1\mingw\x86_64-w64-mingw32\lib\libxinput.a
Extracting  ghc-8.2.1\mingw\x86_64-w64-mingw32\lib\libxinput1_1.a
Extracting  ghc-8.2.1\mingw\x86_64-w64-mingw32\lib\libxinput1_2.a
Extracting  ghc-8.2.1\mingw\x86_64-w64-mingw32\lib\libxinput1_3.a
Extracting  ghc-8.2.1\mingw\x86_64-w64-mingw32\lib\libxinput1_4.a
Extracting  ghc-8.2.1\mingw\x86_64-w64-mingw32\lib\libxinput9_1_0.a
Extracting  ghc-8.2.1\mingw\x86_64-w64-mingw32\lib\libzoneoc.a
Extracting  ghc-8.2.1\mingw\x86_64-w64-mingw32\lib\txtmode.o
Extracting  ghc-8.2.1\perl
Extracting  ghc-8.2.1\perl\perl.exe
Extracting  ghc-8.2.1\perl\perl56.dll

Everything is Ok

Folders: 473
Files: 9840
Size:       1780920578
Compressed: 1788733440
GHC installed to C:\Users\Dmitriy\AppData\Local\Programs\stack\x86_64-windows\ghc-8.2.1\

C:\sr\setup-exe-src\setup-Z6RU0evB.hs:1:1: error:
    lexical error (UTF-8 decoding error)
  |
1 | ?????????????????????????????????????????????
  | ^

--  While building simple Setup.hs using:
      C:\Users\Dmitriy\AppData\Local\Programs\stack\x86_64-windows\ghc-8.2.1\bin\ghc.EXE -rtsopts -threaded -clear-package-db -global-package-db -hide-all-packages -package base -main-is StackSetupShim.mainOverride -package Cabal-2.0.0.2 C:\sr\setup-exe-src\setup-Z6RU0evB.hs C:\sr\setup-exe-src\setup-shim-Z6RU0evB.hs -o C:\sr\setup-exe-cache\x86_64-windows\tmp-Cabal-simple_Z6RU0evB_2.0.0.2_ghc-8.2.1.exe
    Process exited with code: ExitFailure 1

And btw regarding you question - yes, I think I'm using ghc 8.2, to be precise stack exec ghc -- --version results in

The Glorious Glasgow Haskell Compilation System, version 8.2.2

when I'm out of that cloned repo.

schell commented 6 years ago

@Eoksni if you're working on a project with stack then you can point stack to use a specific package version (by commit hash) by using some special syntax in your projects stack.yaml file. If you're just installing global packages then you can do the same in your global stack.yaml (https://docs.haskellstack.org/en/stable/GUIDE/#finding-project-configs-and-the-implicit-global-project). Once you have found the proper stack.yaml, there should already be a field called packages where you can add the following lines:

- location:
    git: https://github.com/schell/halive
    commit: 0bdd05305aaa7d80cdec115eb816e29300e44a2d
  extra-dep: true

That will tell stack to pull the halive package from that specific commit on github.

Eoksni commented 6 years ago

@schell Thank you! I added it to my project stack.yaml and stack build halive builds successfully. I guess I close the issue now.

schell commented 6 years ago

Glad that worked!

francisdb commented 6 years ago

This is still broken, there is a workaround but the ticket should stay open?