Giter Club home page Giter Club logo

leksah-server's Introduction

Leksah, an Integrated Development Environment for Haskell

Build Status

Leksah aims to integrate various Haskell development tools to provide a practical and pleasant development environment. The user interface is a mix of GTK+ and WebKit based components.

Documentation can be found on leksah.org.

Leksah's Nix Support

Nix is great and we have added some features to make it easier to use Nix projects with Leksah.

If your project has a default.nix file along side it (in the same directory as your cabal.project file), leksah can use nix-shell -A shells.ghc to make a cached environment for running ghc and ghci. Click on the Nix button on the toolbar to set this up for the active project (if the ghcjs build button is active it will also build a cached environment for nix-shell -A shells.ghc).

If you change your default.nix file click the Nix button again to refresh the cached environment. Caching the environment in this way makes calls to cabal new-build faster (avoiding the startup overhead of nix-shell).

A great way to set up a suitable default.nix for your project is described in project-development.md. This works even if you are not planning on using reflex in your project.

Getting Leksah

Nix (Recommended for Linux and macOS users)

Install Nix.

Leksah uses the cached builds provided by IOHK. Setting these up will allow you to use their prebuilt GHC binaries and packages. This is highly recommended.

If you're using NixOS then follow the instructions located at: https://github.com/input-output-hk/plutus#iohk-binary-cache.

Otherwise you can use the following instructions for adding the caches to your local Nix install: https://github.com/input-output-hk/cardano-sl/blob/master/docs/nix.md#binary-cache

Then download, build and run Leksah with:

git clone --recursive https://github.com/leksah/leksah.git
cd leksah
./leksah-nix.sh ghc884

On macOS the Leksah window start below other active application windows you can use Command+Shift+Tab to bring it to the top (issue 461).

The ghc884 argument indicates Leksah should be built using GHC 8.8.4. Leksah works best if it is built with the same version of GHC that your projects use. To work on a project that uses GHC 8.6.5, just exit leksah and run ./leksah-nix.sh ghc865.

Chocolatey and MSYS2 (Recommended for Windows users)

Install Chocolatey.

Right click on Command Prompt and choose Run as Administrator. In the window run:

choco install ghc --version 8.8.4
choco install msys2

Close the Command Prompt window and open a new one (not as administrator). This time run:

git clone --recursive https://github.com/leksah/leksah.git
cd leksah
leksah.bat

Alternative Installation Method

Leksah requires ghc --version >=8.2.2 and cabal --version >=2.0. To get them go to haskell.og/download and choose the Minimal GHC or Haskell Platform.

Step 1: Install C libraries

