-
-
Notifications
You must be signed in to change notification settings - Fork 412
Description
Following the suggestion from @pepeiborra to use https://github.com/haskell/haskell-language-server/tree/master/ghcide/bench for checking out HLS performance I tried to run it using lsp-types as a smaller example (compared to Cabal) but could do that.
First I tried to make it run with Stack, after some tweaking of stack.yaml I got the build process starting up but it looks like -eventlog is not being passed somewhere as stracing shows the following message from GHC RTS:
ghcide: the flag -l-au requires the program to be built with -eventlog, -prof or -debug
Quick look didn't reveal a place how this could be fixed so I switched to cabal but using the shell.nix supplied with the project doesn't help as the benchmarks don't seem to be compatible with Nix. I get the following error in logs:
Error when calling cabal --builddir=/home/kirill/.cache/hie-bios/dist-lsp-types-1.0.0-5e8c96bd74e413bf187d2a4df02e9122 v2-exec --with-compiler /home/kirill/.cache/hie-bios/wrapper-13a09b18ea883dd377d59db5e821a86b ghc -v0 -- --print-libdir","","cabal: The program 'ghc' version >=7.0.1 is required but the version of\n/home/kirill/.cache/hie-bios/wrapper-13a09b18ea883dd377d59db5e821a86b could\nnot be determined.\n\n
After that I switched to GHC/cabal installed with ghcup (I use Ubuntu if that matters) and that forced me to drop ~/.cabal as Cabal doesn't appear to support this kind of switch. And in the end I get even more cryptic error in benchmark logs:
Failed to parse result of calling cabal cabal: Internal error in target matching. It should always be possible to finda syntax that's sufficiently qualified to give an unambiguous match. However
when matching 'lib:lsp-types' we found lib:lsp-types (unknown-component) which
does not have an unambiguous syntax. The possible syntax and the targets they
match are as follows:
'lib:lsp-types' which matches lib:lsp-types (unknown-component),
:pkg:lib:lib:lib:file:lsp-types (unknown-file)
Am I doing anything wrong here and what is the proper way to run these benchmarks?