Fedora
sudo dnf install gobject-introspection-devel webkitgtk4-devel gtksourceview3-devel
Ubuntu/Debian
sudo apt-get install libgirepository1.0-dev libwebkit2gtk-4.0-dev libgtksourceview-3.0-dev libtinfo-dev
Arch Linux
sudo pacman -S gobject-introspection gobject-introspection-runtime gtksourceview3 webkit2gtk
macOS with MacPorts
sudo port install gobject-introspection webkit2-gtk gtksourceview3 gtk-osx-application-gtk3 adwaita-icon-theme`

You will also need to build a MacPorts compatible of GHC. First install GHC some other way then unpack the source for the GHC version you want to use and run:

sudo port install libxslt gmp ncurses libiconv llvm-3.5 libffi
./configure --prefix=$HOME/ghc-8.4.3 --with-iconv-includes=/opt/local/include --with-iconv-libraries=/opt/local/lib --with-gmp-includes=/opt/local/include --with-gmp-libraries=/opt/local/lib --with-system-libffi --with-ffi-includes=/opt/local/lib/libffi-3.2.1/include --with-ffi-libraries=/opt/local/lib --with-nm=/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/nm-classic
make
make install
echo 'PATH: '"$PATH"

Make sure the $HOME/ghc-8.4.3/bin is present in PATH.

macOS with Homebrew

It might be possible to build Leksah using Homebrew now we have switched to WebKit 2. If you can figure it out please send us the details or better yet a pull request to update this file. Raise an issue if you try and it does not work.

FreeBSD
pkg install devel/gobject-introspection x11-toolkits/gtksourceview3 www/webkit2-gtk3

Step 2: Clone repository and its submodules

git clone --recursive https://github.com/leksah/leksah.git
cd leksah

Step 3.a: Build - cabal new-build variant

Step 3.a.1: Install extra tools
cabal update
cabal install alex happy
cabal install haskell-gi

Make sure ~/.cabal/bin is present in the PATH (Windows: Make sure %APPDATA%\cabal\bin is present in the PATH).

Step 3.a.2: Build and run Leksah
macOS using MacPorts
XDG_DATA_DIRS=/opt/local/share ./leksah.sh
Other OS
./leksah.sh

Step 3.b: Build - stack variant

Step 3.b.1: Install extra tools
stack setup --upgrade-cabal
stack install alex happy
stack install haskell-gi
stack install gtk2hs-buildtools

Leksah needs cabal for the metadate feature to work correctly (even when using stack):

stack install cabal-install
cabal update
Step 3.b.2: Build and run Leksah
macOS using MacPorts
XDG_DATA_DIRS=/opt/local/share stack install
stack exec --no-ghc-package-path leksah
Other OS with Gtk+ 3.20 (or newer)
stack install
stack exec --no-ghc-package-path leksah
Other OS with Gtk+ 3.18 (e.g. Ubuntu 16.04)
stack install --flag ltk:-gtk-320 --flag leksah:-gtk-320
stack exec --no-ghc-package-path leksah

leksah-server's People

Contributors

hamishmack avatar jaccokrijnen avatar jpmoresmau avatar jutaro avatar markwright avatar stevechy avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

leksah-server's Issues

cannot install leksah-server

leksah-server cannot be install when I use command " cabal install " .
And the output of error are following.

Qinka@QinkaPC /d/迅雷下载/leksah-server-master/leksah-server-master
$ cabal install
Resolving dependencies...
Configuring leksah-server-0.15.0.0...
Building leksah-server-0.15.0.0...
Failed to install leksah-server-0.15.0.0
Build log ( C:\Users\Qinka\AppData\Roaming\cabal\logs\leksah-server-0.15.0.0.log ):
Building leksah-server-0.15.0.0...
Preprocessing library leksah-server-0.15.0.0...
In-place registering leksah-server-0.15.0.0...
Preprocessing executable 'leksah-server' for leksah-server-0.15.0.0...
Linking dist\build\leksah-server\leksah-server.exe ...
dist\build\leksah-server\leksah-server-tmp\Main.o:fake:(.text+0x1087b): undefined reference to initWinSock' C:\Users\Qinka\AppData\Roaming\cabal\x86_64-windows-ghc-7.10.1\HTTP_JATF6uXRtE7AVBgwGBMAv5/libHSHTTP-4000.2.19-0qGH3XlzNFk47ajbRfP9Ta.a(TCP.o):fake:(.text+0x29f3): undefined reference toshutdownWinSock'
C:\Users\Qinka\AppData\Roaming\cabal\x86_64-windows-ghc-7.10.1\HTTP_JATF6uXRtE7AVBgwGBMAv5/libHSHTTP-4000.2.19-0qGH3XlzNFk47ajbRfP9Ta.a(TCP.o):fake:(.text+0x3153): undefined reference to shutdownWinSock' C:\Users\Qinka\AppData\Roaming\cabal\x86_64-windows-ghc-7.10.1\HTTP_JATF6uXRtE7AVBgwGBMAv5/libHSHTTP-4000.2.19-0qGH3XlzNFk47ajbRfP9Ta.a(TCP.o):fake:(.text+0x31b0): undefined reference toinitWinSock'
C:\Users\Qinka\AppData\Roaming\cabal\x86_64-windows-ghc-7.10.1\HTTP_JATF6uXRtE7AVBgwGBMAv5/libHSHTTP-4000.2.19-0qGH3XlzNFk47ajbRfP9Ta.a(TCP.o):fake:(.text+0x32e3): undefined reference to shutdownWinSock' C:\Users\Qinka\AppData\Roaming\cabal\x86_64-windows-ghc-7.10.1\HTTP_JATF6uXRtE7AVBgwGBMAv5/libHSHTTP-4000.2.19-0qGH3XlzNFk47ajbRfP9Ta.a(TCP.o):fake:(.text+0x3c23): undefined reference toshutdownWinSock'
C:\Users\Qinka\AppData\Roaming\cabal\x86_64-windows-ghc-7.10.1\HTTP_JATF6uXRtE7AVBgwGBMAv5/libHSHTTP-4000.2.19-0qGH3XlzNFk47ajbRfP9Ta.a(TCP.o):fake:(.text+0x3c80): undefined reference to initWinSock' C:\Users\Qinka\AppData\Roaming\cabal\x86_64-windows-ghc-7.10.1\HTTP_JATF6uXRtE7AVBgwGBMAv5/libHSHTTP-4000.2.19-0qGH3XlzNFk47ajbRfP9Ta.a(TCP.o):fake:(.text+0x3db3): undefined reference toshutdownWinSock'
C:\Users\Qinka\AppData\Roaming\cabal\x86_64-windows-ghc-7.10.1\HTTP_JATF6uXRtE7AVBgwGBMAv5/libHSHTTP-4000.2.19-0qGH3XlzNFk47ajbRfP9Ta.a(TCP.o):fake:(.text+0x483b): undefined reference to shutdownWinSock' C:\Users\Qinka\AppData\Roaming\cabal\x86_64-windows-ghc-7.10.1\HTTP_JATF6uXRtE7AVBgwGBMAv5/libHSHTTP-4000.2.19-0qGH3XlzNFk47ajbRfP9Ta.a(TCP.o):fake:(.text+0x4898): undefined reference toinitWinSock'
C:\Users\Qinka\AppData\Roaming\cabal\x86_64-windows-ghc-7.10.1\HTTP_JATF6uXRtE7AVBgwGBMAv5/libHSHTTP-4000.2.19-0qGH3XlzNFk47ajbRfP9Ta.a(TCP.o):fake:(.text+0x49cb): undefined reference to shutdownWinSock' C:\Users\Qinka\AppData\Roaming\cabal\x86_64-windows-ghc-7.10.1\HTTP_JATF6uXRtE7AVBgwGBMAv5/libHSHTTP-4000.2.19-0qGH3XlzNFk47ajbRfP9Ta.a(TCP.o):fake:(.text+0x54db): undefined reference toshutdownWinSock'
C:\Users\Qinka\AppData\Roaming\cabal\x86_64-windows-ghc-7.10.1\HTTP_JATF6uXRtE7AVBgwGBMAv5/libHSHTTP-4000.2.19-0qGH3XlzNFk47ajbRfP9Ta.a(TCP.o):fake:(.text+0x5538): undefined reference to initWinSock' C:\Users\Qinka\AppData\Roaming\cabal\x86_64-windows-ghc-7.10.1\HTTP_JATF6uXRtE7AVBgwGBMAv5/libHSHTTP-4000.2.19-0qGH3XlzNFk47ajbRfP9Ta.a(TCP.o):fake:(.text+0x566b): undefined reference toshutdownWinSock'
c:/haskell/mingw/bin/../lib/gcc/x86_64-w64-mingw32/4.6.3/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Users\Qinka\AppData\Roaming\cabal\x86_64-windows-ghc-7.10.1\HTTP_JATF6uXRtE7AVBgwGBMAv5/libHSHTTP-4000.2.19-0qGH3XlzNFk47ajbRfP9Ta.a(TCP.o): bad reloc address 0x0 in section `.data'
c:/haskell/mingw/bin/../lib/gcc/x86_64-w64-mingw32/4.6.3/../../../../x86_64-w64-mingw32/bin/ld.exe: final link failed: Invalid operation
collect2: ld returned 1 exit status
cabal.exe: Error: some packages failed to install:
leksah-server-0.15.0.0 failed during the building phase. The exception was:
ExitFailure 1

Error installing leksah-server with ghc 7.6.3 on ubuntu 14.04

cody@cody-XPS-L521X:~$ cabal install -j leksah-server
Resolving dependencies...
Configuring leksah-server-0.14.0.0...
Building leksah-server-0.14.0.0...
Failed to install leksah-server-0.14.0.0
Build log ( /home/cody/.cabal/logs/leksah-server-0.14.0.0.log ):
Configuring leksah-server-0.14.0.0...
Building leksah-server-0.14.0.0...
Preprocessing library leksah-server-0.14.0.0...
[ 1 of 15] Compiling Paths_leksah_server ( dist/build/autogen/Paths_leksah_server.hs, dist/build/Paths_leksah_server.o )
[ 2 of 15] Compiling IDE.Utils.Server ( src/IDE/Utils/Server.hs, dist/build/IDE/Utils/Server.o )
[ 3 of 15] Compiling IDE.Core.CTypes  ( src/IDE/Core/CTypes.hs, dist/build/IDE/Core/CTypes.o )
[ 4 of 15] Compiling IDE.Core.Serializable ( src/IDE/Core/Serializable.hs, dist/build/IDE/Core/Serializable.o )
[ 5 of 15] Compiling IDE.StrippedPrefs ( src/IDE/StrippedPrefs.hs, dist/build/IDE/StrippedPrefs.o )
[ 6 of 15] Compiling IDE.Utils.Tool   ( src/IDE/Utils/Tool.hs, dist/build/IDE/Utils/Tool.o )
[ 7 of 15] Compiling IDE.Utils.VersionUtils ( src/IDE/Utils/VersionUtils.hs, dist/build/IDE/Utils/VersionUtils.o )
[ 8 of 15] Compiling IDE.Utils.Utils  ( src/IDE/Utils/Utils.hs, dist/build/IDE/Utils/Utils.o )
[ 9 of 15] Compiling IDE.Utils.FileUtils ( src/IDE/Utils/FileUtils.hs, dist/build/IDE/Utils/FileUtils.o )
[10 of 15] Compiling IDE.Metainfo.SourceDB ( src/IDE/Metainfo/SourceDB.hs, dist/build/IDE/Metainfo/SourceDB.o )
[11 of 15] Compiling IDE.Utils.GHCUtils ( src/IDE/Utils/GHCUtils.hs, dist/build/IDE/Utils/GHCUtils.o )
[12 of 15] Compiling IDE.Metainfo.InterfaceCollector ( src/IDE/Metainfo/InterfaceCollector.hs, dist/build/IDE/Metainfo/InterfaceCollector.o )
[13 of 15] Compiling IDE.Metainfo.WorkspaceCollector ( src/IDE/Metainfo/WorkspaceCollector.hs, dist/build/IDE/Metainfo/WorkspaceCollector.o )

src/IDE/Metainfo/WorkspaceCollector.hs:576:29-32:
    Couldn't match type `[Char]' with `Text'
    Expected type: Text
      Actual type: String
    In the dscName' field of a record
    In the second argument of `($)', namely
      `RealDescr
         {dscName' = name,
          dscMbTypeStr' = Just
                            (BS.pack ("instance " ++ (showSDocUnqual dflags $ ppr typ))),
          dscMbModu' = Just pm, dscMbLocation' = srcSpanToLocation loc,
          dscMbComment' = toComment mbComment [],
          dscTypeHint' = InstanceDescr other, dscExported' = True}'
    In the expression:
      Real
      $ RealDescr
          {dscName' = name,
           dscMbTypeStr' = Just
                             (BS.pack ("instance " ++ (showSDocUnqual dflags $ ppr typ))),
           dscMbModu' = Just pm, dscMbLocation' = srcSpanToLocation loc,
           dscMbComment' = toComment mbComment [],
           dscTypeHint' = InstanceDescr other, dscExported' = True}

src/IDE/Metainfo/WorkspaceCollector.hs:581:43-47:
    Couldn't match type `[Char]' with `Text'
    Expected type: [Text]
      Actual type: [String]
    In the first argument of `InstanceDescr', namely `other'
    In the dscTypeHint' field of a record
    In the second argument of `($)', namely
      `RealDescr
         {dscName' = name,
          dscMbTypeStr' = Just
                            (BS.pack ("instance " ++ (showSDocUnqual dflags $ ppr typ))),
          dscMbModu' = Just pm, dscMbLocation' = srcSpanToLocation loc,
          dscMbComment' = toComment mbComment [],
          dscTypeHint' = InstanceDescr other, dscExported' = True}'
cabal: Error: some packages failed to install:
leksah-server-0.14.0.0 failed during the building phase. The exception was:
ExitFailure 1
cody@cody-XPS-L521X:~$ cat /etc/issue
Ubuntu 14.04.1 LTS \n \l

cody@cody-XPS-L521X:~$ uname -a
Linux cody-XPS-L521X 3.13.0-35-generic #62-Ubuntu SMP Fri Aug 15 01:58:42 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux
cody@cody-XPS-L521X:~$ ghc --version
The Glorious Glasgow Haskell Compilation System, version 7.6.3
cody@cody-XPS-L521X:~$ 

test suite fails: src/IDE/Utils/CabalPlan.hs:37 fails (pjCabalVersion = "1.24.0.0", pjCabalLibVersion = "1.24.0.0", pjCompilerId = Nothing, pjOS = Nothing, pjArch = Nothing}) missing

I tried building leksah-server-0.16.2.0 on NixOS. However, it seems like

Preprocessing library leksah-server-0.16.2.0...
[ 1 of 18] Compiling Paths_leksah_server ( dist/build/autogen/Paths_leksah_server.hs, dist/build/Paths_leksah_server.o )
[ 2 of 18] Compiling IDE.Utils.Utils  ( src/IDE/Utils/Utils.hs, dist/build/IDE/Utils/Utils.o )
[ 3 of 18] Compiling IDE.Utils.Tool   ( src/IDE/Utils/Tool.hs, dist/build/IDE/Utils/Tool.o )
[ 4 of 18] Compiling IDE.Utils.VersionUtils ( src/IDE/Utils/VersionUtils.hs, dist/build/IDE/Utils/VersionUtils.o )
[ 5 of 18] Compiling IDE.Utils.Server ( src/IDE/Utils/Server.hs, dist/build/IDE/Utils/Server.o )
[ 6 of 18] Compiling IDE.Utils.CabalProject ( src/IDE/Utils/CabalProject.hs, dist/build/IDE/Utils/CabalProject.o )
[ 7 of 18] Compiling IDE.Utils.CabalPlan ( src/IDE/Utils/CabalPlan.hs, dist/build/IDE/Utils/CabalPlan.o )
[ 8 of 18] Compiling IDE.Core.CTypes  ( src/IDE/Core/CTypes.hs, dist/build/IDE/Core/CTypes.o )
[ 9 of 18] Compiling IDE.Core.Serializable ( src/IDE/Core/Serializable.hs, dist/build/IDE/Core/Serializable.o )
[10 of 18] Compiling IDE.StrippedPrefs ( src/IDE/StrippedPrefs.hs, dist/build/IDE/StrippedPrefs.o )
[11 of 18] Compiling IDE.Utils.FileUtils ( src/IDE/Utils/FileUtils.hs, dist/build/IDE/Utils/FileUtils.o )
[12 of 18] Compiling IDE.Metainfo.SourceDB ( src/IDE/Metainfo/SourceDB.hs, dist/build/IDE/Metainfo/SourceDB.o )
[13 of 18] Compiling IDE.Utils.GHCUtils ( src/IDE/Utils/GHCUtils.hs, dist/build/IDE/Utils/GHCUtils.o )
[14 of 18] Compiling IDE.HeaderParser ( src/IDE/HeaderParser.hs, dist/build/IDE/HeaderParser.o )
[15 of 18] Compiling IDE.Metainfo.InterfaceCollector ( src/IDE/Metainfo/InterfaceCollector.hs, dist/build/IDE/Metainfo/InterfaceCollector.o )

src/IDE/Metainfo/InterfaceCollector.hs:27:1-45: warning: [-Wdodgy-imports]
    Module ‘Module’ does not export ‘PackageKey’
[16 of 18] Compiling IDE.Metainfo.WorkspaceCollector ( src/IDE/Metainfo/WorkspaceCollector.hs, dist/build/IDE/Metainfo/WorkspaceCollector.o )

src/IDE/Metainfo/WorkspaceCollector.hs:43:1-60: warning: [-Wdodgy-imports]
    Module ‘GHC’ does not export ‘PackageKey’
[17 of 18] Compiling IDE.Metainfo.SourceCollectorH ( src/IDE/Metainfo/SourceCollectorH.hs, dist/build/IDE/Metainfo/SourceCollectorH.o )
[18 of 18] Compiling IDE.Metainfo.PackageCollector ( src/IDE/Metainfo/PackageCollector.hs, dist/build/IDE/Metainfo/PackageCollector.o )
Preprocessing executable 'leksah-server' for leksah-server-0.16.2.0...
[1 of 1] Compiling Main             ( main/Collector.hs, dist/build/leksah-server/leksah-server-tmp/Main.dyn_o )
Linking dist/build/leksah-server/leksah-server ...
Preprocessing executable 'leksahecho' for leksah-server-0.16.2.0...
[1 of 1] Compiling Main             ( main/LeksahEcho.hs, dist/build/leksahecho/leksahecho-tmp/Main.dyn_o )
Linking dist/build/leksahecho/leksahecho ...
Preprocessing executable 'leksahtrue' for leksah-server-0.16.2.0...
[1 of 1] Compiling Main             ( main/LeksahTrue.hs, dist/build/leksahtrue/leksahtrue-tmp/Main.dyn_o )
Linking dist/build/leksahtrue/leksahtrue ...
Preprocessing test suite 'test-tool' for leksah-server-0.16.2.0...
[1 of 1] Compiling Main             ( tests/TestTool.hs, dist/build/test-tool/test-tool-tmp/Main.dyn_o )

tests/TestTool.hs:(24,1)-(26,17): warning: [-Wunused-imports]
    The import of ‘toolProcess’
    from module ‘IDE.Utils.Tool’ is redundant

tests/TestTool.hs:27:1-67: warning: [-Wunused-imports]
    The import of ‘System.Process’ is redundant
      except perhaps to import instances from ‘System.Process’
    To import instances alone, use: import System.Process()

tests/TestTool.hs:(28,1)-(30,50): warning: [-Wunused-imports]
    The import of ‘@=?, Test, assertBool, runTestTT’
    from module ‘Test.HUnit’ is redundant

tests/TestTool.hs:(34,1)-(35,61): warning: [-Wunused-imports]
    The import of ‘forkIO, threadDelay’
    from module ‘Control.Concurrent’ is redundant

tests/TestTool.hs:37:1-28: warning: [-Wunused-imports]
    The import of ‘Control.Monad’ is redundant
      except perhaps to import instances from ‘Control.Monad’
    To import instances alone, use: import Control.Monad()

tests/TestTool.hs:(38,1)-(39,53): warning: [-Wunused-imports]
    The import of ‘System.Log.Logger’ is redundant
      except perhaps to import instances from ‘System.Log.Logger’
    To import instances alone, use: import System.Log.Logger()

tests/TestTool.hs:40:1-32: warning: [-Wunused-imports]
    The import of ‘System.Log’ is redundant
      except perhaps to import instances from ‘System.Log’
    To import instances alone, use: import System.Log()

tests/TestTool.hs:46:1-5: warning: [-Wmissing-signatures]
    Top-level binding with no type signature:
      check :: [ToolOutput] -> [ToolOutput] -> IO ()

tests/TestTool.hs:56:1-8: warning: [-Wmissing-signatures]
    Top-level binding with no type signature:
      runTests :: GHC.MVar.MVar (Maybe (IO a)) -> IO ()

tests/TestTool.hs:61:18-21: warning: [-Wname-shadowing]
    This binding for ‘test’ shadows the existing binding
      imported from ‘Test.HUnit’ at tests/TestTool.hs:30:28-39
      (and originally defined in ‘Test.HUnit.Base’)

tests/TestTool.hs:62:17-20: warning: [-Wunused-do-bind]
    A do-notation statement discarded a result of type ‘a’
    Suppress this warning by saying ‘_ <- test’

tests/TestTool.hs:66:1-8: warning: [-Wmissing-signatures]
    Top-level binding with no type signature:
      sendTest :: Control.Monad.IO.Class.MonadIO m =>
                  GHC.MVar.MVar (Maybe a) -> a -> m ()

tests/TestTool.hs:66:19-22: warning: [-Wname-shadowing]
    This binding for ‘test’ shadows the existing binding
      imported from ‘Test.HUnit’ at tests/TestTool.hs:30:28-39
      (and originally defined in ‘Test.HUnit.Base’)

tests/TestTool.hs:69:1-11: warning: [-Wmissing-signatures]
    Top-level binding with no type signature:
      doneTesting :: Control.Monad.IO.Class.MonadIO m =>
                     GHC.MVar.MVar (Maybe a) -> m ()

tests/TestTool.hs:72:1-5: warning: [-Wmissing-signatures]
    Top-level binding with no type signature: tests :: String -> Test

tests/TestTool.hs:236:30-37: warning: [-Wname-shadowing]
    This binding for ‘failures’ shadows the existing binding
      imported from ‘Test.HUnit’ at tests/TestTool.hs:29:40-49
      (and originally defined in ‘Test.HUnit.Base’)
Linking dist/build/test-tool/test-tool ...
running tests
Running 1 test suites...
Test suite test-tool: RUNNING...
### Failure in src/IDE/Utils/CabalPlan.hs:37: expression `:{
  eitherDecodeStrict' (BS.pack
    "{\
    \   \"cabal-lib-version\" : \"1.24.0.0\",\
    \   \"cabal-version\" : \"1.24.0.0\",\
    \   \"install-plan\" : [\
    \      {\
    \         \"type\" : \"pre-existing\",\
    \         \"components\" : {\
    \            \"lib\" : {\
    \               \"depends\" : [\
    \                  \"array-0.5.1.1\",\
    \                  \"base-4.9.0.0\"\
    \               ]\
    \            }\
    \         },\
    \         \"id\" : \"Cabal-1.24.0.0\"\
    \      },\
    \      {\
    \         \"id\" : \"QuickCheck-2.9.1-ec9a1c39266d75ed2c3314f6e846a8f11853eff43fc45db79c7256d9bfd94602\",\
    \         \"components\" : {\
    \            \"lib\" : {\
    \               \"depends\" : [\
    \                  \"base-4.9.0.0\",\
    \                  \"containers-0.5.7.1\",\
    \                  \"random-1.1-fe6ccf72ebd63a2d68570bb45b42bd08df5570c6151cb9af54907d40ef9af454\"\
    \               ]\
    \            }\
    \         },\
    \         \"flags\" : {\
    \            \"templatehaskell\" : true\
    \         },\
    \         \"type\" : \"configured\"\
    \      }\
    \   ]\
    \}") :: Either String PlanJson
:}'
expected: Right (PlanJson {pjPlan = [PlanItem {piId = "Cabal-1.24.0.0", piType = "pre-existing", piComps = [(ComponentLib,fromList ["array-0.5.1.1","base-4.9.0.0"])]},PlanItem {piId = "QuickCheck-2.9.1-ec9a1c39266d75ed2c3314f6e846a8f11853eff43fc45db79c7256d9bfd94602", piType = "configured", piComps = [(ComponentLib,fromList ["base-4.9.0.0","containers-0.5.7.1","random-1.1-fe6ccf72ebd63a2d68570bb45b42bd08df5570c6151cb9af54907d40ef9af454"])]}]})
 but got: Right (PlanJson {pjPlan = [PlanItem {piId = "Cabal-1.24.0.0", piType = "pre-existing", piComps = [(ComponentLib,fromList ["array-0.5.1.1","base-4.9.0.0"])]},PlanItem {piId = "QuickCheck-2.9.1-ec9a1c39266d75ed2c3314f6e846a8f11853eff43fc45db79c7256d9bfd94602", piType = "configured", piComps = [(ComponentLib,fromList ["base-4.9.0.0","containers-0.5.7.1","random-1.1-fe6ccf72ebd63a2d68570bb45b42bd08df5570c6151cb9af54907d40ef9af454"])]}], pjCabalVersion = "1.24.0.0", pjCabalLibVersion = "1.24.0.0", pjCompilerId = Nothing, pjOS = Nothing, pjArch = Nothing})
Examples: 6  Tried: 6  Errors: 0  Failures: 1
Test suite test-tool: FAIL
Test suite logged to: dist/test/leksah-server-0.16.2.0-test-tool.log
0 of 1 test suites (0 of 1 test cases) passed.
builder for ‘/nix/store/gw5p2lh6hs29jy33n4w6v8xj12a1m951-leksah-server-0.16.2.0.drv’ failed with exit code 1
cannot build derivation ‘/nix/store/p3x80a1f0q52isff9xaj1kyifp5fcxc4-ghc-8.0.2-with-packages.drv’: 1 dependencies couldn't be built
cannot build derivation ‘/nix/store/9d2gqrsp90x6a1hjxm9apm9xzjg2yxbp-leksah.drv’: 1 dependencies couldn't be built
error: build of ‘/nix/store/9d2gqrsp90x6a1hjxm9apm9xzjg2yxbp-leksah.drv’ failed

Use `ghc-pkg-lib` to speed up metadata collection and fix some UI lockup issues

I think that when we collect workspace metadata the UI thread blocks running ghc-pkg list --simple-output once per package in the workspace. ghc-pkg takes about 0.1s to run (at least on my machine). The delay is really annoying when you have 20 or 30 packages in your workspace!

@JPMoresmau am I right in thinking that if we change getInstalledPackageIds' in IDE.Utils.FileUtils use ghc-pkg-lib it might be much faster (since it will avoid the process startup time)?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.